plotTracks | R Documentation |
This function can be used to plot a map of a particular RSP track of interest.
plotTracks(
input,
base.raster,
type = c("both", "points", "lines"),
group,
tag,
track,
size = c(0.33, 0.3),
alpha = c(0.5, 0.5),
land.col = "#BABCBF80"
)
input |
The output of runRSP. |
base.raster |
The raster used to generate the transition layer used in runRSP |
type |
One of "points", "line" or "both". Defaults to "both", i.e. both lines and points are plotted for the generated tracks. |
group |
Choose a single group of fish to plot |
tag |
Choose a single tag to plot |
track |
If a single tag was chosen, you can use 'track' to define a specific track to be plotted. |
size |
The size/width of the points and lines to be plotted. if type = "both", the line size will be the one specified and the point size will be 10% larger than the specified. |
alpha |
One or two transparency values (for points and lines, respectively). For no transparency, alpha = 1. |
land.col |
Colour of the land masses. Defaults to semi-transparent grey. |
A plot showing the RSP track locations.
# 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")
# Plot a specific RSP track
plotTracks(rsp.data, base.raster = water, tag = "A69-9001-1111", track = "Track_1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.