gs_mode: Most common stratum calculator

Description Usage Arguments Value Author(s)

View source: R/gs_mode.r

Description

For each cell in the user-defined "coarse grid" used to select spatially-representative samples (i.e. when cfg_sample_spatial == TRUE), this function calculates the stratum that occurs most often within each course grid cell.

Usage

1
gs_mode(rast)

Arguments

rast

data.table object. This data.table where each cell that lies within a larger grid cell is represented as a row. For each row, the variable grid_id is the ID of the cell from the coarser grid, sampled denotes whether a cell has been sampled, stratum defines the stratum each cell lies within, and raster_index is a unique value for each cell in the raster.

Value

Vector of values representing the stratum that occurs most often within a given subset of the raster.

Author(s)

Forrest R. Stevens, forrest.stevens@louisville.edu


gridsample documentation built on May 29, 2017, 9:58 p.m.

Search within the gridsample package
Search all R packages, documentation and source code