Skip to contents

Sampling

User facing functions for implementing the sampling schemes

PointBasedSample()
Generate a sampling grid based off of regularly sampled points across the species range.
EqualAreaSample()
Create equal area polygons over a geographic range
OpportunisticSample()
Design additional collections around already existing collections
KMedoidsBasedSample()
K Medoids Based Sample Site Selection Select a subset of sites that maximize spatial dispersion of sites using k-medioids clustering.
IBDBasedSample()
Sample a species based on Isolation by Geographic Distance (IBD)
PolygonBasedSample()
Sample spatial zones within a species range
EnvironmentalBasedSample()
Create environmental and spatial clusters for targeting collection areas
PrioritizeSample()
Determine which areas in a sample unit should be prioritized

Isolation by Resistance Sampling Prep

Preparation for Isolation by Resistance Sampling

buildResistanceSurface()
Create a simple, theoretical, raster surface modelling Isolation by Distance.
populationResistance()
Identify clusters of populations least separated by landscape resistance
IBRSurface()
Sample a species based on Isolation by Resistance Distance (IBR)

Environmental Sampling Prep

Preparation for Environmental Based Sampling

elasticSDM()
Create a quick SDM using elastic net regression
PostProcessSDM()
Modify the output rasters from the SDM process to better match target goals
RescaleRasters()
Rescale a raster stack to reflect the beta coefficients from a glmnet model
writeSDMresults()
Save the results of SDMs from the elasticSDM, RescaleRasters and PostProcessSDM function in safeHavens

Predictive Provenance Prep

Preparation for Predictive Provenance

rescaleFuture()
Rescale future climate predictors using current model coefficients
projectClusters()
Project current environmental clusters onto a future climate scenario

Rare Plant Sampling

Optimization based site selection helpers for known populations

greatCircleDistance()
Haversine Distance Calculation
split_cols()
split and extract the temperature values from Tmin and AHM columns