spcc {baRulho}  R Documentation 
spcc
measures spectrographic crosscorrelation as a measure of signal distortion in signals referenced in an extended selection table.
spcc(X, parallel = 1, pb = TRUE, method = 1, cor.method = "pearson", output = "est", hop.size = 11.6, wl = NULL, ovlp = 90, wn = 'hanning')
X 
object of class 'extended_selection_table' created by the function 
parallel 
Numeric vector of length 1. Controls whether parallel computing is applied by specifying the number of cores to be used. Default is 1 (i.e. no parallel computing). 
pb 
Logical argument to control if progress bar is shown. Default is 
method 
Numeric vector of length 1 to indicate the 'experimental design' for measuring envelope correlation. Two methods are available:

cor.method 
Character string indicating the correlation coefficient to be applied ("pearson", "spearman", or "kendall", see 
output 
Character vector of length 1 to determine if an extended selection table ('est', default) or a data frame ('data.frame'). 
hop.size 
A numeric vector of length 1 specifying the time window duration (in ms). Default is 11.6 ms, which is equivalent to 512 wl for a 44.1 kHz sampling rate. Ignored if 'wl' is supplied. 
wl 
A numeric vector of length 1 specifying the window length of the spectrogram, default is NULL. If supplied, 'hop.size' is ignored. 
ovlp 
Numeric vector of length 1 specifying % of overlap between two
consecutive windows, as in 
wn 
A character vector of length 1 specifying the window name as in 
Spectrographic crosscorrelation measures frequency distortion of signals as a similarity metric. Values close to 1 means very similar spectrograms (i.e. little signal distortion has occurred). Crosscorrelation is measured of signals in which a reference playback has been rerecorded at increasing distances. The 'signal.type' column must be used to indicate the function to only compare signals belonging to the same category (e.g. songtypes). The function compares each signal type to the corresponding reference signal within the supplied frequency range (e.g. bandpass) of the reference signal ('bottom.freq' and 'top.freq' columns in 'X'). Two methods for calculating crosscorrelation are provided (see 'method' argument). The function is a wrapper on warbleR's xcorr
function.
Extended selection table similar to input data, but includes a new column (cross.correlation) with the spectrogram crosscorrelation coefficients.
Marcelo ArayaSalas (marcelo.araya@ucr.ac.cr)
ArayaSalas, M. (2020). baRulho: baRulho: quantifying habitatinduced degradation of (animal) acoustic signals in R. R package version 1.0.2
Clark, C.W., Marler, P. & Beeman K. (1987). Quantitative analysis of animal vocal phonology: an application to Swamp Sparrow song. Ethology. 76:101115.
{ # load example data data("playback_est") # method 1 spcc(X = playback_est, method = 1) # method 2 spcc(X = playback_est, method = 2) }