Learn R Programming

warbleR (version 1.1.2)

coor.graph: Coordinated singing graphs

Description

coor.graph creates graphs of coordinated singing and highlights the signals that overlap in time. The signals are represented by polygons of different colors.

Usage

coor.graph(X, only.coor = FALSE, ovlp = TRUE, xl = 1, res= 80, it = "jpeg", img = TRUE)

Arguments

X
Data frame containing columns for singing event (sing.event), individual (indiv), and start and end time of signal (start and end).
only.coor
Logical. If TRUE only the segment in which both individuals are singing is included (solo singing is removed). Default is FALSE.
ovlp
Logical. If TRUE the vocalizations that overlap in time are highlighted. Default is TRUE.
xl
Numeric vector of length 1, a constant by which to scale spectrogram width. Default is 1.
res
Numeric argument of length 1. Controls image resolution. Default is 80.
it
A character vector of length 1 giving the image type to be used. Currently only "tiff" and "jpeg" are admitted. Default is "jpeg".
img
Logical argument. If FALSE, image files are not produced. Default is TRUE.

Value

Graphs of the singing events in the input data frame are saved in the working directory.

Details

This function provides visualization for coordination of acoustic signals. Signals are shown as polygon across a time axis. It also shows which signals overlap, the amount of overlap, and highlights the individual responsible for the overlap using a color code. The width of the polygons depicting the time of overlap.

Examples

Run this code
## Not run: 
# 
# # First set temporary folder
# setwd(tempdir())
# 
# # load simulate singing events  (see data documentation)
# data(coor.sing)
# 
# # make coor.graphs in tiff format
# coor.graph(X = coor.sing, ovlp = TRUE, only.coor = FALSE, xl =2, res =80, it = "jpeg" , img = TRUE)
# 
# 
# #' # make coor.graphs in graphic device format
# coor.graph(X = coor.sing, ovlp = TRUE, only.coor = FALSE, img = FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab