recstrat_regl: Random Ecologically Stratified Sampling of equal numbers

Description Usage Arguments Details Value Author(s) Examples

Description

This function randomly takes an equal number of samples per class in the stratification layer.

Usage

1
recstrat_regl(in_grid, sample_no)

Arguments

in_grid

The stratification grid to be sampled.

sample_no

The total number of pixels to be sampled.

Details

The number of classes in the stratification layer is determined automatically from the integer input map. If the number of pixels in a class is higher than the number of samples, then a random selection without re-substitution is performed, otherwise all pixels of that class are selected.

Value

Returns a dataframe with the selected sampling locations their coordinates and the strata they belong in.

Author(s)

Achilleas Psomas, Niklaus Zimmermann

Examples

1
2
3
4
5
6
7
8
bio3<- raster(system.file("external/bioclim/current/bio3.grd",package="biomod2"))
bio12<- raster(system.file("external/bioclim/current/bio12.grd",package="biomod2"))
B3.rcl<-rcls.grd(bio3,9)
B12.rcl<-rcls.grd(bio12,9)
B3B12.comb <- B12.rcl+B3.rcl*10
B3B12.regl_samples <- recstrat_prop(B3B12.comb,100)
plot(B3B12.comb)
points(B3B12.regl_samples$x,B3B12.regl_samples$y,pch=16,cex=0.6,col=B3B12.regl_samples$class)

filBe87/PKUss documentation built on June 29, 2019, 12:12 a.m.