Learn R Programming

crunch (version 1.24.0)

moveToGroup: Move entities to a group

Description

Shoji entities can be placed into groups, this is mostly used for grouping variables for display in the app, but is technically possible for any of the order catalogs. This function moves an entity to one of these groups.

Usage

moveToGroup(x, value)

moveToGroup(x) <- value

Arguments

x

VariableGroup

value

Variable, VariableCatalog subset, or Dataset subset

Value

x with the entities in value appended to it. If the containing order object has duplicates=FALSE, the entities will be "moved" to this group. Otherwise, their references will be copied to the group.

Details

The function has two versions: a regular function and a setter. They do the same thing, but the setter is probably more succinct.

Examples

Run this code
# NOT RUN {
moveToGroup(ordering(ds)[["Demographics"]]) <- ds[c("gender", "age")]
# }

Run the code above in your browser using DataLab