knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(intercali)

Calculate distance between transects and points

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.

Example

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)


maudqueroue/intercali documentation built on Oct. 8, 2022, 2:09 p.m.