clim2sgdf | R Documentation |
Convert a climatological climate4R grid to a SpatialGridDataFrame object from package sp. See details.
clim2sgdf(clim, set.min = NULL, set.max = NULL)
clim |
A climatological grid, as returned by function |
set.min |
Minimum value, as passed by |
set.max |
Maximum value, as passed by |
This function is intended for internal usage by spatialPlot
,
that accepts all possible arguments that can be passed to spplot
for plotting.
However, it may be useful for advanced sp users in different contexts
(e.g. for reprojecting via spTransform
etc.).
Note that the function can be only applied to “climatological” climate4R grids, i.e., grids
whose time dimension is a singleton, typically after the application of function
climatology
, although not necessarily so.
A sp object of the class SpatialGridDataFrame
J. Bedia
climatology
, spatialPlot
sgdf2clim
, to perform the reverse operation
require(climate4R.datasets)
data("CFS_Iberia_tas")
# Climatology is computed:
clim <- climatology(CFS_Iberia_tas, by.member = TRUE)
sgdf <- clim2sgdf(clim, NULL, NULL)
class(sgdf)
sp::spplot(sgdf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.