recodeDF: Recode collection of variables so that they all have the same...

Description Usage Arguments Details Value Author(s)

View source: R/merge_utils.R

Description

Recode collection of variables so that they all have the same unique values.

Usage

1
recodeDF(df, sPatterns, sTargets = NA, nRecodes)

Arguments

df

A dataframe to recode

sPatterns

list of regexps matching strings to be recoded

sTargets

list of targets corresponding to patterns in 'sPatterns'

nRecodes

specification for recoding numbers (see recode)

Details

This is a wrapper around recodeMatches & recode (in library(car)) for recoding all strings and numbers variables in a dataframe.

Value

a dataframe (recoded)

Author(s)

Ben Veal


vapniks/mergeutils documentation built on May 3, 2019, 4:33 p.m.