expand.grid.lower: expand.grid(), but just lower-triange comparisions

View source: R/misc.R

expand.grid.lowerR Documentation

expand.grid(), but just lower-triange comparisions

Description

This is useful when you want pairwise comparisons, but you don't need the reciprical ('a' <=> 'b' & 'b' <=> 'a').

Usage

expand.grid.lower(x, y, diag = FALSE)

Arguments

x

a vector

y

a vector

diag

include same-same comparisons ('a' <=> 'b')?

Value

a data.frame of all non-reciprical comparisons

Examples

expand.grid.lower(1:3, 1:3)
expand.grid.lower(1:3, 1:3, diag=TRUE)

leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.