estCovar: estCovar

View source: R/estCovar.R

estCovarR Documentation

estCovar

Description

Query individual covariates and their recorded units from an Access CAMP database.

Usage

estCovar(dbCov, covName, estType, traps, obs.eff.df, xwalk, oursitevar)

Arguments

dbCov

An object originating from function getCAMPEnvCov, i.e., preprocessed environmental data from a CAMP database.

covName

The text string name of an environmental covariate, with its units appended via an underscore, e.g., temperature_C.

estType

A single number taking on values 1 or 2. Number 1 is used for quantitative variables, while number 2 is used for quantitative.

traps

A vector of trapPositionIDs encompassing all the unique traps in data frame obs.eff.df.

obs.eff.df

A data frame containing observed efficiency trials. Note that this data frame contains one day for all in-between days, given efficiency trials.

xwalk

A data frame containing lookup information tying subSiteID to the unique identifying ourSiteIDChoice1 (and ourSiteIDChoice2) in the online postgreSQL covariate database.

oursitevar

The integer of length one identifying the ourSiteIDChoice1 (or ourSiteIDChoice2) of the subSiteID's identifying station number in the postgreSQL covariate database.

Details

Quantitative variables are fed into a smoothing spline (via function smooth.spline) so as to allow for exact interpolation / prediction on efficiency time values.

Qualitative variables, which currently only includes "weather", simply reports values. No smoothing is performed.

Value

Data frame obs.eff.df with the requested covariate's data values appended on days for which data were available.

Author(s)

WEST Inc.

See Also

getCAMPEnvCov

Examples

## Not run: 
estCovar(dbCov,covName,estType,traps,obs.eff.df)

## End(Not run)

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