dimnames_union: Create the union of a list of dimension-names.

Description Usage Arguments Value

View source: R/dimnames_union.R

Description

This function will from a list of disjoint dimension-names (for a set of sub-arrays) create a single dimension-name to be used for an array that can be used to store the stuff from the sub-arrays.

Usage

1
dimnames_union(dimnames_list, .restrict_list = list())

Arguments

dimnames_list

The list of dimension-names, which must all contain the same names at the top level. The "degenerate" case where the list has length one will be accepted, in order to avoid specification of exceptional cases when this function is used for programming purposes.

.restrict_list

A list of restrictions, default value list(), that can be used in order to shrink the resulting union to the specified range for the given dimensions. Dimensions that are not included in .restrict_list will stay untouched, and dimensions not present in dimnames_list will be ignored.

Value

A set of dimension-names based on those from dimnames_list. Any dimensions that corresponds to numerical values will be sorted in numerical order instead of lexicographical order.


LAJordanger/leanRcoding documentation built on Feb. 27, 2020, 4:42 p.m.