View source: R/showPlausibleValues.R
updatePlausibleValue | R Documentation |
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
.
updatePlausibleValue(oldVar, newVar, data)
oldVar |
a character value indicating the existing name of the variable |
newVar |
a character value indicating the new name of the variable |
data |
an |
an object of the same class as the data
argument, with the name of
the plausible value updated from oldVar
to newVar
Michael Lee and Paul Bailey
getPlausibleValue
and showPlausibleValues
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.