caribou <- terra::vect(x = cbind(x = stats::runif(1e1, -50, 50),
y = stats::runif(1e1, -50, 50)))
caribouFrom <- terra::vect(x = cbind(x = stats::runif(1e1, -50, 50),
y = stats::runif(1e1, -50, 50)))
caribouLines <- sp2sl(caribou, caribouFrom)
if (interactive()) {
clearPlot()
Plot(caribouLines, length = 0.1)
}
Run the code above in your browser using DataLab