|
a |
|
b/man/c_net_calculate.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/1.calculate.R |
|
|
3 |
\name{c_net_calculate} |
|
|
4 |
\alias{c_net_calculate} |
|
|
5 |
\alias{c_net_cal} |
|
|
6 |
\title{Calculate correlation for one or two t(otutab), or distance for one t(otutab).} |
|
|
7 |
\usage{ |
|
|
8 |
c_net_calculate( |
|
|
9 |
totu, |
|
|
10 |
totu2 = NULL, |
|
|
11 |
method = "spearman", |
|
|
12 |
filename = FALSE, |
|
|
13 |
p.adjust.method = NULL, |
|
|
14 |
p.adjust.mode = "all", |
|
|
15 |
threads = 1, |
|
|
16 |
verbose = TRUE |
|
|
17 |
) |
|
|
18 |
} |
|
|
19 |
\arguments{ |
|
|
20 |
\item{totu}{t(otutab), row are samples, column are features.} |
|
|
21 |
|
|
|
22 |
\item{totu2}{t(otutab2) or NULL, row are samples, column are features.} |
|
|
23 |
|
|
|
24 |
\item{method}{"spearman" (default), "pearson", "sparcc", or distance index from \code{\link[vegan]{vegdist}}.} |
|
|
25 |
|
|
|
26 |
\item{filename}{the prefix of saved .corr file or FALSE.} |
|
|
27 |
|
|
|
28 |
\item{p.adjust.method}{see \code{\link[stats]{p.adjust}}} |
|
|
29 |
|
|
|
30 |
\item{p.adjust.mode}{see \code{\link{p.adjust.table}}} |
|
|
31 |
|
|
|
32 |
\item{threads}{threads, default: 1.} |
|
|
33 |
|
|
|
34 |
\item{verbose}{verbose, default: TRUE.} |
|
|
35 |
} |
|
|
36 |
\value{ |
|
|
37 |
a corr object with 3 elements: |
|
|
38 |
\item{r}{default: spearman correlation} |
|
|
39 |
\item{p.value}{default: p-value of spearman correlation} |
|
|
40 |
\item{p.adjust}{default p.adjust.method = NULL} |
|
|
41 |
} |
|
|
42 |
\description{ |
|
|
43 |
Calculate correlation for one or two t(otutab), or distance for one t(otutab). |
|
|
44 |
} |
|
|
45 |
\examples{ |
|
|
46 |
data("otutab", package = "pcutils") |
|
|
47 |
t(otutab) -> totu |
|
|
48 |
c_net_calculate(totu) -> corr |
|
|
49 |
metadata[, 3:10] -> env |
|
|
50 |
c_net_calculate(totu, env) -> corr2 |
|
|
51 |
} |
|
|
52 |
\seealso{ |
|
|
53 |
Other calculate: |
|
|
54 |
\code{\link{cal_sim}()}, |
|
|
55 |
\code{\link{fast_cor}()}, |
|
|
56 |
\code{\link{p.adjust.table}()}, |
|
|
57 |
\code{\link{read_corr}()} |
|
|
58 |
} |
|
|
59 |
\concept{calculate} |