transform_to_measure {rolap} | R Documentation |
Transform to measure
Description
Transform attributes into measures.
Usage
transform_to_measure(ft, attributes, k_sep, decimal_sep)
## S3 method for class 'flat_table'
transform_to_measure(ft, attributes, k_sep = NULL, decimal_sep = NULL)
Arguments
ft |
A |
attributes |
A vector of strings, attribute names. |
k_sep |
A character, thousands separator to remove. |
decimal_sep |
A character, new decimal separator to use, if necessary. |
Details
We can indicate a thousands indicator to remove and a decimal separator to use. The only decimal separators considered are "." and ",".
Value
ft A flat_table
object.
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()
,
separate_measures()
,
transform_attribute_format()
,
transform_from_values()
,
transform_to_attribute()
,
transform_to_values()
Examples
ft <- flat_table('iris', iris) |>
transform_to_attribute(measures = "Sepal.Length", decimal_places = 2) |>
transform_to_measure(attributes = "Sepal.Length", decimal_sep = ".")
[Package rolap version 2.5.1 Index]