0

当我第一次运行 install.packages('ggplot2') 时,控制台中的输出是

####Installing package into ‘C:/Users/Amruta/OneDrive/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/ggplot2_3.3.5.zip'
Content type 'application/zip' length 4129856 bytes (3.9 MB)
downloaded 3.9 MB

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Amruta\AppData\Local\Temp\Rtmp42CIZg\downloaded_packages

但是当我尝试加载库(ggplot2)时,它抛出了一个错误

Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
 cannot open file 'C:/Users/Amruta/OneDrive/Documents/R/win-library/4.1/colorspace/R/colorspace.rdb': No such file or directory

我看到两个命令中有两条不同的路径,可能是什么原因以及如何纠正它?

4

0 回答 0