【问题标题】:Unable to install and load packages无法安装和加载包
【发布时间】:2014-09-18 08:21:07
【问题描述】:

我最近将 R 和 Rstudio 下载到我的计算机上。

当我尝试安装包 ncdf(或任何包)时,我收到以下消息:

> install.packages("ncdf")
Installing package into ‘C:/Users/Talos/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/ncdf_1.6.7.zip'
Content type 'application/zip' length 358300 bytes (349 Kb)
opened URL
downloaded 349 Kb

package ‘ncdf’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Talos\AppData\Local\Temp\RtmpKuMfwR\downloaded_packages

> load("ncdf")
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
  cannot open compressed file 'ncdf', probable reason 'No such file or directory'

我已经尝试进入文件夹并手动解压缩文件,这似乎没有任何区别。

有什么解决方案让我可以安装、加载和使用包?

【问题讨论】:

    标签: r installation packages rstudio netcdf


    【解决方案1】:

    你想要library 而不是load。请阅读帮助文件? library 和? load 了解更多信息。

    【讨论】:

    • 天哪。你必须喜欢 SO 投票系统。为正确答案 +1。
    猜你喜欢
    • 1970-01-01
    • 2013-10-31
    • 2017-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-04
    • 1970-01-01
    相关资源
    最近更新 更多