我用的是R 3.6.2,我点击顶部的packages然后选择镜像,安装我所需要的包,显示"Would you like to use a personal library instead?" 选项是“Yes or No”. 无论我选择什么,都不能安装。
选了"Yes",显示为
utils:::menuInstallPkgs()
Warning in install.packages(lib = .libPaths()[1L], dependencies = NA, type = type) :
'lib = "C:/Program Files/R/R-3.6.2/library"' is not writable
Error in install.packages(lib = .libPaths()[1L], dependencies = NA, type = type) :
unable to create ‘C:\Users\sx11y\OneDrive\??/R/win-library/3.6’
In addition: Warning message:
In dir.create(userdir, recursive = TRUE) :
cannot create dir 'C:\Users\sx11y\OneDrive\??', reason 'Invalid argument'
选了“No”,显示为
utils:::menuInstallPkgs()
Warning in install.packages(lib = .libPaths()[1L], dependencies = NA, type = type) :
'lib = "C:/Program Files/R/R-3.6.2/library"' is not writable
Error in install.packages(lib = .libPaths()[1L], dependencies = NA, type = type) :
unable to install packages
用Rstudio也是同样的结果,不能加载包。
求大神给出解释和解决方案,跪谢!