updatePlausibleValue: Update Plausible Value Variable Names

View source: R/showPlausibleValues.R

updatePlausibleValueR Documentation

Update Plausible Value Variable Names

Description

Changes the name used to refer to a set of plausible values from oldVar to newVar in an edsurvey.data.frame, a light.edsurvey.data.frame, or an edsurvey.data.frame.list.

Usage

updatePlausibleValue(oldVar, newVar, data)

Arguments

oldVar

a character value indicating the existing name of the variable

newVar

a character value indicating the new name of the variable

data

an edsurvey.data.frame, a light.edsurvey.data.frame, or an edsurvey.data.frame.list

Value

an object of the same class as the data argument, with the name of the plausible value updated from oldVar to newVar

Author(s)

Michael Lee and Paul Bailey

See Also

getPlausibleValue and showPlausibleValues

Examples

## Not run: 
# read in the example data (generated, not real student data)
sdf <- readNAEP(path=system.file("extdata/data", "M36NT2PM.dat", package="NAEPprimer"))

# get the PVs before
showPlausibleValues(data=sdf)
sdf2 <- updatePlausibleValue(oldVar="composite", newVar="overall", data=sdf)
showPlausibleValues(data=sdf2)
lm1 <- lm.sdf(formula=overall ~ b017451, data=sdf2)
summary(lm1)

## End(Not run)

EdSurvey documentation built on June 27, 2024, 5:10 p.m.