niche.val: Niche value computation for OTUs in a community through...

Description Usage Arguments Details Value Author(s)

View source: R/EcolUtils_functions.R

Description

Computation of the abundance-weighted mean of an environmental variable for all OTUs in a community and statistical comparison to randomized communities.

Usage

1
niche.val(comm.tab, env.var, n = 1000, probs = c(0.025, 0.975))

Arguments

comm.tab

Community data, a matrix-like object (samples as rows; OTUs as columns).

env.var

Environmental variable as a numeric vector.

n

Number of permutations.

probs

Probabilities for confidence interval calculations.

Details

The niche.val function computes the abundance-weighted mean of an environmental variable for each OTU in the comm.tab. The mean value and CI for each OTU is computed for n null matrices. The null matrices are created by randomly shuffling the rows in comm.tab. Each OTU is classified depending whether the real niche value is lower / higher / within the CI.

Value

Data frame with the observed niche value, the mean and CI null values and the classification of each OTU based on randomizations.

Author(s)

Guillem Salazar <guillems@ethz.ch>


GuillemSalazar/EcolUtils documentation built on Nov. 6, 2019, 10:50 a.m.