rad_bg: Generate backround data within a radius of occurrence records

Description Usage Arguments Examples

View source: R/cracle_build.R

Description

This function generates a sample of background coordinates that are within n kilometers of one occurrene record up to x background points per record.

Usage

1
rad_bg(coords, clim, radius, n)

Arguments

coords

A two-column matrix or data.frame of coordinates with the first column being longitude and the second being latitude.

clim

A raster object to extract background data from.

radius

A distance in km to define a radius around each occurrence to sample from.

n

Number of background points to generate per occurrence point. Note that background points will be thinned so that only one occurs per grid cell, so the total number returned will be less than n * length(coords[,1]).

Examples

1
2
3
4
5
## Not run: 
data(distr);
bg.ext <- rad_bg(distr[,4:3], climondbioclim, radius=100, n = 50)

## End(Not run)

rsh249/vegdistmod documentation built on May 28, 2019, 3:31 a.m.