#quantmod
install.packages("quantmod")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/quantmod_0.4.26.tgz'
Content type 'application/x-gzip' length 1060183 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
The downloaded binary packages are in
/var/folders/gc/p98nt15x5c101d4mxgty0bhm0000gn/T//RtmpbOyUiR/downloaded_packages
install.packages("quantmod")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/quantmod_0.4.26.tgz'
Content type 'application/x-gzip' length 1060183 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
The downloaded binary packages are in
/var/folders/gc/p98nt15x5c101d4mxgty0bhm0000gn/T//RtmpbOyUiR/downloaded_packages
library(quantmod)
Loading required package: xts
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
Loading required package: TTR
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
getSymbols(c("MSFT" , "AAPL" , "TSLA" , "GOOG"))
[1] "MSFT" "AAPL" "TSLA" "GOOG"
getSymbols("quantmod")
Error in getSymbols.yahoo(Symbols = "quantmod", env = <environment>, verbose = FALSE, :
Unable to import “quantmod”.
HTTP error 404.
nrow(MSFT)
[1] 83
result <- gtrends(c("MSFT , multiTimeline ") , time = "2023-10-01 2024-01-31")
Error in start_top:end_top : NA/NaN argument
microsoft_view <- pageviews::article_pageviews(project = "en.wikipedia", article = "R (programming language)", platform = "all", user_type = "all", start = "2023100100", end = 2024013100, reformat = TRUE, granularity = "daily")
Error in pageview_timestamps(end) :
'timestamps' must be of type Date, POSIXlt or POSIXct
nrow(high_views)
[1] 1