fixed_area: Select trees at sample locations using fixed-area plots

Description Usage Arguments Details Value

View source: R/response_designs.R

Description

Select trees at sample locations using fixed-area plots

Usage

1

Arguments

tree_pop

A tree population object (tree_pop)

sample_loc

A sample location object (sample_loc) as provided by the xy_sample function.

r

The radius of the fixed-area sample plot in the same units as the coorinates in tree_loc and sample_loc.

k

Number of neighbors to search for within r. See details.

Details

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.

Value

An object of class response with indices of trees in tree_pop that are selected at the individual sample locations.


AWF-GAUG/fisim documentation built on May 28, 2019, 11:02 a.m.