scoreData {eatPrep}R Documentation

Score Datasets with Several Kinds of Missing Values

Description

Score datasets with special consideration of missing values.

Usage

scoreData(dat, unitrecodings, units, verbose = FALSE)

Arguments

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 TRUE additional information is printed.

Details

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).

Value

A data frame with scored variables according to the specifications in unitrecodings and units.

Author(s)

Nicole Haag

See Also

recodeData, automateDataPreparation, inputList

Examples

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)


[Package eatPrep version 0.2.13 Index]