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
.
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.
Examples
if (FALSE) { # \dontrun{
# 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)
} # }