View source: R/replace_values_in_dt.R
replace_values_in_dt | R Documentation |
Replace values in a data.table
replace_values_in_dt(
data = NULL,
old_values = NULL,
new_values = NULL,
silent = FALSE
)
data |
a data object (a data frame or a data.table) |
old_values |
a vector of old values that need to be replaced |
new_values |
a new value or a vector of new values that will replace the old values |
silent |
If |
replace_values_in_dt(data = mtcars, old_values = 21.0, new_values = 888)
replace_values_in_dt(data = mtcars, old_values = c(0, 1), new_values = 999)
replace_values_in_dt(
data = mtcars, old_values = c(0, 1), new_values = 990:991)
replace_values_in_dt(
data = data.table::data.table(a = NA_character_, b = NA_character_),
old_values = NA, new_values = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.