View source: R/interp_phenology.R
interp_phenology | R Documentation |
perform constant interpolation of phenology factor codes( ginc, gmax, gdec, gmin ). That is, fill phenology transition status forward until the value changes, resulting in a ginc, gmax, gdec, or gmin value at all timestamps.
interp_phenology(phen, dates)
phen |
data frame with variables date (chron), phen (factor with levels ginc, gdec, gmin, gmax) |
dates |
chron; dates to fill in. |
The interpolation converts the factors to numeric codes 1 to 4 – this code creates a dictionary and maps them back, preserving their factor status for readability.
phen filled to the dates in dates
Timothy W. Hilton
data(Park_Falls)
interpolated_phen <- interp_phenology(phen=PFa_phen,
dates=PFa_tower_obs[['date']])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.