get_r2-mat: Function for unexplained variance ratio calculation indicated...

Description Usage Arguments Value Examples

Description

Function for unexplained variance ratio calculation indicated in Anderson, M.J. 2001. A new method for non-parametric multivariate analysis of variance. Austral Ecology, 26: 32–46.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'matrix,ANY,ANY'
get_r2(x, des, group)

## S4 method for signature 'matrix,data.frame,ANY'
get_r2(x, des, group)

## S4 method for signature 'matrix,data.frame,character'
get_r2(x, des, group = c("Host_genotype", "Compartment", "Soil", "Management"))

Arguments

x

Dissimilarity / distance matrix which indicate variances.

des

The descriptive table of samples which define the groups.

group

The name(s) of column(s) used as experimental setup group(s) in descriptive file.

Value

r2 The variance ratio cannot be explained by given groups.

Examples

1
2
3
4
5
6
7
maize <- new("mina", tab = maize_asv2, des = maize_des2)
maize <- norm_tab(maize, method = "raref")
maize <- fit_tabs(maize)
maize <- com_dis(maize, method = "bray")
x <- dis(maize)
des <- des(maize)
get_r2(x, des, group = c("Compartment", "Soil"))

Guan06/mina documentation built on Feb. 21, 2022, 11:56 a.m.