Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R coding Please Help Homework 2 ggplot2 rocks! DA 6233 2022-10-05 Homework 2 is all about usingggplot2. You will usetech_financials.csvdata set you have used previously

R coding Please Help

Homework 2

ggplot2 rocks!

DA 6233 2022-10-05

Homework 2 is all about usingggplot2. You will usetech_financials.csvdata set you have used previously in Homework 1.

Q4 (2 points)

Compare profit margins (pr_margin) of the following six companies - Apple, Tesla, Meta, Twitter, Amazon, and Qualcomm - over the full sample period. Usefyearon the X axis.fyearis the fiscal year.

Here I give you the code to get the data set in the required form.

d1 % filter(sale > 0) %>% mutate(conm = stringr::str_to_title(conm), # Converts the string to title case datadate = lubridate::ymd(datadate)) # Convert datadate into a date variabled1_4 % filter(tic %in% c("AAPL", "TSLA", "META", "TWTR", "AMZN", "QCOM")) %>% mutate(pr_margin = oibdp / sale, fyear = as.Date(paste(fyear, "12", "31", sep = "-")))

Now used1_4code to produce the following plot. How could I code this? Please Help, Thank you.

image text in transcribed
Now use d1_4 to produce the following plot. Hint: Note that all the panels in the facetplot have text on the X axis. This is not the default behavior. Check out the "scales" argument inside facet_wrap(). Amazon.com Inc Apple Inc Meta Platforms Inc 50% 0% -50% -100% 2012 2014 2016 2018 2020 2022 2012 2014 2016 2018 2020 2022 2012 2014 2016 2018 2020 2022 Profit Margin Qualcomm Inc Tesla Inc Twitter Inc 50% 0% -50% -100% 2012 2014 2016 2018 2020 2022 2012 2014 2016 2018 2020 2022 2012 2014 2016 2018 2020 2022 Fiscal Year

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

An Elementary Introduction To Mathematical Finance

Authors: Sheldon M Ross

3rd Edition

1139065106, 9781139065108

More Books

Students also viewed these Mathematics questions

Question

What are the five types of filing status?

Answered: 1 week ago

Question

What is overfitting? Why is it so important to watch out for?

Answered: 1 week ago

Question

Find intersection points of the curves r = 1 and Y = 12 us 3

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago