process_decomp_level {HARplus}R Documentation

Process Decomposition Levels in Data Frames (Internal)

Description

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().

Usage

process_decomp_level(df, subtotal_level)

Arguments

df

A data frame containing a "Subtotal" column.

subtotal_level

Character or logical. Determines which values to retain:

  • "total": Keeps only "TOTAL" values.

  • "decomposed": Keeps only decomposed values (excludes "TOTAL").

  • "all": Keeps all rows.

  • TRUE: Equivalent to "all" (keeps both "TOTAL" and decomposed values).

  • FALSE: Equivalent to "total" (keeps only "TOTAL" values, removing decomposed components).

Details

Value

A filtered data frame based on the specified decomposition level.

Author(s)

Pattawee Puangchit

See Also

get_data_by_var, get_data_by_dims, group_data_by_dims


[Package HARplus version 1.0.1 Index]