Hi! I'm trying to make a line graph about stock price.
I first search stock price using this command
library(tidyquant)
zoom2<- tq_get("ZM", get = "stock.prices", from = "2017-09-01", to = "2021-03-01")
and then, I used this to make the plot.
zoom2 %>%
-
ggplot(aes(x = date, y = price)) +
-
geom_line() +
-
labs(title = "zoom stock price", y = "stock price", x = "") +
-
theme_tq()
However, there is an error.
data must be a data frame, or other object coercible by fortify(), not an S3 object with class uneval
Did you accidentally pass aes() to the data argument?
Could anyone give me a help?
Thank you in advance T T