apply_transformation | R Documentation |
Transform data based on model table
apply_transformation( raw_data = NULL, model_table = NULL, trans_df = NULL, pool_var = NULL, verbose = FALSE )
raw_data |
|
model_table |
|
trans_df |
|
pool_var |
string specifying the pool variable name (e.g. 'country') |
verbose |
A boolean to specify whether to print warnings |
Transform data based on the model table by applying the transformation functions (e.g. decay
, diminish
, lag
, and ma
) with the specified parameters to the respective variable
data.frame
of raw_data with added transformed variables
pooled_data = read_xcsv( verbose = FALSE, file = "https://raw.githubusercontent.com/paladinic/data/main/pooled%20data.csv") model_table = build_model_table('christmas') model_table['decay'] = '0.5' trans_data = apply_transformation( raw_data = pooled_data, model_table = model_table, pool_var = 'country')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.