Description Usage Arguments Details Value Author(s) Examples
View source: R/EcolUtils_functions.R
Classification of OTUs in generalists / specialists / non-significant based on the deviation of niche width indexes (shanon
, levins
or occurrence
) from null values computed with permutation algorithms for community matrices.
1 2 |
comm.tab |
Community data, a matrix-like object (samples as rows; OTUs as columns). |
niche.width.method |
Niche width index (from |
perm.method |
Method for null model construction (from |
n |
Number of permutations. |
probs |
Probabilities for confidence interval calculations. |
Basically the spec.gen
function computes a niche width index for each OTU in the comm.tab
. The mean index value and CI for each OTU is computed for n
null matrices created through permutation algorithms. Each OTU is classified as specialist / generalist / non significant if the real value is lower / higher / within the CI.
Data frame with the observed niche width value, the mean and CI null values and the classification of each OTU.
Guillem Salazar <guillems@ethz.ch>
1 2 3 4 5 6 7 8 9 10 | library(RCurl)
x<-getURL("https://raw.githubusercontent.com/GuillemSalazar/MolEcol_2015/master/OTUtable_Salazar_etal_2015_Molecol.txt")
comm.tab<-read.table(text=x,sep="\t",row.names=1,header=TRUE,comment.char="@")
comm.tab<-t(comm.tab[,1:60])
comm.tab<-comm.tab[,which(colSums(comm.tab)>0)]
res<-spec.gen(comm.tab,n=100)
comm.tab.bin<-ceiling(comm.tab/max(comm.tab))
plot(colSums(comm.tab),colSums(comm.tab.bin)/dim(comm.tab.bin)[1],col=res$sign,pch=19,log="x",xlab="Abundance",ylab="Occurrence")
legend("bottomright",levels(res$sign),col=1:3,pch=19,inset=0.01,cex=0.7)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.