Skip to contents

Add elements from y to x only if they do not yet exist in x. Without names, just x is returned.

Usage

mix_and_match_lists(x, y)

Arguments

x, y

Named lists.

Value

The merged list.

Examples

rock::mix_and_match_lists(
  list(a=1, b=4, c=7),
  list(b=9, d=9)
);
#> $a
#> [1] 1
#> 
#> $b
#> [1] 4
#> 
#> $c
#> [1] 7
#> 
#> $d
#> [1] 9
#>