Usage
trackfreqs(X, wl = 512, flim = c(0, 22), wn = "hanning", pal = reverse.gray.colors.2, ovlp = 70, inner.mar = c(5, 4, 4, 2), outer.mar = c(0, 0, 0, 0), picsize = 1, res = 100, cexlab = 1, title = TRUE, propwidth = FALSE, xl = 1, osci = FALSE, gr = FALSE, sc = FALSE, bp = c(0, 22), cex = c(0.6, 1), threshold = 15, contour = "both", col = c("skyblue", "red2"), pch = c(21, 24), mar = 0.05, lpos = "topright", it = "jpeg", parallel = 1, path = NULL, img.suffix = NULL, custom.contour = NULL, pb = TRUE, type = "p", leglab = c("Ffreq", "Dfreq"), col.alpha = 0.6, line = TRUE)
Arguments
X
Data frame with results containing columns for sound file name (sound.files),
selection number (selec), and start and end time of signal (start and end).
The ouptut of manualoc
or autodetec
can be used as the input data frame. wl
A numeric vector of length 1 specifying the window length of the spectrogram, default
is 512.
flim
A numeric vector of length 2 for the frequency limit of
the spectrogram (in kHz), as in spectro
. Default is c(0, 22). wn
Character vector of length 1 specifying window name. Default is
"hanning". See function ftwindow
for more options. pal
A color palette function to be used to assign colors in the
plot, as in spectro
. Default is reverse.gray.colors.2. ovlp
Numeric vector of length 1 specifying % of overlap between two
consecutive windows, as in spectro
. Default is 70. inner.mar
Numeric vector with 4 elements, default is c(5,4,4,2).
Specifies number of lines in inner plot margins where axis labels fall,
with form c(bottom, left, top, right). See par
. outer.mar
Numeric vector with 4 elements, default is c(0,0,0,0).
Specifies number of lines in outer plot margins beyond axis labels, with
form c(bottom, left, top, right). See par
. picsize
Numeric argument of length 1. Controls relative size of
spectrogram. Default is 1.
res
Numeric argument of length 1. Controls image resolution.
Default is 100 (faster) although 300 - 400 is recommended for publication/
presentation quality.
cexlab
Numeric vector of length 1 specifying the relative size of axis
labels. See spectro
. title
Logical argument to add a title to individual spectrograms.
Default is TRUE
.
propwidth
Logical argument to scale the width of spectrogram
proportionally to duration of the selected call. Default is FALSE
.
xl
Numeric vector of length 1. A constant by which to scale
spectrogram width. Default is 1.
osci
Logical argument to add an oscillogram underneath spectrogram, as
in spectro
. Default is FALSE
. gr
Logical argument to add grid to spectrogram. Default is FALSE
.
sc
Logical argument to add amplitude scale to spectrogram, default is
FALSE
.
bp
A numeric vector of length 2 for the lower and upper limits of a
frequency bandpass filter (in kHz) or "frange" to indicate that values in low.f
and high.f columns will be used as bandpass limits. Default is c(0, 22).
cex
Numeric vector of length 2, specifies relative size of points
plotted for frequency measurements and legend font/points, respectively.
See spectro
. threshold
amplitude threshold (%) for fundamental frequency and
dominant frequency detection. Default is 15.
contour
Character vector, one of "df", "ff" or "both", specifying whether the
dominant or fundamental frequencies or both should be plotted. Default is "both".
col
Vector of length 1 or 2 specifying colors of points plotted to mark
fundamental and dominant frequency measurements respetively (if both are plotted). Default is c("skyblue",
"red2").
pch
Numeric vector of length 1 or 2 specifying plotting characters for
the frequency measurements. Default is c(21, 24).
mar
Numeric vector of length 1. Specifies the margins adjacent to the selections
to set spectrogram limits. Default is 0.05.
lpos
Character vector of length 1 or numeric vector of length 2,
specifiying position of legend. If the former, any keyword accepted by
xy.coords can be used (see below). If the latter, the first value will be the x
coordinate and the second value the y coordinate for the legend's position.
Default is "topright".
it
A character vector of length 1 giving the image type to be used. Currently only
"tiff" and "jpeg" are admitted. Default is "jpeg".
parallel
Numeric. Controls whether parallel computing is applied.
It specifies the number of cores to be used. Default is 1 (i.e. no parallel computing).
path
Character string containing the directory path where the sound files are located.
If NULL
(default) then the current working directory is used.
img.suffix
A character vector of length 1 with a suffix (label) to add at the end of the names of
image files. Default is NULL
.
custom.contour
A data frame with frequency contours for exactly the same sound files and selection as in X.
The frequency values are assumed to be equally spaced in between the start and end of the signal. The
first 2 colums of the data frame should contain the 'sound.files' and 'selec' columns and should be
identical to the corresponding columns in X (same order).
pb
Logical argument to control progress bar. Default is TRUE
. Note that progress bar is only used
when parallel = 1.
type
A character vector of length 1 indicating the type of frequency contour plot to be drawn.
Possible types are "p" for points, "l" for lines and "b" for both.
leglab
A character vector of length 1 or 2 containing the label(s) of the frequency contour legend
in the output image.
col.alpha
A numeric vector of length 1 within [0,1] indicating how transparent the lines/points should be.
line
Logical argument to add red lines (or box if low.f and high.f columns are provided) at start and end times of selection. Default is TRUE
.