Fast correlation calculation

fast_cor(totu, totu2 = NULL, method = c("pearson", "spearman"))

Arguments

totu

t(otutab), row are samples, column are features.

totu2

t(otutab) or NULL, row are samples, column are features.

method

"spearman" or "pearson"

Value

a list with 2 elements:

r

default: spearman correlation

p.value

default: p-value of spearman correlation

See also

Other calculate: c_net_calculate(), cal_sim(), p.adjust.table(), read_corr()

Examples

data("otutab", package = "pcutils")
t(otutab[1:100, ]) -> totu
fast_cor(totu, method = "spearman") -> corr