genGetDates | R Documentation |
genGetDates
extracts the date of one or several images when the name
of the layer includes the date in the "YYYYJJJ
" format.
genGetDates(str, ...)
str |
|
... |
arguments for nested functions:
|
The function reads a date from a character
class object in year-julian
("YYYYJJJ
") format and returns a Date
class object.
a Date
class object with the date of the image or character
class,
if format
argument is used.
img <- matrix(1:16, ncol = 4, byrow = TRUE) r <- raster(img) names(r) <- c("RandomImage_2018034") spplot(r) genGetDates(names(r), format = "%Y%j")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.