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(system.file("extdata/data", "M36NT2PM.dat", package="NAEPprimer"))

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

## End(Not run)

EdSurvey documentation built on Nov. 2, 2023, 6:25 p.m.