dividends Import dividends of Apple and Microsoft since 2010.economic data Import U.S. civilian unemployment rate (seasonally adjusted) since 2017.exchange rates Import exchange rate between the U.S. dollar and the Japanese yen.stock prices Import stock price of Apple and Microsoft since 2010.Scatterplot Plot the relationship between closing price and volume for Apple.Scatterplot Plot the relationship between closing price and volume for both Apple and Microsoft.dividends Import dividends of Apple and Microsoft since 2010.## Warning: x = 'WMT', get = 'dividends': Error in vapply(parse(text = fr[, 2]), eval, numeric(1)): values must be length 1,
## but FUN(X[[1]]) result is length 2
## Removing WMT.
## Warning: x = 'TGT', get = 'dividends': Error in vapply(parse(text = fr[, 2]), eval, numeric(1)): values must be length 1,
## but FUN(X[[1]]) result is length 2
## Removing TGT.
## # A tibble: 0 x 2
## # … with 2 variables: symbol <chr>, dividends <???>
economic data Import U.S. civilian unemployment rate (seasonally adjusted) since 2017.Hint: Find the symbol in FRED.
## # A tibble: 37 x 2
## date price
## <date> <dbl>
## 1 2017-01-01 4.7
## 2 2017-02-01 4.6
## 3 2017-03-01 4.4
## 4 2017-04-01 4.4
## 5 2017-05-01 4.4
## 6 2017-06-01 4.3
## 7 2017-07-01 4.3
## 8 2017-08-01 4.4
## 9 2017-09-01 4.2
## 10 2017-10-01 4.1
## # … with 27 more rows
exchange rates Import exchange rate between the U.S. dollar and the Japanese yen.Hint: Find the symbol in oanda.com.
## Warning: Oanda only provides historical data for the past 180 days. Symbol: JPY/
## USD
## # A tibble: 180 x 2
## date exchange.rate
## <date> <dbl>
## 1 2019-09-07 0.00935
## 2 2019-09-08 0.00935
## 3 2019-09-09 0.00934
## 4 2019-09-10 0.00931
## 5 2019-09-11 0.00928
## 6 2019-09-12 0.00926
## 7 2019-09-13 0.00925
## 8 2019-09-14 0.00925
## 9 2019-09-15 0.00925
## 10 2019-09-16 0.00927
## # … with 170 more rows
stock prices Import stock price of Apple and Microsoft since 2010.## # A tibble: 5,118 x 8
## symbol date open high low close volume adjusted
## <chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 AAPL 2010-01-04 30.5 30.6 30.3 30.6 123432400 26.5
## 2 AAPL 2010-01-05 30.7 30.8 30.5 30.6 150476200 26.6
## 3 AAPL 2010-01-06 30.6 30.7 30.1 30.1 138040000 26.2
## 4 AAPL 2010-01-07 30.2 30.3 29.9 30.1 119282800 26.1
## 5 AAPL 2010-01-08 30.0 30.3 29.9 30.3 111902700 26.3
## 6 AAPL 2010-01-11 30.4 30.4 29.8 30.0 115557400 26.1
## 7 AAPL 2010-01-12 29.9 30.0 29.5 29.7 148614900 25.8
## 8 AAPL 2010-01-13 29.7 30.1 29.2 30.1 151473000 26.1
## 9 AAPL 2010-01-14 30.0 30.1 29.9 29.9 108223500 26.0
## 10 AAPL 2010-01-15 30.1 30.2 29.4 29.4 148516900 25.5
## # … with 5,108 more rows
Scatterplot Plot the relationship between closing price and volume for Apple.Hint: See the code in 4.2.1 Scatterplot. Use the dplyr::filter function to select Apple.
Hint: See the scatterplot you created in the previous question.
There is an inverse relationship between the x and the y axis.
Scatterplot Plot the relationship between closing price and volume for both Apple and Microsoft.Hint: Use facet_wrap().
Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.