pairwise.fun | R Documentation |
The function computes pairwise values for a given function.
pairwise.fun(x, g, fun, ...)
x |
numeric vector. |
g |
grouping vector or factor |
fun |
some function where the first two arguments have to be numeric vectors for which the function computes some quantity; see example section below. |
... |
additional arguments to fun. |
The function computes pairwise values for a given function.
The implementation is in certain aspects analogously to
pairwise.t.test
.
Vector with pairwise function values.
Matthias Kohl Matthias.Kohl@stamats.de
pairwise.t.test
, pairwise.fc
,
pairwise.logfc
, pairwise.auc
set.seed(13) x <- rnorm(100) g <- factor(sample(1:4, 100, replace = TRUE)) levels(g) <- c("a", "b", "c", "d") pairwise.fun(x, g, fun = function(x, y) t.test(x,y)$p.value) ## in contrast to pairwise.t.test(x, g, p.adjust.method = "none", pool.sd = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.