grid_dup: Duplicates of expand.grid for 2 Variables
Description
Create a vector of element positions of duplicates in the output of
expand.grid on 2 identical vectors. An efficient method of creating
combinations for 2 variables.
(optional) set to TRUE to also select the elements where the 2
items are identical. The output of expand.grid, subset to remove
duplicates with 'omit.id' set to TRUE would be the equivalent of
utils::combn(n, 2).