dbDownloadResult: Create 'detectionList' Objects from Data Stored in a Database

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/dbDownloadResult.R

Description

This function creates detectionList objects corresponding to a specified survey and TemplateList from data available in an acoustics database.

Usage

1
2
dbDownloadResult(db.name = "acoustics", uid, pwd, survey, templates, 
                 type, FFTwl, FFTwn, FFTovlp, ...)

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.

survey

Character value, name of survey as it appears in the acoustics database

templates

object of class TemplateList or character vector of template names as they appear in an acoustics database

type

Character value in c("BIN", "COR") to filter the results for either binMatch or corMatch results, respectively

FFTwl

Filter for templates with specific FFT window lengths.

FFTovlp

Filter for templates with specific FFT window overlap.

FFTwn

Filter for templates with specific FFT window names.

...

Additional arguments to sqlQuery. For example, if the function fails on an error such as: Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format, adding as.is = TRUE may help circumnavigate the problem (although it will not solve the data issue!)

Details

This function allows database data to be coerced back into an object of class detectionList, which is useful in that data can be pulled from the database and used in functions that require detectionList objects such as plot and showPeaks.

The resulting detectionList object will be incomplete as it is missing the complete scores list, which is used to plot the scores in the second row of the above plotting functions. Hit markers are still plotted, and these can still be useful if set to hit.marker = "points".

Value

An object of class detectionList

Author(s)

Jon Katz, Sasha D. Hafner

See Also

detectionList, TemplateList, binMatch, corMatch, showPeaks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
#If using the 'acoustics' schema verbatim:
examp <- dbDownloadResult(
        survey = "INTV02_2011-06-25_081000_EDT.mp3", 
        templates = templates, type = "BIN")
        
#'acoustics' schema, different database name:
examp <- dbDownloadResult(
        db.name = "LocalSQLdb", 
        uid = "EntryOnly" , 
        pwd = "07H23BBM", 
        survey = "INTV02_2011-06-25_081000_EDT.mp3", 
        templates = templates, 
        type = "BIN")
## End(Not run)

monitoR documentation built on May 1, 2019, 6:28 p.m.