Learn R Programming

monitoR (version 1.0.3)

dbDownloadTemplate: Retrieve templates from an acoustics database

Description

Download Acoustic Templates from a Database

Usage

dbDownloadTemplate(db.name = "acoustics", uid, pwd, type, 
names, species, FFTwl, FFTovlp, FFTwn, ...)

Arguments

db.name
Name of the ODBC connector data source corresponding to the acoustics database.
uid
User ID to allow ODBC connector to connect to database, if not present in ODBC connector.
pwd
Password to allow ODBC connector to connect to database, if not present in ODBC connector.
type
Type of templates to select. Character value of either "BIN" or "COR". Some partial matching is performed to accept "bt" and "ct", for example.
names
Optional character value or vector of template names to filter selection from the database. If missing all templates matching other filters are selected.
species
Optional character value or vector of species to filter selection from the database. If missing all templates matching other filters are selected.
FFTwl
Optional character value or vector of FFT window lengths to filter selection from the database. If missing all templates matching other filters are selected.
FFTovlp
Optional character value or vector of FFT window overlap to filter selection from the database. If missing all templates matching other filters are selected.
FFTwn
Optional character value or vector of FFT window names to filter selection from the database. If missing all templates matching other filters are selected.
...
Additional arguments to odbcConnect.

Value

  • An object of class TemplateList.

Details

This function assumes a database structure identical to that provided in the acoustics schema. If the username and password are present in the ODBC datasource they do not need to be provided. It is possible to store only the username in the datasource and enter a password, but the reverse will not work.

See Also

dbUploadTemplate

Examples

Run this code
#If using the 'acoustics' schema verbatim:
btnw<-dbDownloadTemplate(
        type = "BIN", 
        names= c("template1","template2")
        FFTwl = 512, 
        FFTovlp = 0, 
        FFTwn = "hanning")
        
#'acoustics' schema, different database name:
btnw<-dbDownloadTemplate(
        db.name = "LocalSQLdb", 
        uid = "EntryOnly" , 
        pwd = "07H23BBM", 
        type = "COR", 
        species = c("BTNW","OVEN") 
        FFTwl = 512, 
        FFTovlp = 0, 
        FFTwn = "hanning")

Run the code above in your browser using DataLab