手动安装R包时会出现错误
我是R的新手。我的工作笔记本电脑有各种各样的问题。我似乎无法通过rstudio安装R,因此我决定尝试像在Python一样尝试使用文件夹手动安装软件包。这是我遵循的步骤:
我在rstudio中运行.libpath()
以确定软件包的安装位置。它返回以下内容:
[1] "\\\\lbsjsh-mp-ns1/user$/H/R/win-library/3.5"
[2] "C:/ProgramData/App-V/9053-3BB61A6E2F38/Root/R/R-3.5.0/library"
我注意到软件包在第一路径中。然后,我导航到以下网站:
project.org/web/packages/ggplot2/index.html
我下载:r-devel: ggplot2_3.3.6. zip
i然后将文件夹提取到以下目录中:“ \\ lbsjsh-mp-ns1/user $/h/r/r/win-library/3.5”
当我运行library(ggplot2)在rstudio中,我会收到以下错误:
Error: package or namespace load failed for ‘ggplot2’ in rbind(info, getNamespaceInfo(env, "S3methods")):
number of columns of matrices must match (see arg 2)
In addition: Warning message:
package ‘ggplot2’ was built under R version 4.3.0
我什至尝试通过在rstudio中键入以下zip文件来安装它:
install.packages("C:\Users\H\Downloads\ggplot2_3.3.6.zip", repos = NULL, type="binary")
但是我会收到以下错误:
Error: '\U' used without hex digits in character string starting ""C:\U"
有人知道为什么这可以 是?。任何帮助将不胜感激。
I am new to R. My work laptop has all sorts of problems. I can't seem to install R via RStudio so I decided to try to install the packages manually using the folders just as I do in Python. Here are the steps I followed:
I ran.libPaths()
in RStudio to determine where the packages are installed. It returned the following:
[1] "\\\\lbsjsh-mp-ns1/user$/H/R/win-library/3.5"
[2] "C:/ProgramData/App-V/9053-3BB61A6E2F38/Root/R/R-3.5.0/library"
I noticed that packages are in the 1st path. I then navigated to the following site:
https://cran.r-project.org/web/packages/ggplot2/index.html
I downloaded: r-devel: ggplot2_3.3.6.zip
I then extracted the folder into the following directory: "\\lbsjsh-mp-ns1/user$/H/R/win-library/3.5"
When I run library(ggplot2)
in RStudio I get the following error:
Error: package or namespace load failed for ‘ggplot2’ in rbind(info, getNamespaceInfo(env, "S3methods")):
number of columns of matrices must match (see arg 2)
In addition: Warning message:
package ‘ggplot2’ was built under R version 4.3.0
I even tried to install it using the zip file by typing the following in RStudio:
install.packages("C:\Users\H\Downloads\ggplot2_3.3.6.zip", repos = NULL, type="binary")
But I get the following error:
Error: '\U' used without hex digits in character string starting ""C:\U"
Does anyone know why this could be?. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
https://cran.r-project.org/
https://cran.r-project.org/