Learn R Programming

crunch (version 1.14.4)

dedupeOrder: Remove duplicated entites from an order/group

Description

This function recurses through a ShojiOrder/OrderGroup and removes any duplicate entities. As with the default of duplicated, the first appearance of an entity is kept, and subsequent occurences are marked as duplicated and removed. (Unlike duplicated, however, there is no option to reverse that order.) "First" occurence of an entity is determined by the function's recursion: within each group, nested groups are processed first, in order, and recursively their nested groups are processed. See the test suite, in test-variable-order.R, for an example that illustrates which entities are dropped as duplicate.

Usage

dedupeOrder(x)

Arguments

x
VariableOrder, DatasetOrder, VariableGroup, or DatasetGroup

Value

x with duplicate entities removed.

See Also

duplicates, which when set to FALSE also calls this function.