运行库时出错(ggplot2)

发布于 2024-09-06 23:26:23 字数 622 浏览 3 评论 0原文

我刚刚更新到 R 2.11.1,安装 ggplot2 后,我尝试

library(ggplot2)

并得到了

Loading required package: proto
Loading required package: grid Loading
required package: reshape Loading
required package: plyr Loading
required package: digest Error in
eval(expr, envir, enclos) : could not
find function "proto" In addition:
Warning message: In library(package,
lib.loc = lib.loc, character.only =
TRUE, logical.return = TRUE,  :  
there is no package called 'proto'
Error : unable to load R code in
package 'ggplot2' Error:
package/namespace load failed for
'ggplot2'

任何帮助。

I just updated to R 2.11.1 and after installing ggplot2, I tried

library(ggplot2)

and got

Loading required package: proto
Loading required package: grid Loading
required package: reshape Loading
required package: plyr Loading
required package: digest Error in
eval(expr, envir, enclos) : could not
find function "proto" In addition:
Warning message: In library(package,
lib.loc = lib.loc, character.only =
TRUE, logical.return = TRUE,  :  
there is no package called 'proto'
Error : unable to load R code in
package 'ggplot2' Error:
package/namespace load failed for
'ggplot2'

Any help appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

赠我空喜 2024-09-13 23:26:23

install.packages('ggplot2', dep = TRUE) 就可以了...安装 proto

install.packages('ggplot2', dep = TRUE) would do the trick... install proto package

泅人 2024-09-13 23:26:23

打开 R shell 并在其中输入以下内容,

install.packages('ggplot2', dep = TRUE)

然后它会要求您选择镜像,选择最近的一个,它将安装它并解决您的问题。

Open R shell and type following in it

install.packages('ggplot2', dep = TRUE)

then it will ask you to select the mirror, select closest one and it will install it and solve your problem.

挖个坑埋了你 2024-09-13 23:26:23

在安装 ggplots2 时也遇到了麻烦,但这里有一个奇怪的解决方案(在 Windows 上测试):

  • 我通过 RStudio 安装。既可以从“工具”->“安装包”中输入,也可以通过输入 install.packages("ggplots2", dep=T) 来实现。它不起作用,因为它一直没有安装依赖项。

  • 然后我直接通过 R gui install.packages("ggplots2", dep=T) 安装,一切顺利。

Also have had troubles, when installing ggplots2, but here is a curious solution (tested on windows):

  • I installed via RStudio. Both from Tools->install packages and by typing install.packages("ggplots2", dep=T). It didn't work because it kept not installing the dependencies.

  • I then installed direct by R gui install.packages("ggplots2", dep=T) and everything went well.

烂柯人 2024-09-13 23:26:23

我遇到了同样的问题,这解决了问题。

  1. 安装lazyeval包。
  2. 然后安装 ggplot2
  3. 加载 ggplot2 库,一切都会正常工作。

I had the same problem and this did the trick.

  1. Install the lazyeval package.
  2. Then install ggplot2
  3. Load the ggplot2 library and everything will hopefully work fine.
轮廓§ 2024-09-13 23:26:23

步骤
1.转到->工具
2.点击->安装包
3.在包文本框中输入ggplot2
选中复选框 &安装依赖项

就可以了!

Steps
1.Go To -> Tools
2.Click -> Install Packages
3.In Packages Text Box Type ggplot2
Check the checkbox & install dependencies

And your good to go !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文