Learn R Programming

ebirdst (version 0.3.3)

parse_raster_dates: Parse data cube layer names into dates

Description

label_raster_stack() labels the layers of a data cube with the associated week dates in the format of "wYYYY.MM.DD", because of constraints in the raster package. This function converts that character vector into an ISO compliant Date vector.

Usage

parse_raster_dates(x)

Arguments

x

Raster object; labeled Status and Trends data cube.

Value

Date vector.

Examples

Run this code
# NOT RUN {
# download and load example abundance data
sp_path <- ebirdst_download("example_data")
abd <- load_raster(sp_path, "abundance")

# parse dates
parse_raster_dates(abd)
# }

Run the code above in your browser using DataLab