export-methods | R Documentation |
Functions to coerce Fields and Comparisons into other objects (data.frame, data.table, Raster* objects)
## S3 method for class 'Field'
as.data.frame(x, row.names, optional, ...)
## S3 method for class 'Comparison'
as.data.frame(x, row.names, optional, ...)
## S3 method for class 'Field'
as.data.table(x, keep.rownames, ...)
## S3 method for class 'Comparison'
as.data.table(x, keep.rownames, ...)
as.Raster(x)
## S4 method for signature 'Field'
as.Raster(x)
## S4 method for signature 'Comparison'
as.Raster(x)
as.SpatRaster(x)
as.SpatRasterDataset(x)
## S4 method for signature 'Field'
as.SpatRaster(x)
## S4 method for signature 'Field'
as.SpatRasterDataset(x)
## S4 method for signature 'Comparison'
as.SpatRasterDataset(x)
as.array(x, ...)
## S4 method for signature 'Field'
as.array(x, ...)
x |
A Field or a Comparison object |
row.names |
NULL or a character vector giving the row names for the data frame. Missing values are not allowed. |
optional |
logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional. Note that all of R's base package as.data.frame() methods use optional only for column names treatment, basically with the meaning of data.frame(*, check.names = !optional). |
... |
Just as ... in data.frame. Usual recycling rules are applied to vectors of different lengths to create a list of equal length vectors. |
keep.rownames |
If ... is a matrix or data.frame, TRUE will retain the rownames of that object in a column named rn. |
Note that for coercing to a Raster* object (RasterLayer or RasterBrick) the function is called "as.Raster" (capital "R") to avoid conflict with another function in the raster package called "as.raster"
Either a single array or a list of arrays, depending on if the input Field had one layer or multiple layers
Matthew Forrest matthew.forrest@senckenberg.de, Joerg Steinkamp joerg.steinkamp@senckenberg.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.