Replace empty values with the unknown value
Source:R/flat_table_transform.R
replace_empty_values.Rd
Transforms the given attributes by replacing the empty values with the unknown value.
Usage
replace_empty_values(ft, attributes, empty_values)
# S3 method for flat_table
replace_empty_values(ft, attributes = NULL, empty_values = NULL)
Arguments
- ft
A
flat_table
object.- 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.
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()