Description Usage Arguments Value
View source: R/dimnames_intersect.R
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.
1 | dimnames_intersect(dimnames1, dimnames2)
|
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. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.