isWeight {EdSurvey} | R Documentation |
Weight Test
Description
Returns logical values indicating whether a vector of variables is a weight for an edsurvey.data.frame
, a light.edsurvey.data.frame
, or an edsurvey.data.frame.list
.
Usage
isWeight(var, data)
Arguments
var |
a character vector of variables |
data |
an |
Details
Note that this function returns TRUE
only when the var
element is the name of the weight used
for making estimates but not if it is one of the individual jackknife replicates.
Value
a logical vector of values indicating if each element of var
is a weight
Author(s)
Michael Lee and Paul Bailey
Examples
## Not run:
# read in the example data (generated, not real student data)
sdf <- readNAEP(path=system.file("extdata/data", "M36NT2PM.dat", package = "NAEPprimer"))
# TRUE
isWeight(var="origwt", data=sdf)
# FALSE
isWeight(var="dsex", data=sdf)
## End(Not run)
[Package EdSurvey version 4.0.7 Index]