extractDateFilename {phenopix} | R Documentation |
Estract dates from filenames
Description
This function extracts dates from filenames.
Usage
extractDateFilename(filename, date.code)
Arguments
filename |
The filename where to retrieve time stamp |
date.code |
The format of your date in filename, see details. |
Details
This function allows the extraction of the date (hour, doy, dayfract) from the filename. The only mandatory rules are (1) that site name come first and date after and (2) sitename and date must be separated by an underscore. In date.code provide the format of your date, using lower letters for year (y) month (m) and day (d) and upper letters for hour (H) and minute (M). As an example: If your file is named: 'sitename_2012_03_03_15-30.jpg' than your date.code is "yyyy_mm_dd_HH-MM". If your file is named 'sitename_12.03.03.1530.jpg' than your date.code is "yy.mm.dd.HHMM" If hours and minutes are missing in your filename, convertion defaults to 12:00.
Value
A POSIX string containing date,Hour,DOY,DOY.dayfract of the entire images time series
Author(s)
Edoardo Cremonese <e.cremonese@arpa.vda.it>