Description Usage Arguments Details Value
View source: R/response_designs.R
Select trees at sample locations using fixed-area plots
1 | fixed_area(tree_pop, sample_loc, r, k = NULL)
|
tree_pop |
A tree population object ( |
sample_loc |
A sample location object ( |
r |
The radius of the fixed-area sample plot in the same units as the
coorinates in |
k |
Number of neighbors to search for within |
The RANN package is used to find all trees within the specified
radius. The RANN package is a wrapper for the Approximate Near Neighbor
(ANN) C++ library allowing for fast nearest-neighbor searches using
kd-trees. Here, radius search is used, meaning that the k
-nearest
neighbors within r
are searched for. To find all trees within
r
, k
should be large enough (max the number of rows in
tree_loc
). If not specified by the user, k
is estimated by
multiplying the average tree density with plot area. Tree density is
inferred using the density.ppp
function from the spatstat package.
Note that the estimation costs some extra computation time and it is thus
recommended to provide a large enough k
when the function is used in
simulations.
An object of class response
with indices of trees in
tree_pop
that are selected at the individual sample locations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.