| Title: | Extended functions to access the data in an ODM database |
|---|---|
| Description: | Extended functions to access the data in an ODM database. |
| Authors: | Hauke Sonnenberg [aut, cre] (ORCID: <https://orcid.org/0000-0001-9134-2871>), Michael Rustler [ctb] (ORCID: <https://orcid.org/0000-0003-0647-7726>), Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph] |
| Maintainer: | Hauke Sonnenberg <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-04-18 08:32:00 UTC |
| Source: | https://github.com/KWB-R/kwb.odmx |
Get lab results from database
getLabValuesGreaterOrEqualZero( db, stringsAsFactors = FALSE, keep.only.best.quality = TRUE )getLabValuesGreaterOrEqualZero( db, stringsAsFactors = FALSE, keep.only.best.quality = TRUE )
db |
name of ODBC database or full path to database file |
stringsAsFactors |
Passed to |
keep.only.best.quality |
if |
Remove raw data values if data values of better quality exist
keepOnlyBestQualityControlLevel(x, dbg = TRUE)keepOnlyBestQualityControlLevel(x, dbg = TRUE)
x |
data frame with columns |
dbg |
if |
read main ODM objects from Excel files (ID and Code or corresponding column)
readMainOdmObjects(folder)readMainOdmObjects(folder)
folder |
folder containing the files variables.xls, sources.xls, sites.xls, methods.xls. In each Excel file the cell range making up the actual table must be named "tabledata" |
list with elements variables, sources, sites,
methods each of which is a data frame with two columns (ID and code
or a similar column identifying the object).
merge VariableCode and Unit, use '<', '>' or '=' as CensorCode
simplifyColumns(x, short.codes = TRUE)simplifyColumns(x, short.codes = TRUE)
x |
data frame with columns |
short.codes |
if |
x <- data.frame(VariableCode = c("A", "B"), UnitsAbbreviation = c("mg/l", "ug/l"), CensorCode = c("lt", "nc")) simplifyColumns(x)x <- data.frame(VariableCode = c("A", "B"), UnitsAbbreviation = c("mg/l", "ug/l"), CensorCode = c("lt", "nc")) simplifyColumns(x)