dimnames_intersect: Intersect the dimension-names of two arrays.

Description Usage Arguments Value

View source: R/dimnames_intersect.R

Description

When a part of one array should be extracted and included into another array, one might need to use an intersection of the dimension-names approach to figure out the correct argument to be used by restrict_array. Note that the order of the arguments does matter, since it's dimnames1 that decides the format of the resulting intersection. Warning: The result of this function can be an empty list, so keep in mind that your code can deal with that if you want to use this in a function.

Usage

1
dimnames_intersect(dimnames1, dimnames2)

Arguments

dimnames1

The dimension names of the first array, the order of the names of the dimension-names of the result will be decided by this.

dimnames2

The dimension names of the second array.

Value

A list with the common parts from dimnames1 and dimnames2 is returned. The result will an empty list when no dimension-names are common, but it will also be empty if a common dimension-name has no common values stored.


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