spatChronPlot: Make spatial chronogram plots with acoustic telemetry data

Description Usage Arguments Value References Examples

Description

This function creates spatial chronogram plots to visualize passive acoustic telemetry data. Spatial chronogram plots represent the receivers with the largest number of receptions within predefined time intervals (e.g. 30 min) in each day of the tracking period. They are an effective way to visualize, on a fine temporal scale, presences and absences of an individual among different zones of the receiver array.

Usage

1
2
3
spatChronPlot(rec.id, time.stamp, time.int = "30min", colors = NULL,
  include.all.rec = TRUE, palette = NULL, xlim = NULL, xaxs = TRUE,
  yaxs = TRUE, scale = TRUE, cex.lab = 0.9)

Arguments

rec.id

vector with the ID codes of the receivers for each detection.

time.stamp

vector with the date and time of each detection in POSIXt format.

time.int

Time interval for the Y axis of the plot as given to the units argument of the round_date function in the lubridate package. Default is set to '30min'.

colors

optional character vector with the names of the colors to plot each receiver. The names of the elements in the vector must match with the receiver IDs in rec.id. If this argument is not provided, colors will be automatically assigned using a color palette, which can be provided in the palette argument.

include.all.rec

logical, if TRUE, all the levels of the receiver IDs (in rec.id or names(colors)) will be included in the assignation of colors and when plotting the scale bar. If FALSE, only the receivers that appear in rec.id will appear in the scale bar.

palette

if colors is not provided, a color palette can be specified to extract the colors. If colors or palette are not provided, a predefined color palette will be used.

xlim

minimum and maximum date limits for the X axis, in Date format.

xaxs, yaxs, scale

Logical arguments to plot (if TRUE) the X and Y axis and the lateral scale bar, respectively.

cex.lab

the magnification to be used for the labels of the scale bar.

Value

The funtion makes a spatial chronogram plot.

References

Aspillaga, E., F. Bartumeus, C. Linares, R.M. Starr, À. López-Sanz, D. Díaz, M. Zabala, and B. Hereu. 2016. Ordinary and extraordinary movement behaviour of small resident fish within a Mediterranean marine protected area. PLoS ONE, 11: e0159813.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
data(tracking)
tracking$rec.id <- factor(tracking$rec.id)
tracking <- split(tracking, tracking$tag.id)

par(mfrow = c(2, 1), mar = c(3.1, 4.1, 2.1, 4.1))
spatChronPlot(rec.id = tracking[[1]]$rec.id,
              time.stamp = tracking[[1]]$time.stamp)
title(main = names(tracking)[1])
spatChronPlot(rec.id = tracking[[2]]$rec.id,
              time.stamp = tracking[[2]]$time.stamp)
title(main = names(tracking)[1])

## End(Not run)

aspillaga/fishtrack3d documentation built on June 4, 2019, 9:14 a.m.