fixMultCols: Easily replace multiple columns at the same time.

Description Usage Arguments

View source: R/advanced_R_studies.R

Description

Takes in a dataframe, and returns the same dataframe with corrected columns.

Example:
countryCols <- c("origin", "transit", "destination")
df <- fixMultCols(df, countryCols, "Untied States", "United States")

Usage

1
fixMultCols(df, cols, old, new)

Arguments

df

The dataframe you wish to correct.

cols

The names of the columns you wish to correct.

old

The text you want to replace.

new

The text you want to appear in place of the old text.


C-Research/c4aRs documentation built on Sept. 2, 2021, 1:10 p.m.