Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)
BUILT-IN WOLFRAM LANGUAGE SYMBOL

KeyCollisionFunction

KeyCollisionFunction
is an option for JoinAcross that specifies how to handle pairs of elements that are not being joined but nevertheless have the same key.

DetailsDetails

  • Possible settings for KeyCollisionFunction include:
  • Nonedrop both elements
    Leftinclude only the left element (default)
    Rightinclude only the right element
    funcapply func to generate a pair of new keys

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

When a matching key b is not used for joining, the left value for this key is used by default:

In[1]:=
Click for copyable input
Out[1]=

Use KeyCollisionFunction to specify which value of the colliding key should be returned:

In[2]:=
Click for copyable input
Out[2]=

Generate new keys instead of a colliding key:

In[1]:=
Click for copyable input
Out[1]=

Omit colliding keys:

In[1]:=
Click for copyable input
Out[1]=

Specify which values to take for colliding keys:

In[1]:=
Click for copyable input
Out[1]=

Specifically pick the right values for colliding keys:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2015
(10.3)