# NOT RUN {
data("example.data")
comm=example.data$comm
env=example.data$env
# if data is small, you do not need to use big.memory
niche.dif=dniche(env = env, comm = comm, method = "niche.value",
nworker = 1,out.dist=FALSE,bigmemo=FALSE,nd.wd = NULL)
# if data is large, you need to use big.memory
# since big.memory need to specify a certain folder,
# it is set as 'not test'.
# but you may test the code on your computer after change the path for 'save.wd'.
# }
# NOT RUN {
wd0=getwd()
save.wd=paste0(tempdir(),"/dnichewd")
# please change to the folder you want to save the big niche difference matrix.
nworker=2 # parallel computing thread number
niche.dif=dniche(env = env, comm = comm,
method = "niche.value", nworker = nworker,
out.dist=FALSE,bigmemo=TRUE,nd.wd = save.wd)
setwd(wd0)
# }
Run the code above in your browser using DataLab