Skip to contents

Transforms the given attributes by replacing the string values with the replacement value.

Usage

replace_string(ft, attributes, string, replacement)

# S3 method for flat_table
replace_string(ft, attributes = NULL, string, replacement = NULL)

Arguments

ft

A flat_table object.

attributes

A vector of strings, attribute names.

string

A character string to replace.

replacement

A replacement for matched string.

Value

A flat_table object.

Examples


ft <- flat_table('iris', iris) |>
  replace_string(
    attributes = 'Species',
    string = c('set'),
    replacement = c('Set')
  )