在R中运行RNetCDF库时出错

时间:2014-08-22 16:52:05

标签: r netcdf

我在安装此R包时遇到困难。它似乎安装,但然后无法运行以下错误。 type='source'也失败了。知道出了什么问题吗?

> install.packages('RNetCDF')
Installing package into ‘/Users/robinedwards/Library/R/3.1/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.ma.imperial.ac.uk/bin/macosx/mavericks/contrib/3.1/RNetCDF_1.6.2-3.tgz'
Content type 'application/x-gzip' length 2112407 bytes (2.0 Mb)
opened URL
==================================================
downloaded 2.0 Mb


The downloaded binary packages are in
    /var/folders/_s/ppznw4sx7p51kwv__hj3d8540000gn/T//RtmptxKC3g/downloaded_packages
> require(RNetCDF)
Loading required package: RNetCDF
Error : .onLoad failed in loadNamespace() for 'RNetCDF', details:
  call: NULL
  error: I/O error (udunits)

1 个答案:

答案 0 :(得分:2)

问题似乎是udunits2,RNetCDF使用而ncdf没有。具体地

>> --with-udunits-lib='/soft/local/udunits-2.1.23/lib'"

是ld.so缓存中的路径还是LD_LIBRARY_PATH中的路径?如果没有,dlload将无法找到它。

我实际上发现了几个关于此错误的线程,其中每个都涉及Mac OS X.这就是你正在运行的吗?

来源:https://stat.ethz.ch/pipermail/r-help/2011-September/289074.html

相关问题