recodeData | R Documentation |
Recode datasets with special consideration of missing values. See collapseMissings
for supported types of missing values.
recodeData(dat, values, subunits = NULL, verbose = FALSE)
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 |
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)
.
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
If subunits
is not provided, item names will not be changed for recoded items.
Nicole Mahler, Karoline Sachse, Martin Hecht, Christiane Penk
scoreData
, automateDataPreparation
, inputList
data(inputDat)
data(inputList)
dat1 <- inputDat[[1]] # get first dataset from inputDat
datRec <- recodeData(dat1, inputList$values, inputList$subunits, verbose = TRUE)
str(datRec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.