Description Usage Arguments Value
View source: R/balanced_sampling.R
Take a stratified sample of chosen size from a .shp data set of spectral indices
1 2 3 | samplestratified_shp(shp_fname, shp_outname, nsamples, plott = T,
cols2ignore = c("primalX", "primalY", "npx_t_b", "nstrtcl", "probcut"),
cols2include = NA)
|
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 |
A shapefile that is a subset of the input, with nrows close to nsamples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.