简体   繁体   English

无法加载库R Studio

[英]Can't load library R Studio

I am trying to install the ggmap library: 我正在尝试安装ggmap库:

 install.packages("ggmap")
 library(ggmap)

This is what I get though: 这是我得到的:

Installing package into ‘my path’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ggmap_2.6.1.zip'
Content type 'application/zip' length 4563151 bytes (4.4 MB)
downloaded 4.4 MB

package ‘ggmap’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    my path
> library(ggmap)
Error: package or namespace load failed for ‘ggmap’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘maps’

It used to work, then I don't know what happened and it stopped working. 它曾经可以工作,但是我不知道发生了什么,它停止了工作。 Any ideas ? 有任何想法吗 ? I tried removing the package then installing it again but it still doesn't work 我尝试删除该软件包,然后再次安装,但仍然无法正常工作

Next time when installing packages, try this: 下次安装软件包时,请尝试以下操作:

install.packages("ggmap",dependencies=TRUE)
library(ggmap)

The extra argument will make sure all the necessary dependencies are also installed. extra参数将确保还安装了所有必需的依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM