getCAMPEnvCov: getCAMPEnvCov

View source: R/getCAMPEnvCov.R

getCAMPEnvCovR Documentation

getCAMPEnvCov

Description

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

Usage

getCAMPEnvCov(dbCov, cov, covID, unitID)

Arguments

dbCov

The data frame resulting from a query against the EnvDataRaw table in a CAMP mdb, following unit-code clean-up via the QryCleanEnvCov SQL sequence.

cov

The text string name of the environmental covariate in the EnvDataRaw table of the CAMP Access database.

covID

The text string name of the environmental covariate units variable tied to cov in the EnvDataRaw table of the CAMP Access database.

unitID

A single number describing the CAMP Access unit code appropriate for the provided cov and unitID. These derive from lookup table luUnit in the CAMP database.

Details

Qualitative variables, which currently only includes "weather", do not subset to values with a valid unitID, if only because these don't exist. Alternatively, a lookup table of all weather values ever recorded is used to map to one of four ordinal values of increasing cloudiness.

Value

A data frame containing all the records from table EnvDataRaw in the CAMP database. Only records with a covID record matching the unitID are returned, although all unique values encountered are saved as attribute "uniqueUnitID".

Author(s)

WEST Inc.

See Also

estCovar

Examples

## Not run: 
getCAMPEnvCov(cov,covID,unitID)

## End(Not run)

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