.appendDateFeatures | R Documentation |
Appends date features to data frame. Creates new column 'date' based on var if date is not already in the data frame. The newly created (or existing) date column is truncated to day. Columns for year, day of year (doy), decimal year (dyear), and month are added based on date. This function relies on smwrBase::baseDay and smwrBase::baseDay2decimal for doy and decimal year.
The baseDay and baseDay2decimal functions have been added to this package from smwrBase package.
.appendDateFeatures(df, var = "date")
df |
data frame |
var |
variable with stored date |
Returns data frame with appended date features including year, doy, decimal year, and month
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.