addPgAnno: Add Spectrogram Annotations to Pamguard Database

View source: R/addPgAnno.R

addPgAnnoR Documentation

Add Spectrogram Annotations to Pamguard Database

Description

Add new annotations to an existing Pamguard Spectrogram Annotations table

Usage

addPgAnno(
  db,
  anno,
  tableName = NULL,
  channel = 1,
  source = c("manual", "aplose", "pammisc", "annomate", "raven"),
  format = c("%m/%d/%Y %H:%M:%OS", "%m-%d-%Y %H:%M:%OS",
    "%Y/%m/%d %H:%M:%OS", "%Y-%m-%d %H:%M:%OS"),
  tz = "UTC"
)

Arguments

db

database file to add annotations to

anno

annotations to add, must contain columns UTC, Duration (seconds), f1 (min freq Hz), and f2 (max freq Hz). Any other columns matching columns in the database will also be added

tableName

name of the annotation table in the database

channel

channel to display the annotations on

source

annotation source. If 'manual', columns UTC, DUration, f1, and f2 must be present. Other options will attempt to automate conversion to these column names from specific output sources

format

date format, default will try two variations of MDY HMS and YMD HMS

tz

timezone of provided date

Value

Returns a dataframe of the rows added to the database

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

## Not run: 
myDb <- 'PamguardDatabase.sqlite3'
myAnno <- data.frame(UTC = '2021/10/23 12:10:10', Duration = .563, f1=2300, f2=3600)
addPgAnno(myDb, myAnno, tableName='Spectrogram_Annotation', source='manual')

## End(Not run)


PAMmisc documentation built on Aug. 17, 2023, 1:06 a.m.