separate_measures {rolap} | R Documentation |
Separate measures in flat tables
Description
Separate groups of measures into different flat tables. For each group we must indicate a name. If we indicate more names than groups of measures, the measures not included in other groups are also included in a new group.
Usage
separate_measures(ft, measures, names, na_rm)
## S3 method for class 'flat_table'
separate_measures(ft, measures = NULL, names = NULL, na_rm = TRUE)
Arguments
ft |
A |
measures |
A list of string vectors, groups of measure names. |
names |
A list of string, measure group names. |
na_rm |
A boolean, remove rows from output where all measure values are NA. |
Details
A list of flat tables is returned. It assign the names to the result list.
Value
A list of flat_table
objects.
See Also
Other flat table transformation functions:
add_custom_column()
,
remove_instances_without_measures()
,
replace_empty_values()
,
replace_string()
,
replace_unknown_values()
,
select_attributes()
,
select_instances_by_comparison()
,
select_instances()
,
select_measures()
,
transform_attribute_format()
,
transform_from_values()
,
transform_to_attribute()
,
transform_to_measure()
,
transform_to_values()
Examples
lft <- flat_table('iris', iris) |>
separate_measures(
measures = list(
c('Petal.Length'),
c('Petal.Width'),
c('Sepal.Length')
),
names = c('PL', 'PW', 'SL', 'SW')
)