| process_decomp_level | R Documentation |
A helper function that filters data based on decomposition levels in the "Subtotal" column.
Used internally in get_data_by_var(), get_data_by_dims(), and group_data_by_dims().
process_decomp_level(df, subtotal_level)
df |
A data frame containing a |
subtotal_level |
Character or logical. Determines which values to retain:
|
If subtotal_level = "total", keeps only "TOTAL" values, removing all decomposed components.
If subtotal_level = "decomposed", keeps only decomposed components, removing "TOTAL".
If subtotal_level = "all", keeps both "TOTAL" and decomposed values (no filtering).
If subtotal_level = TRUE (logical), it is equivalent to "all", meaning all values are kept.
If subtotal_level = FALSE (logical), it is equivalent to "total", meaning only "TOTAL" values are kept, and decomposed components are removed.
Filtering is applied only when both "TOTAL" and decomposed values exist.
A filtered data frame based on the specified decomposition level.
Pattawee Puangchit
get_data_by_var, get_data_by_dims, group_data_by_dims
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.