powered by
Renames a variable in specified dataframe.
varRename(Data, From, To)
a dataframe object
vector of original name(s) of variable(s) as strings
vector of new name(s) of variable(s) as strings
Returns dataframe with new variable names for specified variable(s)
# NOT RUN { d = data.frame(x=1:10, y=11:20) names(d) d = varRename(d, c('x', 'y'), c('x1', 'y1')) names(d) # }
Run the code above in your browser using DataLab