Learn R Programming

crunch (version 1.30.4)

is.weight<-: Dataset weights

Description

weight lets you view and set your user's currently applied weight on the server. weightVariables lets you view all of the variables that have been designated as valid to use as weights.

Usage

is.weight(x) <- value

weight(x)

weight(x) <- value

# S4 method for Analysis,CrunchVariable weight(x) <- value

# S4 method for Analysis,`NULL` weight(x) <- value

# S4 method for CrunchDataset weight(x)

# S4 method for CrunchDataset,ANY weight(x) <- value

is.weight(x)

# S4 method for NumericVariable is.weight(x) <- value

Value

For the weight getter, a Variable if there is a weight, else NULL. For the setter, x, modified accordingly. weightVariables returns the aliases (or names, according to options(crunch.namekey.dataset)), of the variables designated as weights.

Arguments

x

a Dataset

value

a Variable, VariableDefinition, or NULL. If a VariableDefinition is passed, the variable will first be created and then set as the datasets weight. Set to NULL to remove existing weights from the dataset.

See Also

weightVariables() makeWeight()