Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ecospat.recstrat_prop

Random Ecologically Stratified Sampling of propotional numbers


Description

This function randomly collects a user-defined total number of samples from the stratification layer.

Usage

ecospat.recstrat_prop(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 samples per class are determined proportional to the abundance of each class. The number of classes in the stratification layer are determined automatically from the integer input map. If the proportion of samples for a certain class is below one then no samples are collected for this class.

Value

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

Author(s)

Achilleas Psomas achilleas.psomas@wsl.ch and Niklaus E. Zimmermann niklaus.zimmermann@wsl.ch

See Also

Examples

library(raster)
    library(classInt)
    
    bio3<- raster(system.file("external/bioclim/current/bio3.grd",package="biomod2"))
    bio12<- raster(system.file("external/bioclim/current/bio12.grd",package="biomod2"))
    
    B3.rcl<-ecospat.rcls.grd(bio3,9) 
    B12.rcl<-ecospat.rcls.grd(bio12,9)
    B3B12.comb <- B12.rcl+B3.rcl*10
    
    B3B12.prop_samples <- ecospat.recstrat_prop(B3B12.comb,100)
    
    plot(B3B12.comb)
    points(B3B12.prop_samples$x,B3B12.prop_samples$y,pch=16,cex=0.6,col=B3B12.prop_samples$class)

ecospat

Spatial Ecology Miscellaneous Methods

v3.2
GPL
Authors
Olivier Broennimann [cre, aut, ctb], Valeria Di Cola [aut, ctb], Blaise Petitpierre [ctb], Frank Breiner [ctb], Daniel Scherrer [ctb], Manuela D`Amen [ctb], Christophe Randin [ctb], Robin Engler [ctb], Wim Hordijk [ctb], Heidi Mod [ctb], Julien Pottier [ctb], Mirko Di Febbraro [ctb], Loic Pellissier [ctb], Dorothea Pio [ctb], Ruben Garcia Mateo [ctb], Anne Dubuis [ctb], Luigi Maiorano [ctb], Achilleas Psomas [ctb], Charlotte Ndiribe [ctb], Nicolas Salamin [ctb], Niklaus Zimmermann [ctb], Antoine Guisan [aut]
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.