change_names.Rd
Change the variable names of a data.frame
change_names(x, from, to, must_have=TRUE)
data.frame
column names to be changed
what column names need to be changed to
logical. Give an error of one of the names is not present or duplicated
d <- data.frame(x=1:3, y=3:5, z=10:12) change_names(d, c("y", "z"), c("B", "C")) #> x B C #> 1 1 3 10 #> 2 2 4 11 #> 3 3 5 12