knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(intercali)
The function calculate_distance
calculates the nearest transect/segment transect_obj
for each simulated individual obs_obj
. It returns an array with the name of the closest transect/segment for each individual and the distance in m and in km between them.
An example of the calculate_distance
uses the datasets dataset_obs
and dataset_segs
from the intercali
package.
data(dataset_obs) data(dataset_segs) dist <- calculate_distance(obs_obj = dataset_obs, transect_obj = dataset_segs, crs = 2154) head(dist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.