Description Usage Arguments Value Author(s) See Also Examples
View source: R/ezcor_partial_cor.R
Run partial correlation
1 2 3 4 5 6 7 8 9 10 11 |
data |
a 'data.frame' containing variables |
split |
whether perform correlation grouped by a variable, default is 'FALSE' |
split_var |
a 'character', the group variable |
var1 |
a 'character', the first variable in correlation |
var2 |
a 'character', the second variable in correlation |
var3 |
a 'character' or 'character vector', the third variable in correlation |
cor_method |
method="pearson" is the default value. The alternatives to be passed to cor are "spearman" and "kendall" |
sig_label |
whether add symbal of significance. P < 0.001,"***"; P < 0.01,"**"; P < 0.05,"*"; P >=0.05,"" |
... |
other arguments passed to methods |
a 'data.frame'
Yi Xiong
ppcor::pcor.test() which this function wraps.
1 2 3 4 5 6 7 8 9 10 11 12 | data("exprSet", package = "ezcor", envir = environment())
g1 <- colnames(exprSet)[3]
g2 <- colnames(exprSet)[4]
g3 <- colnames(exprSet)[c(5,6)]
res <- ezcor::ezcor_partial_cor(data = exprSet,
var1 = g1,
var2 = g2,
var3 = g3,
split = TRUE,
split_var = "tissue",
cor_method = "pearson",
sig_label = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.