convert MODIS DayOfYear to the exact compositing date.

getRealDate(date, DayOfYear)

Arguments

date

Date vector, the first day of the 16-day composite period.

DayOfYear

Numeric vector, exact composite day of year.

Value

A data.table with a new column t, which is the exact compositing date.

Examples

library(phenofit)
#> Error in library(phenofit): there is no package called ‘phenofit’
data("MOD13A1")
#> Warning: data set ‘MOD13A1’ not found
df <- MOD13A1$dt
#> Error in eval(expr, envir, enclos): object 'MOD13A1' not found
df$t <- getRealDate(df$date, df$DayOfYear)
#> Error in df$date: object of type 'closure' is not subsettable