View source: R/export-methods.R
makeSPDFfromDT | R Documentation |
Converts a data.table (or data.frame) to a SpatialPixelsDataFrame, using the columns "Lon and "Lat" to provide the spatial information.
Mostly is called by promoteToRaster
, but can be useful in and of itself.
makeSPDFfromDT(
input.data,
layers = "all",
tolerance = 0.01,
grid.topology = NULL
)
input.data |
data.table or data.frame, with columns "Lon" and "Lat" which specify the spatial data |
layers |
The columns to be selected included in the final SpatialPixelsDataFrame object. Use NULL or "all" if all layers are required. |
tolerance |
Tolerance (in fraction of gridcell size) for unevenly spaced lon and lats |
grid.topology |
A GridTopology defining the grid topology for the SpatialPixelsDataFrame object |
A SpatialPixelDataFrame
Matthew Forrest matthew.forrest@senckenberg.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.