Skip to contents

Replace values of some tibble's columns to one value

Usage

recode_values(.tbl, values, to_value, ...)

Arguments

.tbl

A tibble

values

A vector of values

to_value

A value

...

Column names

Value

A tibble with recoded values to one value

Details

If the column type is a character and the replacement a numeric, then the numeric is coerced to a character. If the column type is a numeric and the replacement is a character, then the column is coerced to character. NAs will remains NAs of the right type.