allCombApply: apply a function to all combination of columns

Description Usage Details Value Examples

View source: R/transform.R

Description

allCombApply applies a function to all combination of columns

Usage

1
allCombApply(inmat, FUN, ...)

Details

FUN should have two (vector) parameters such as function(v1, v2) {cor(v1, v2)}

Value

data.frame (or vector) with (n*(n-1)/2) columns (or elements)

Examples

1
allCombApply(matrix(c(1, 2, 3, 4, 5, 6, 7, 8), nrow = 2), function(v1, v2) {v1-v2})

vh-d/VHtools documentation built on May 3, 2019, 6:11 p.m.