p.nb and a list of neighbors for each region.cluspop.nb(neighbors, p.nb = 0.5, n.species, clus.specs, reg.group,
grouppf = 10, n.regions = length(neighbors),
vector.species = rep(1, n.species), pdf.regions = rep(1/n.regions,
n.regions), count = TRUE, pdfnb = FALSE)numeric(0).n.species. Number of
species restricted to one of the two groups of regions defined by
reg.group (called "clustered species" because this leads to
more similar species ranges).n. regions. Defines a group of regions to which a part of the
clus.specs clustered species is restricted (more or less, see
grouppf). The other clustergrouppf compared to the generation
of "non-clustered" species.vector.species.n.species. The
entries must sum up to 1 and give probabilities for the regions to
be drawn during the generation of a species. These probabilities are
used conditional on the new region being a neighbor TRUE, the number of the currently
generated species is printed.TRUE, the probabilities of the regions
are modified according to the number of neighboring regions by
dividing them relative to the others by min(1,number of neighbors).randpop.nb. The general principle for the clustered species
is the same, but with modified probabilities for the regions. For each
clustered species, one of the two groups of regions is drawn,
distributed according to the sum of its regions' probability given by
pdf.regions. The first region of such a species is only drawn
from the regions of this group.randpop.nb,
autoconst estimates p.nb from matrices of class
prab. These are generated by prabinit.data(nb)
set.seed(888)
cluspop.nb(nb, p.nb=0.1, n.species=10, clus.specs=9, reg.group=1:17,
vector.species=c(10))Run the code above in your browser using DataLab