Skip to contents

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.

Value

A flat_table object.

Details

In addition to the NA or empty values, those indicated (e.g., "-") can be considered as empty values.

Examples


iris2 <- iris
iris2[10, 'Species'] <- NA
ft <- flat_table('iris', iris2) |>
  replace_empty_values()