samplestratified_shp: Take A Stratified Sample Of A .SHP With Spectral Indices As...

Description Usage Arguments Value

View source: R/balanced_sampling.R

Description

Take a stratified sample of chosen size from a .shp data set of spectral indices

Usage

1
2
3
samplestratified_shp(shp_fname, shp_outname, nsamples, plott = T,
  cols2ignore = c("primalX", "primalY", "npx_t_b", "nstrtcl", "probcut"),
  cols2include = NA)

Arguments

shp_fname

A shp point file with spectral indices

shp_outname

The filenmae for the output shapefile of the sample

nsamples

The number of samples you'd like to take

plott

Logical. Should diagnostic plots be produced? Default is F.

cols2ignore

Character vector. Columns in the attribute table that should be ignored in the stratification. Default is c('primalX','primalY','npx_t_b','nstrtcl','probcut') which are legacy attributes. Furthermore columns of which the name starts with 'x' are ingored automatically.

cols2include

Character vector. Columns in the attribute table that should be included in the stratification. Default is NA, which means all columns, except for those in cols2ignore are included. cols2ignore takes precedence over cols2include

Value

A shapefile that is a subset of the input, with nrows close to nsamples


pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.