match_env: Match biotic and abiotic data in space

Description Usage Arguments

View source: R/match_env.R

Description

The function takes two sets of geolocated data (typically one biotic and one abiotic) and match their locations to combine the two. match_env returns the value of the environmental variable for the location in the abiotic set of coordinates that is closest to the location for the biotic record. If the vector of values for the abiotic variable is not provided, the function simply returns the index of the closest location in the vector of coordinates.

Usage

1
2
match_env(env_lon, env_lat, bio_lon, bio_lat, max_dist = NA,
  env_variable = NULL)

Arguments

env_lon

is a vector of longitudes for the abiotic variable

env_lat

is a vector of latitude for the abiotic variable

bio_lon

is the longitude of the biotic variable

bio_lat

is the latitude of the biotic variable

max_dist

is the maximum distance (in km) beyond which a environmental data point is considered too far to inform conditions at location of biological records

env_variable

is an optional vector containing the value of the abiotic variable


remsamp/Rmerp_public documentation built on May 3, 2019, 4:07 p.m.