Description Usage Arguments Value Examples
reformats data in an array and creates a new array objects to
dimensions specified by rin
.
1 | resamplearray(a, rin, rout)
|
a |
the array object to be resampled. |
rin |
a raster object used to resample extent of 'a' to extent of 'rout'. |
rout |
a raster object with extent parameters that 'a' should be resampled to. |
an array with the same latitude and longitude as 'rout'.
1 2 3 4 5 6 7 8 9 | originalarray <- array(rnorm(100), dim=c(94,192,1464))
rin <- raster(originalarray[,,1])
extent(rin) <- c(-0.9375, 359.0625, -89.49406, 89.49406)
routm <- matrix(rnorm(10512), 73, 144)
rout <- raster(routm)
extent(rout) <- c(-1.25, 358.75, -91.25, 91.25)
newarray <- resamplearray(a, rin, rout)
dim(originalarray)
dim(newarray)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.