plotDistances: Plot total distances travelled

View source: R/plot.R

plotDistancesR Documentation

Plot total distances travelled

Description

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.

Usage

plotDistances(input, group, compare = TRUE)

Arguments

input

output of getDistances.

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.

Value

A barplot of total distances travelled as a function of location type (Loc.type) and the distances travelled during each RSP track.

Examples


# 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")



YuriNiella/RSP documentation built on Feb. 2, 2024, 5:03 a.m.