k_tree: The 'k' trees closest to a sample location are selected into...

Description Usage Arguments Details Value

View source: R/response_designs.R

Description

The k trees closest to a sample location are selected into the sample

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.

k

Number of nearets neighbors.

Details

The RANN package is used to find the k trees clostest to the respective sample locations in sample_loc. The RANN package is a wrapper for the Approximate Near Neighbor (ANN) C++ library allowing for fast nearest-neighbor searches using kd-trees.

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.