Description Usage Arguments Details Value Examples
View source: R/genMissionGetDates.R
modGetDates
reads the official name of MODIS images and returns its
capturing date, as Date
class object.
1 |
str |
the full path(s) or official name(s) of MODIS images from which the capturing date is retrieved. |
... |
arguments for nested functions:
|
The function works with file names (or their paths) regardless of their
extension. The function accepts more than on file path, which can be passed
as a list
of characters
. Dates are returned as
'YYYY-mm-dd
' by default. If another format is required, it can be
modified through the argument format
.
a Date
class object with the date of the MODIS image or character
class,
if format
argument is used.
1 2 3 4 5 6 7 8 | # getting the capturing date from the name of a MODIS image
file.mod <- 'MYD13A2.A2016361.h17v04.006.2017285133407.hdf'
modGetDates(file.mod)
# a list of the full file paths of MODIS images, mixing .hdf and .tif files
file.mod<-list('MYD13A2.A2013297.h17v04.006.2015269230726.hdf',
'MYD13A2.A2013313.h17v04.006.2015271071143.tif')
modGetDates(file.mod, format = "%Y%j")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.