scoreData {eatPrep} | R Documentation |
Score datasets with special consideration of missing values.
scoreData(dat, unitrecodings, units, verbose = FALSE)
dat |
A data frame |
unitrecodings |
A data frame with information about the scoring of units. See ‘Details’. |
units |
A data frame with unit information. See ‘Details’. |
verbose |
logical. If |
This function is very similar to recodeData
, but with a few defaults that are better suited for scoring. scoreData
will give warnings when incomplete scoring informations are found. Values without scoring information will not be scored.
Examples of data frames unitrecodings
and units
can be found via data(inputList)
.
A data frame with scored variables according to the specifications in unitrecodings
and units
.
Nicole Haag
recodeData
, automateDataPreparation
, inputList
data(inputDat) data(inputList) prepDat <- automateDataPreparation (inputList = inputList, datList = inputDat, readSpss = FALSE, checkData=FALSE, mergeData = TRUE, recodeData=TRUE, aggregateData=TRUE, scoreData= FALSE, writeSpss=FALSE, verbose = TRUE) datSco <- scoreData(prepDat, inputList$unitRecodings, inputList$units, verbose = TRUE) str(datSco)