boot_dissim | R Documentation |
Bootstrap dissimilarity between two vectors of interactions (or species names).
boot_dissim(lst_vect, index, by, replace, size_short, n_boot, n_cpu)
lst_vect |
A list with two character vectors of interactions. |
index |
The name of the desired index, e.g.: "whittaker", "jaccard", "sorensen". Character type. |
by |
Integer. Number of interactions used to increase gradually the
sampled vectors of interactions until all observations are sampled. If |
replace |
Should sampling be with replacement? Passed to
|
size_short |
Should the total sample size be set by the length of the
shortest vector from |
n_boot |
Number of desired bootstraps (100 can be enough). |
n_cpu |
Number of CPU-s to use for parallel processing. |
A matrix of dissimilarities. The number of columns corresponds to
n_boot
(number of bootstraps). The names of the rows store the sample
size of each sampled chunk. The final value corresponds to the length of
the shortest vector (when size_short = TRUE
), or to the length of the
longest vector (when size_short = FALSE
).
library(bootdissim) library(bipartite) net1 <- reshape_net(vazarr, seed = 1) net2 <- reshape_net(vazcer, seed = 1) vect <- get_interactions(net1, net2) tst <- boot_dissim(lst_vect = vect, index = "whittaker", by = 50, replace = TRUE, size_short = FALSE, n_boot = 10, n_cpu = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.