Learn R Programming

RObsDat (version 16.03)

assembleDataWhereClause: Internal functions to generate a where clause for access to the DataValues table.

Description

These functions is used to avoid code repetition

Usage

assembleDataWhereClause(ID = NULL, from = NULL, to = NULL, tz=c("global", "UTC", "GMT", "0", "local"), SiteID = NULL, VariableID = NULL, Offset = NULL, OffsetTypeID = NULL, CensorCode = NULL, QualifierID = NULL, MethodID = NULL, SourceID = NULL, SampleID = NULL, DerivedFromID = NULL, QualityControlLevelID = NULL, exact = FALSE)
expand.where(w.o, var, var.name, exact = TRUE, isnumeric=FALSE)

Arguments

ID
RecordID
from
Start date
to
End date
tz
String indicating whether the data should be obtained in the local or global time zone.
SiteID
Information about the Site at which the data was observed.
VariableID
Information about what variable was observed.
Offset
Information about the offset of the observation. See also OffsetType.
OffsetTypeID
Information about the type of the offset as defined in the OffsetTypes table. See also addOffsetType.
CensorCode
Information about the censor used for the observation.
QualifierID
Qualifying information that can note anything unusual or problematic about individual observations such as, for example, 'holding time for analysis exceeded' or 'incomplete or inexact daily total.'
MethodID
The method of field data collection, which may specify 'how' a physical observation was made or collected
SourceID
Reference to the original sources of the data, providing information sufficient to retrieve and reconstruct the data value from the original data files
SampleID
Information about physical samples analysed in a laboratory to obtain an observation.
DerivedFromID
Reference to another record in the database, from which a value was derived.
QualityControlLevelID
Level of quality controlled applied to a dataset.
exact
Boolean indicating if search terms should be matched exactly or used as partial search terms (like %% notation in SQL). Actually, this has no influence on assembleDataWhereClause.
w.o
DataFrame with the "where object" (see code)
var
The value of the variable
var.name
The name of the variable
isnumeric
Boolean indicating if variable is of type numeric (and does not need to be quoted)

Value

assembleDataWhereClause returns the where clause string including the WHERE statement.exand.where returns the updated w.o.

Details

What to add?

See Also

See Also as odm1_1-class

Examples

Run this code
#See code

Run the code above in your browser using DataLab