recodeData: Recode Datasets with Several Kinds of Missing Values

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Recode datasets with special consideration of missing values. See collapseMissings for supported types of missing values.

Usage

1
recodeData(dat, values, subunits, verbose = FALSE)

Arguments

dat

A data frame

values

A data frame with code information. See ‘Details’.

subunits

A data frame with subunit information. See ‘Details’.

verbose

Logical. If TRUE additional information is printed.

Details

recodeData recodes data frames with special consideration of missing values. recodeData will give warnings, if missing or incomplete recode informations are found. Values without recode information will not be recoded.

Examples of data frames values and subunits can be found via data(inputList).

Value

A data frame with recoded variables according to the specifications in values and subunits. The columns will be named according to the specifications in subunits$subunitRecoded.

Author(s)

Martin Hecht, Christiane Penk, Nicole Haag

See Also

aggregateData, automateDataPreparation, inputList

Examples

1
2
3
4
5
6
data(inputDat)
data(inputList)

dat1 <- inputDat[[1]]  # get first dataset from inputDat
datRec <- recodeData(dat1, inputList$values, inputList$subunits, verbose = TRUE)
str(datRec)

eatPrep documentation built on May 2, 2019, 5:20 p.m.

Related to recodeData in eatPrep...