getDistances | R Documentation |
Obtain the total distances travelled (in metres) for the tracked animals, using only the receiver locations and also adding the RSP positions.
getDistances(input, t.layer)
input |
RSP dataset as returned by RSP. |
t.layer |
A transition layer. Can be calculated using the function |
A dataframe containing the total distances travelled during each RSP track.
# Import river shapefile
water <- actel::shapeToRaster(shape = paste0(system.file(package = "RSP"), "/River_latlon.shp"),
size = 0.0001, buffer = 0.05)
# Create a transition layer with 8 directions
tl <- actel::transitionLayer(x = water, directions = 8)
# Import example output from actel::explore()
data(input.example)
# Run RSP analysis
rsp.data <- runRSP(input = input.example, t.layer = tl, coord.x = "Longitude", coord.y = "Latitude")
# Calculate distances travelled
distance.data <- getDistances(rsp.data, t.layer = tl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.