replace_empty_values {rolap} | R Documentation |
Replace empty values with the unknown value
Description
Transforms the given attributes by replacing the empty values with the unknown value.
Usage
replace_empty_values(ft, attributes, empty_values)
## S3 method for class 'flat_table'
replace_empty_values(ft, attributes = NULL, empty_values = NULL)
Arguments
ft |
A |
attributes |
A vector of names. |
empty_values |
A vector of values that correspond to empty values. |
Details
In addition to the NA or empty values, those indicated (e.g., "-") can be considered as empty values.
Value
A flat_table
object.
See Also
Other flat table transformation functions:
add_custom_column()
,
remove_instances_without_measures()
,
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_measure()
,
transform_to_values()
Examples
iris2 <- iris
iris2[10, 'Species'] <- NA
ft <- flat_table('iris', iris2) |>
replace_empty_values()
[Package rolap version 2.5.1 Index]