rename.variables | R Documentation |
easier way to rename variables over base r. give a new name and old name (or a vector of new and old names) and this function will change them in the dataset
rename.variables(data, newname, oldname = NULL)
data |
dataframe containing names to convert |
newname |
list of new names that you want for the data frame, if you do not want to change the name of every column then a vector of old names the same length as this should als be supplied |
oldname |
a vector of old names the same length as newname which will do a 1:1 match for replacement. if left blank all column names will be relpace (i.e. newname should be a vector the name length as ncol(data)) |
rename.variables_function()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.