I want to use the
highcharter package to chart some stocks. However, I receive some error messages, when I use install.packages and library. When I then try to use the
highchart function, I get the following error message:
Error in highchart(type = "stock") : could not find function "highchart".
These are the errors while loading the package:
Content type 'application/x-gzip' length 2851784 bytes (2.7 MB)
downloaded 2.7 MB
tar: Failed to set default locale
The downloaded binary packages are in /var/folders/g7/zltv5nrj1qj0hcmdyql94s3r0000gn/T//RtmpnlCQEr/downloaded_packages
Error: package or namespace load failed for 'highcharter' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called 'data.table' In addition: Warning message: package 'highcharter' was built under R version 3.4.4
Also, when I manually "activate" the package, it will not work either. Tried to install the package and select it, also tried:
remove.packages(c("highcharter", "data.table")) install.packages('highcharter', dependencies = TRUE) install.packages('data.table', dependencies = TRUE)
This is the code I am running now:
# Charting stock prices hchart(type = "stock") %>% hc_title(text = "monthly log returns") %>% hc_add_series(asset_returns_xts[, symbols], name = symbols)
I have expected a chart as described with the highcharter documentation, instead the package and function is not found.