subset_by_coordinate_ref: Subset Occurrence Dataframe

View source: R/subset_by_coordinate_ref.R

subset_by_coordinate_refR Documentation

Subset Occurrence Dataframe

Description

Subsets an occurrence dataframe by using a pair of reference coordinates and a radius distance.

Usage

subset_by_coordinate_ref(dataframe, coordinate_reference, distance_threshold)

Arguments

dataframe

A dataframe from which occurrence data will be subset

coordinate_reference

A pair of longitude/latitude coordinates that will mark the centre of the occurrence data

distance_threshold

The distance from the coordinate reference that will be included in the subset

Value

A dataframe with observations that occurred within the distance threshold from the coordinate reference

Examples

# subset the occurrence data returning only data points 50km from the reference coordinates
Colombia_site_1 <-  subset_by_coordinate_ref(

 dataframe = Colombia,
 coordinate_reference = c(-74.083310, 7.488485),
 distance_threshold = 50000

)

head(Colombia_site_1)

DivInsight documentation built on Aug. 12, 2023, 9:06 a.m.