isWeight | R Documentation |
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
.
isWeight(var, data)
var |
a character vector of variables |
data |
an |
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.
a logical vector of values indicating if each element of var
is a weight
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
isWeight(var="origwt", data=sdf)
# FALSE
isWeight(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.