c_net_calculate: Calculate correlation for one or two t(otutab), or distance...

View source: R/calculate.R

c_net_calculateR Documentation

Calculate correlation for one or two t(otutab), or distance for one t(otutab).

Description

Calculate correlation for one or two t(otutab), or distance for one t(otutab).

Usage

c_net_calculate(
  totu,
  totu2 = NULL,
  method = "spearman",
  filename = FALSE,
  p.adjust.method = NULL,
  p.adjust.mode = "all",
  threads = 1,
  verbose = TRUE
)

Arguments

totu

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

totu2

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

method

"spearman" (default), "pearson", "sparcc", or distance index from vegdist.

filename

the prefix of saved .corr file or FALSE.

p.adjust.method

see p.adjust

p.adjust.mode

see p.adjust.table

threads

threads, default: 1.

verbose

verbose, default: TRUE.

Value

a corr object with 3 elements:

r

default: spearman correlation

p.value

default: p-value of spearman correlation

p.adjust

default p.adjust.method = NULL

See Also

Other calculate: cal_sim(), fast_cor(), input_corr(), p.adjust.table()

Examples

data("otutab", package = "pcutils")
t(otutab) -> totu
c_net_calculate(totu) -> corr
metadata[, 3:10] -> env
c_net_calculate(totu, env) -> corr2

MetaNet documentation built on May 29, 2024, 1:21 a.m.