Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extractDateFilename

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>


phenopix

Process Digital Images of a Vegetation Cover

v2.4.2
GPL-2
Authors
Gianluca Filippa, Edoardo Cremonese, Mirco Migliavacca, Marta Galvagno, Matthias Folker, Andrew D. Richardson, Enrico Tomelleri
Initial release
2020-09-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.