get_seasonality | R Documentation |
generate seasonality variables
get_seasonality( data, date_col_name, date_type = "weekly starting", verbose = FALSE, keep_dup = FALSE, pool_var = NULL )
data |
|
date_col_name |
The date column name as a string |
date_type |
The date column type as either of the following strings:'weekly starting','weekly ending','daily' |
verbose |
A boolean to specify whether to print warnings |
keep_dup |
A boolean to specify whether to keep duplicate columns between seasonal and data |
pool_var |
The pool (group) column name as a string (e.g. 'country') |
generate seasonality variables from a data.frame
containing a date-type variable.
data.frame
with added variables
read_xcsv("https://raw.githubusercontent.com/paladinic/data/main/ecomm_data.csv") %>% get_seasonality(date_col_name = 'date')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.