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

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/assembleDataWhereClause.R

Description

These functions is used to avoid code repetition

Usage

1
2
3
4
5
6
7
8
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)

Details

What to add?

Value

assembleDataWhereClause returns the where clause string including the WHERE statement.

exand.where returns the updated w.o.

Author(s)

Dominik Reusser

See Also

See Also as odm1_1-class

Examples

1
#See code

RObsDat documentation built on May 29, 2017, 12:07 p.m.