• R语言
  • ggplot2成功install,但是不能library,求大神指导

> install.packages("ggplot2")

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.0/ggplot2_1.0.0.zip'

Content type 'application/zip' length 2672616 bytes (2.5 Mb)

如下:

studio就这么显示的,一晚上我已经崩溃到不能崩溃了[s:15]

opened URL

downloaded 2.5 Mb

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in

C:\Users\Administrator.JDNTCA4ZYXMYF5E\AppData\Local\Temp\RtmpYpksCX\downloaded_packages

> library(ggplot2)

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[]) :

there is no package called ‘stringr’

Error: package or namespace load failed for ‘ggplot2’


回复 第1楼 的 totoro_u1:缺少“stringr”程序包,把这个程序包再单独安装一下试试

回复 第2楼 的 skytreee:我昨晚有试过的,它说找不到这个程序包~

直接install.packages("stringr"),再install.packages("ggplot2")

回复 第4楼 的 jamehandsome:恩,已经解决了,可能是当时网速太戳了,谢谢