Opening a .nc file in R
11,437
You can open nc
files with the raster
package:
library("raster")
r = raster("data/nc_3B42.20060101.03.7A.HDF.Z.ncml.nc")
which can be installed in the usual way
install.packages("raster")
![Seanosapien](https://i.stack.imgur.com/O10m1.jpg?s=256&g=1)
Author by
Seanosapien
Updated on August 19, 2022Comments
-
Seanosapien almost 2 years
I am new to R Programming and am having difficulty getting a .nc file into R. I have read about 'ncdf' and 'netCDF' packages which can do this but they appear not to be recognised by R anymore. Now, I am completely lost as to what do do next. Is there a package that can do this?
The file is: shum_daily_2010-2010.nc and it is climate data.