grid2sp | R Documentation |
Convert a grid to a SpatialGridDataFrame object from package sp
grid2sp(grid)
grid |
A C4R grid |
This function was built based on function clim2sgdf
A sp object of the class SpatialGridDataFrame
or
SpatialPointsDataFrame
(Depending on the input grid).
If the inpurt grid contains members (member dimension) a list of Spatial*
objects is returned (each slot in the list is a member).
M. Iturbide
sp2grid
require(climate4R.datasets)
library(sp)
# Climatologies of different members:
data("CFS_Iberia_tas")
x <- grid2sp(climatology(CFS_Iberia_tas))
plot(x[1]) # Plot the first member
# Daily data:
x <- grid2sp(CFS_Iberia_tas)
plot(x[[1]][1]) # Plot the first day of the first member
data("EOBS_Iberia_tas")
x <- grid2sp(EOBS_Iberia_tas)
plot(x[1]) # Plot the first day
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.