View source: R/helper_functions.r
get.var | R Documentation |
This function was written because a few of the estimator functions
need to use weights, and there are several cases to handle:
the user could pass in a column name, a vector of weights, or
nothing (in which case, the weights should default to 1 for each
row in the dataset). For the special case of getting weights, look
at the curried function get.weights()
get.var(survey.data, var, default = NA)
survey.data |
The survey dataset |
var |
Either |
default |
The default value to fill in if the variable is not found |
A vector of values whose length is the same as the
number of rows in survey.data
; if var
is NULL
, this has
the default values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.