Description Usage Arguments Details
The function takes two sets of geolocated, temporally resolved data (typically one biotic and one abiotic) and match them.
1 2 3 |
env_lon |
is a vector of longitudes for the abiotic variable |
env_lat |
is a vector of latitude for the abiotic variable |
env_time |
is a list containing vectors "year" and "month" for the abiotic variables |
bio_lon |
is the longitude of the observed biotic record |
bio_lat |
is the latitude of the observed biotic record |
bio_time |
is a list containing the year and month at which the biotic record was observed |
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 abiotic variable values |
match_env
returns the value of the environmental variable
for the time and location in the abiotic set of coordinates that
are closest to that of 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. Temporal
matching is done on a "year-month" basis. If there is no temporal
match the function returns NA. Similarly if there is no matching data within
a threshold distance (optional), the function returns NA. Geographical
distance is calculating using the geosphere::distm() function using
the haversine method (i.e. assuming a spherical earth, ignoring ellipsoidal effects).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.