rename_values_base: Replace/rename values in a vector

View source: R/rename.R

rename_values_baseR Documentation

Replace/rename values in a vector

Description

This function replaces character values with new character values, which is useful when performing rename operations when values are held in character vectors.

Usage

rename_values_base(
  x,
  ...,
  default_value = x,
  warn_missing = TRUE,
  warn_duplicated = TRUE
)

Arguments

x

Vector of values to replace

...

Key/value pairs in the form oldvalue="newvalue"

default_value

A vector of values to use as the default should the value not be found in ...

warn_missing

Print a message if any old names are not actually present in x

warn_duplicated

Print a message if any name appears more than once in x after the operation.

Value

A vector with values replaced


paleolimbot/mudata documentation built on Oct. 3, 2023, 10:03 a.m.