View source: R/showPlausibleValues.R
hasPlausibleValue | R Documentation |
Returns a value indicating if this variable has associated plausible values in an edsurvey.data.frame
, a light.edsurvey.data.frame
, or an edsurvey.data.frame.list
.
hasPlausibleValue(var, data)
var |
a character indicating the variable in question |
data |
an |
This function returns TRUE
only when the variable passed to it is the name for a set of plausible values but
not if it is an individual plausible value from such a set. Thus, on the NAEP Primer, composite
has plausible
values (and so TRUE
would be returned by this function), but any of the plausible values or variable names defined in
the actual data (such as "mrpcm1"
or "dsex"
) are not.
a Boolean (or vector when var
is a vector) indicating if each element of var
has
plausible values associated with it
Michael Lee and Paul Bailey
## Not run:
# read in the example data (generated, not real student data)
sdf <- readNAEP(path=system.file("extdata/data", "M36NT2PM.dat", package = "NAEPprimer"))
# TRUE
hasPlausibleValue(var="composite", data=sdf)
# FALSE
hasPlausibleValue(var="dsex", data=sdf)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.