## Not run:
# ## Not run, as it requires a database to receive the upload
# # Load data
# data(btnw)
# data(survey)
#
# # Write Wave objects to file (temporary directory used here)
# btnw.fp <- file.path(tempdir(), "btnw.wav")
# survey.fp <- file.path(tempdir(), "survey2010-12-31_120000_EST.wav")
# writeWave(btnw, btnw.fp)
# writeWave(survey, survey.fp)
#
# # Template construction
# b4 <- makeBinTemplate(
# btnw.fp,
# frq.lim = c(2, 8),
# select = "auto",
# name = "b4",
# buffer = 4,
# amp.cutoff = -31,
# binary = TRUE)
#
# # Binary point matching
# scores <- binMatch(survey = survey.fp, templates = b4, time.source = 'fileinfo')
#
# # Isolate peaks
# pks <- findPeaks(scores)
#
# #If using the 'acoustics' schema verbatim:
# dbUploadResult(detection.obj = pks, analysis.type = "BIN", analyst = 1)
#
# #'acoustics' schema, different database name:
# dbUploadResult(
# detection.obj = pks,
# which.one = "b4",
# what = "peaks",
# db.name = "LocalSQLdb",
# uid = "EntryOnly" ,
# pwd = "07H23BBM",
# analysis.type = "BIN",
# analyst = 1)## End(Not run)
Run the code above in your browser using DataLab