addSubvariable: Add subvariable to an array

Description Usage Arguments Value See Also Examples

View source: R/add-subvariable.R

Description

Add subvariable to an array

Usage

1
2
3
addSubvariable(variable, subvariable)

addSubvariables(variable, subvariable)

Arguments

variable

the array variable to modify

subvariable

the subvariable to add, or a list of those to add, or a dataset subset. You can supply variables, variable definitions or lists of variables and variable definitions.

Value

variable with the indicated subvariables added.

See Also

subvariables()

Examples

1
2
3
4
5
## Not run: 
ds$allpets <- addSubvariable(ds$allpets, ds$allpets_4)
ds$petloc <- addSubvariables(ds$petloc, ds[c("petloc_school", "petloc_daycare")])

## End(Not run)

crunch documentation built on April 6, 2021, 1:05 a.m.