tcR (version 1.1)

apply.symm: Apply function to every pair of data frames from a list.

Description

Apply the given function to every pair in the given datalist. Function either symmetrical (i.e. fun(x,y) == fun(y,x)) or assymmetrical (i.e. fun(x,y) != fun(y,x)).

Usage

apply.symm(.datalist, .fun, ..., .diag = NA, .verbose = T)

apply.asymm(.datalist, .fun, ..., .diag = NA, .verbose = T)

Arguments

.datalist
List with some data.frames.
.fun
Function to apply, which return basic class value.
...
Arguments passsed to .fun.
.diag
Either NA for NA or something else != NULL for .fun(x,x).
.verbose
If T than output a progress bar.

Value

  • Matrix with values M[i,j] = fun(datalist[i], datalist[j])

Examples

Run this code
apply.symm(immdata, intersect, .type = 'a0e') # equivalent to intersect(immdata, 'a0e')

Run the code above in your browser using DataLab