change_colnames: Change column names of a dataframe

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Change column names of a dataframe

Usage

1
change_colnames(df, current_names, new_names)

Arguments

df

Dataframe

current_names

Vector of column names to change.

new_names

Vector of new names.

Value

Dataframe with new column names

Examples

1
2
df <- data.frame(A = 1:2, B = 3:4, C = 5:6)
df <- change_colnames(df, c("A", "C"), c("Aa", "Cc"))

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.