找不到Highcharter程序包

编程入门 行业动态 更新时间:2024-10-26 06:36:38
本文介绍了找不到Highcharter程序包-Highchart功能不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想使用 highcharter 软件包绘制一些股票图表.但是,当我使用install.packages和库时,会收到一些错误消息.然后,当我尝试使用 highchart 函数时,出现以下错误消息:

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:

highchart错误(类型=股票"):找不到函数"highchart".

Error in highchart(type = "stock") : could not find function "highchart".

以下是加载程序包时的错误:

These are the errors while loading the package:

install.packages("highcharter")

尝试URL' cran.rstudio/bin/macosx/el-capitan/contrib/3.4/highcharter_0.7.0.tgz '

内容类型"application/x-gzip"长度2851784字节(2.7 MB)

Content type 'application/x-gzip' length 2851784 bytes (2.7 MB)

===================================================

==================================================

下载2.7 MB

tar:无法设置默认语言环境

tar: Failed to set default locale

下载的二进制软件包在/var/folders/g7/zltv5nrj1qj0hcmdyql94s3r0000gn/T//RtmpnlCQEr/downloaded_pa​​ckages

The downloaded binary packages are in /var/folders/g7/zltv5nrj1qj0hcmdyql94s3r0000gn/T//RtmpnlCQEr/downloaded_packages

library(highcharter)

错误:在loadNamespace(j<-i [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]])中,"highcharter"的包或名称空间加载失败:没有名为"data.table"的包另外:警告消息:软件包"highcharter"是在R版本3.4.4下构建的

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)

也尝试过

highcharter::highchart

这是我现在正在运行的代码:

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[1]], name = symbols[1])

我期望使用highcharter文档中描述的图表,但找不到包和函数.

I have expected a chart as described with the highcharter documentation, instead the package and function is not found.

推荐答案

感谢您的帮助!我需要从计算机上卸载R和RStudio,然后它才能工作.

thank you for your help! I needed to uninstall R and RStudio from my machine and then it worked.

我不确定,为什么,但是它解决了我的问题,一切现在都运行顺利.

I am not entirely sure, why but it solved my issue, everything is running smoothly now.

再次感谢您!

最诚挚的问候,

Bodo

更多推荐

找不到Highcharter程序包

本文发布于:2023-07-15 10:32:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1110680.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   程序包   Highcharter

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!