Learn R Programming

crunch (version 1.14.4)

addSubvariable: Add subvariable to an array

Description

Add subvariable to an array

Usage

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

Value

variable with the indicated subvariables added.

Examples

Run this code
## Not run: 
# ds$allpets <- addSubvariable(ds$allpets, ds$allpets_4)
# ds$petloc <- addSubvariables(ds$petloc, ds[c("petloc_school", "petloc_daycare")])
# ## End(Not run)

Run the code above in your browser using DataLab