Description Usage Arguments Details References Examples
View source: R/apa_randomization.R
The segregation index of NDiv assesses how much NDiv deviates from its random expectation using a randomization approach. Values close to zero indicate a random distribution of the traits that were used to calculate NDiv, values larger than zero indicate a regular distribution (stem-wise mixing) and values smaller than zero indicate a clustered configuration (patch-wise mixing).
1 2 3 4 5 6 7 8 9 10 11 12 |
apa_list |
A |
nsim |
Integer, how many simulation runs will be done. |
save_folder |
If specified, intermediate simulation results and processing report will be stored in this folder (defaults to NULL). |
save_simulations |
If TRUE (default) and if |
overwrite |
If FALSE (default), |
buffer_separate |
Should tree locations in the buffer and cores zones be randomized separately? Defaults to TRUE. |
parallel |
If TRUE (default), parallel processing will be used. |
cl |
If |
no_cores |
The number of cores that will be used for parallel processing
(default is 1). If NULL is specified, |
iseed |
A seed that will be passed to [parallel::clusterSetRNGStream] to make simulations reproducible when parallel processing is used (default is 42). |
See Glatthorn (2021) for details.
Glatthorn, Jonas (2021). A spatially explicit index for tree species or trait diversity at neighborhood and stand level. Ecological Indicators, 130, 108073. https://doi.org/10.1016/j.ecolind.2021.108073.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(APAtree)
data(tree_enrico, package = "APAtree")
data(plot_enrico, package = "APAtree")
tree_enrico$height_class <- tree_enrico$height > 20
# only calculating an apa_list for two plots and with a coarse resolution of 1 m
# to save time.
apa_list_enrico <-
apa_list(plot_dat = subset(plot_enrico, id_plot %in% c("5.2", "8.2")),
tree_dat = tree_enrico,
buffer_column = "buffer_geometry",
core_column = "border_geometry",
plot_id_column = "id_plot",
tree_id_column = "id_tree",
weight_column = "crown_radius_95",
agg_class_column = c("species", "height_class"),
res = 10,
apa_polygon = FALSE)
apa_list_enrico <-
apa_ndiv(apa_list_enrico, dis_trait_column = "species")
apa_list_enrico <-
apa_seg(apa_list_enrico, nsim = 3, parallel = FALSE)
# stand-level segregation index of SpeciesNDiv
apa_list_enrico$plot_dat[, c("id_plot", "seg_species_ndiv")]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.