我在用 R 编程语言安装任何包时遇到问题。
install.packages("nnet")
按回车键运行上述代码后,得到以下结果:
Installing package into `‘C:/Users/Acer/Documents/R/win-library/3.4’`
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file `(cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv');` using local file `'C:/PROGRA~1/R/R-34~1.2/doc/CRAN_mirrors.csv'`
> Warning: unable to access index for repository
> https://ftp.iitm.ac.in/cran/src/contrib: cannot open URL
> 'https://ftp.iitm.ac.in/cran/src/contrib/PACKAGES' Warning: unable to
> access index for repository
> https://ftp.iitm.ac.in/cran/bin/windows/contrib/3.4: cannot open URL
> 'https://ftp.iitm.ac.in/cran/bin/windows/contrib/3.4/PACKAGES' Warning
> messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
InternetOpenUrl failed: 'The connection with the server was reset'
2: package ‘nnet’ is not available (for R version 3.4.2)
我无法解决这个问题。请问有人可以帮我解决这个问题吗?
尝试以管理员身份运行。我需要以管理员身份运行 RGui 来安装软件包(在 Windows 10 上使用 RGui 4.3.1)。
其他一切都无需管理员访问权限即可运行,但显然访问存储包的文件夹需要管理员访问权限。