Learn R Programming

MetaNet (version 0.1.2)

c_net_calculate: 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
)

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

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.

See Also

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

Examples

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

Run the code above in your browser using DataLab