Description Usage Arguments Value References See Also Examples
Convert objects to raster objects
1 2 3 4 5 |
x |
object |
... |
additional parameters to |
make.360 |
logical; should trends be in the range [0,360] rather than [-180,180]? |
transpose |
logical; should the x and y coordinates be swapped? |
no.zt |
logical; should the Z and T dimensions be excluded from the resulting object? |
A RasterBrick
object
https://cran.r-project.org/web/packages/raster/vignettes/Raster.pdf
read.msatsi_summary_ext
, brick
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | require(raster)
require(viridis)
# dummy example
n <- 20
.x <- seq_len(n)
.sc <- 5
.asp <- 1/.sc
.y <- .sc*.x
xy <- expand.grid(x=.x, y=.y)
.t <- seq_len(nrow(xy))
z <- cos(.t*pi/90 + pi/6)**2
D <- data.frame(X=xy$x, Y=xy$y, Z=z, T=0, TR1=10, TR2=20, TR3=40)
class(D) <- c("msatsi_summary_ext", 'data.frame')
# Create the rasters (RasterBrick to be specific):
print(RB <- to_raster(D))
# extract certain layers
r.z <- raster::raster(RB, 'Z')
all.equal(r.z, raster::raster(RB, layer=1))
plot(r.z, col=viridis(n), zlim=c(0,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.