View source: R/flat_table_transform.R
| replace_string | R Documentation |
Transforms the given attributes by replacing the string values with the replacement value.
replace_string(ft, attributes, string, replacement)
## S3 method for class 'flat_table'
replace_string(ft, attributes = NULL, string, replacement = NULL)
ft |
A |
attributes |
A vector of strings, attribute names. |
string |
A character string to replace. |
replacement |
A replacement for matched string. |
A flat_table object.
flat_table
Other flat table transformation functions:
add_custom_column(),
remove_instances_without_measures(),
replace_empty_values(),
replace_unknown_values(),
select_attributes(),
select_instances(),
select_instances_by_comparison(),
select_measures(),
separate_measures(),
transform_attribute_format(),
transform_from_values(),
transform_to_attribute(),
transform_to_measure(),
transform_to_values()
ft <- flat_table('iris', iris) |>
replace_string(
attributes = 'Species',
string = c('set'),
replacement = c('Set')
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.