[R] Help asked for automated generation of ncdf variables
dpierce at ucsd.edu
Tue Jun 29 17:57:51 CEST 2010
> Date: Wed, 16 Jun 2010 17:53:56 +0200
> From: "Adolf STIPS" <adolf.stips at jrc.ec.europa.eu>
> I'm using the "ncdf" library for creating ncdf files.
> But I need to create about 100 variables per file (e.g. single rivers),
> So I do not like to create each variable separately.
> Unfortunately I found no way to make this work, as I'm unable to create a
> correct list of class "var.ncdf".
the var.def.ncdf() call returns an object of class var.ncdf. Since
objects are lists, you can't assign them to arrays. However, you can
easily assign them to other lists. So instead of this:
> #class(river[iriv]) ="var.ncdf"
> river[iriv] = riv
Try something this:
river = list()
> river[[iriv]] = riv
More information about the R-help