# NOT RUN {
data("example.data")
comm=example.data$comm
pd=example.data$pd
# in this example, 10 samples from one metacommunity,
# the other 10 samples from another metacommunity.
meta.group=data.frame(meta.com=c(rep("meta1",10),rep("meta2",10)))
rownames(meta.group)=rownames(comm)
nworker=2 # parallel computing thread number.
rand.time=20 # usually use 1000 for real data.
sigmpd=NRI.cm(comm=comm, meta.group=meta.group,
dis=pd, nworker=nworker,
weighted=TRUE, rand=rand.time,
sig.index="all")
NRI=sigmpd$SES
CMPD=sigmpd$Confidence
RCMPD=sigmpd$RC
# }
Run the code above in your browser using DataLab