In addition than to create multi-layer rasters from files, the functions stack and brick can also be used to create multi-layer rasters (RasterBrick object) from single layer rasters (RasterLayer objects).
EXAMPLE
Below an example where two single layers (single layer SPPC rasters for individual year seasons) are combined into a raster brick. Then names are assigned to the individual layers using the function names from the 'raster' package.
This example is taken from the “Effects of Cyclone Yasi on Green Cover at Mission Beach” tutorial. Putting the code snippets in context, by looking at a broader section of the R script, could be beneficial. Boxes with grey background contain code snippets, and boxes with white background containt code (text) outputs.
|
|