get_elevation: Extract elevation from DEM

View source: R/get_elevation.R

get_elevationR Documentation

Extract elevation from DEM

Description

This function retrieves elevation values from a Digital Elevation Model (DEM) based on their geographic coordinates (lon/lat).

Usage

get_elevation(data, dem_file)

Arguments

data

A ⁠data frame⁠ containing species records. Must include lon, lat, year, and month columns.

dem_file

Full character path to the downloaded DEM raster file.

Value

The input data frame data with a new column (ele) containing the extracted elevation values.


SppTrend documentation built on Feb. 7, 2026, 5:07 p.m.