Using the given code, answer the questions below.

library(tidyquant) 
library(tidyverse) 

stocks <- tq_get("USD/EUR", get = "exchange.rates", from = "2017-01-15 to 2018-12-15")
stocks
## # A tibble: 180 x 2
##    date       exchange.rate
##    <date>             <dbl>
##  1 2018-08-09         0.864
##  2 2018-08-10         0.873
##  3 2018-08-11         0.876
##  4 2018-08-12         0.877
##  5 2018-08-13         0.878
##  6 2018-08-14         0.879
##  7 2018-08-15         0.882
##  8 2018-08-16         0.879
##  9 2018-08-17         0.877
## 10 2018-08-18         0.874
## # ... with 170 more rows

stocks %>%
  ggplot(aes(x = date, y = exchange.rate)) +
  geom_line()

Q1. How many columns (variables) are there?

There are 7 variables.

Q2. What are the variables?

The variables are date, open, high, low, close, volume, and adjusted.

Q3. How many rows are there?

There are 776 rows.

Q4. What does the row represent?

The row represents each day a stock is on the market.

Q5. Get Microsoft stock prices, instead of Apple.

Q6. Get the stock prices from 2017-01-15 to 2018-12-15.

Q7. Get economic data, the unemployment rate for the U.S., instead of stock prices.

Q8. Get exchange rate between the U.S. dollar and the euro, instead of stock prices.