View source: R/change_var_names.R
| change_var_names | R Documentation | 
Change variable names in a data set
change_var_names(
  data = NULL,
  old_var_names = NULL,
  new_var_names = NULL,
  skip_absent = FALSE,
  print_summary = TRUE,
  output_type = "dt"
)
data | 
 a data object (a data frame or a data.table)  | 
old_var_names | 
 a vector of old variable names (i.e., variable names to change)  | 
new_var_names | 
 a vector of new variable names  | 
skip_absent | 
 If   | 
print_summary | 
 If   | 
output_type | 
 type of the output. If   | 
a data.table object with changed variable names
change_var_names(
mtcars, old = c("mpg", "cyl"), new = c("mpg_new", "cyl_new"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.