Learn R Programming

secr (version 2.5.0)

signalmatrix: Reformat Signal Data

Description

Produce sound x microphone matrix, possibly with sound covariates as extra columns.

Usage

signalmatrix(object, noise = FALSE, recodezero = FALSE,
    prefix = 'Ch', signalcovariates = NULL)

Arguments

object
object inheriting from secr class `capthist'
noise
logical; if TRUE, noise is extracted instead of signal
recodezero
logical; if TRUE zero signals are set to NA
prefix
character value used to form channel names
signalcovariates
character vector of covariate names from signalframe to add as columns

Value

  • A dataframe with dim = c(n,K+j) where n is the number of separate sounds, K is the number of microphones, and j is the number of covariates (by default j = 0).

Details

This function extracts signal or noise data from a capthist object where is stored in the `signalframe' attribute. in a natural sound x microphone table. There is no equivalent replacement function. The signalcovariates argument may be used to specify additional columns of the signal frame to collapse and add as columns to the right of the actual signal data. Ordinarily there will be multiple rows in signalframe for each row in the output; the covariate value is taken from the first matching row.

See Also

ovensong

Examples

Run this code
## use 'secr' ovenbird data
signalmatrix(signalCH)

Run the code above in your browser using DataLab