plotDistances | R Documentation |
Compare the outputs of total distances travelled (in kilometres) for the tracked animals, using only the receiver locations and adding the RSP positions. Data on the total distances travelled are stored in the 'distances' objtect.
plotDistances(input, group, compare = TRUE)
input |
output of |
group |
Define a specific group to be plotted, rather than the overall results. |
compare |
By default, a comparative plot is returned showing distances travelled with Receiver and RSP location types. If FALSE, only the RSP total distances travelled will be returned. |
A barplot of total distances travelled as a function of location type (Loc.type) and the 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)
# Plot distances travelled
plotDistances(distance.data, group = "G1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.