F.buildReportCriteria: F.buildReportCriteria

F.buildReportCriteriaR Documentation

F.buildReportCriteria

Description

Update Access database table TempReportCriteria_Trapvisit to contain all unique trapping instances for the site and inclusive calendar dates specified by the user.

Usage

F.buildReportCriteria(site, min.date, max.date)

Arguments

site

The identification number of the site for which estimates are required.

min.date

The start date for data to include. This is a text string in the format %Y-%m-%d, or YYYY-MM-DD.

max.date

The end date for data to include. Same format as min.date.

Details

Function build_Report_Criteria is the workhorse function associated with many query series, and sets up data within the Access CAMP database for further processing. See section Structured Query Language (SQL) Queries in function F.run.sqlFile for more details on query series.

Value

Within R, function build_Report_Criteria returns a data frame containing one row and row column of the total number of visits at a site between the specified min.date and max.date. Within Access, via the RODBC package, it creates table TempReportCriteria_Trapvisit, via query series Build Report Criteria.

Author(s)

WEST Inc.

See Also

sqlQuery, F.run.sqlFile, F.sql.error.check

Examples

## Not run: 
#   ---- American River at Watt Avenue, 2013 Season
site <- 57000                 
min.date <- "2013-01-16"
max.date <- "2013-06-08" 

#   ---- Obtain inclusive trap visits in Access and total 
#   ---- number of visits in 'nvisits'.  
nvisits <- F.buildReportCriteria( site, min.date, max.date )

## End(Not run)

tmcd82070/CAMP_RST documentation built on April 6, 2022, 12:07 a.m.