Monday, February 14, 2011

Installing RNetCDF (ncdf) in R

Taken from https://stat.ethz.ch/pipermail/r-help/2008-March/157089.html
This is ubuntu 10.4.

sudo apt-get install libudunits2-0 libudunits2-dev
sudo apt-get install libnetcdf4 libnetcdf-dev

Then in R :
install.packages("RNetCDF",configure.args="--with-netcdf-include=/usr/include")

Note : A regular install is unable to find netcdf.h, giving the error below. Use rather the install.packages command given above.

checking for netcdf.h... no
configure: error: netcdf header netcdf.h not found
ERROR: configuration failed for package ‘ncdf’

No comments:

Post a Comment