pbToDf: Convert a PamBinary Object to Data Frame

Description Usage Arguments Value Author(s) Examples

View source: R/pbToDf.R

Description

Converts a PamBinary object into a data frame. The data.frame will combine all of the data from the data part of the PamBinary object, but will not include annotations data, click waveforms, DIFAR demux data, or contours from the WMD detector. These are skipped because they are either inconsistent in their size, or are large objects. The function pbToDf is also called when as.data.frame is called on a PamBinary class object.

Usage

1
pbToDf(pb, templateNames = NULL)

Arguments

pb

a PamBinary class object created by loadPamguardBinaryFile

templateNames

if using the click template classifier, the names of the species for the click templates. These will be used as the names of the columns in the dataframe, and the length of this must exactly match the number of templates used. Will add columns for the threshold, match, and reject correlation values for each template name provided

Value

a data.frame containing most of the binary data read in. Will not contain most annotation data, click waveforms, DIFAR demux data, or contour information from WMD detector. These are skipped because they are either incosistent in their size, or are large objects. Click template classifier information will be included if templateNames are supplied. If binary is from noise band monitor, noise data will be stored in columns noiseMean, noisePeak, and octaveBands, and the resulting dataframe will have a row for each separate octave band stored

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

1
2
3
4
5
6
# load the data
clickFile <- system.file('extdata', 'Click.pgdf', package='PamBinaries')
clickData <- loadPamguardBinaryFile(clickFile)
# two methods two convert to a dataframe
head(pbToDf(clickData))
head(data.frame(clickData))

PamBinaries documentation built on Sept. 2, 2020, 5:07 p.m.