read_vars_from_cdf.Rd
Read all variables from a netCDF file
read_vars_from_cdf(vardef, vars = as.character(c()), offset = NULL, count = NULL, extra_dims = NULL, as.data.frame = FALSE)
vardef | A variable definition, constructed
using the following syntax:
<filename>::<variables_or_bands>
where A limited amount of transformation can be specified by adding extra characters to the band number or variable name:
A complete example is:
In this example, band 1 is read from the file. NODATA values
are replaced with zero, and all values are negated. The values
are read into a variable called |
---|---|
vars | A list of variables to read. If NULL (default), all variables will be read. |
offset | Specifies dimension-wise (X, Y, ...) offsets
from the upper-left corner of the raster
(xmin, ymax) from which reading should begin.
A value of c(1,1) refers to the corner cell
itself (i.e., there is no offset). This
follows the convention of the |
count | Specifies dimension-wise (X, Y, ...) numbers of
cells to read, beginning at the origin cell
specified by |
extra_dims | list containing names and values of extra dimensions
along which a values at a single point should be extracted, e.g.
|
as.data.frame | return data in a data frame |
structure described in read_vars
, or a data frame