[R-sig-Geo] SpatialGridDataFrame to netCDF via ncdf on Windows

Andy Bunn Andy.Bunn at wwu.edu
Mon Jul 26 22:29:53 CEST 2010


> -----Original Message-----
> From: Robert J. Hijmans [mailto:r.hijmans at gmail.com]
> Sent: Friday, July 23, 2010 12:31 PM
> To: Andy Bunn
> Cc: r-sig-geo at stat.math.ethz.ch
> Subject: Re: [R-sig-Geo] SpatialGridDataFrame to netCDF via ncdf on
> Windows
> 
> Andy, this should work (it requires RNetCDF) :
> 
> 
> sp = cbind(t1.sp, t2.sp)
> 
> library(raster)
> 
> b <- brick(sp)
> nc = writeRaster(b, file='test.nc')

Works great. Thanks.



More information about the R-sig-Geo mailing list