data("example.data")
comm=example.data$comm
pd=example.data$pd
tree=example.data$tree
# 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)
# since it needs to save some file to a certain folder,
# the following code is set as 'not test'.
# but you may test the code on your computer
# after change the folder path for 'save.wd'.
# \donttest{
wd0=getwd()
save.wd=paste0(tempdir(),"/pdbig.nricm.big")
nworker=2 # parallel computing thread number.
pd.big=pdist.big(tree = tree, wd=save.wd, nworker = nworker)
rand.time=20 # usually use 1000 for real data.
sigmpd=NRI.cm.big(comm=comm, pd.desc = pd.big$pd.file,
pd.spname = pd.big$tip.label, pd.wd = pd.big$pd.wd,
meta.group=meta.group, 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