label_raster_stack | R Documentation |
The data cubes are saved as GeoTIFFs, which don't allow for band labels. For convenience, this function labels the layers of a data cube once it has been loaded with the week dates for each band.
label_raster_stack(x, weeks = NULL)
x |
|
weeks |
vector of dates corresponding to the weeks of each layer in |
A RasterStack
or RasterBrick
with names assigned for the dates in
the format of "wYYYY.MM.DD" per raster package constraints. The Raster*
objects do not allow the names to start with a number, nor are they allowed
to contain "-", so it is not possible to store the date in an ISO compliant
format. Use parse_raster_dates()
to convert the layer names to dates.
## Not run: # download example data path <- ebirdst_download("example_data") # or get the path if you already have the data downloaded path <- get_species_path("example_data") # weekly relative abundance # note that only low resolution (lr) data are available for the example data abd <- load_raster(path, "abundance", resolution = "lr") # label abd <- label_raster_stack(abd) names(abd) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.