Out with the old in with the new

replace_names(df, oldnames, newnames)

Arguments

df

dataframe, a dataframe containing some old column names

oldnames

vector, list of column names to be replaced. Must have the same order and length as new names

newnames

vector, list of column names to replaced the old ones. Must have the same order and length as old names

Value

dataframe, dataframe with updated column names