Description Usage Arguments Details Value See Also Examples
In general, use dbAddCorrection_station_patagonia
to consistently add
the corrected measurement values to station_patagonia_correction
and
to modify the quality flags in station_patagonia
.
dbWriteTable_station_patagonia_correction
and
dbUpdate_station_patagonia_qf_id
do the respective single actions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | dbAddCorrection_station_patagonia(
conn,
stapa_id,
qf_id,
stapacor_datetime,
md_id,
stapacor_value
)
dbUpdate_station_patagonia_qf_id(conn, stapa_id, qf_id, overwrite = TRUE)
dbWriteTable_station_patagonia_correction(
conn,
stapa_id,
stapacor_datetime,
md_id,
stapacor_value
)
|
conn |
Database connection. |
stapa_id |
Integer vector of |
qf_id |
Integer vector with 1 <= qf_id <= 9 indicating value ok and qf_id >= 10 indicating value not ok. |
stapacor_datetime |
POSIXct vector of corrected date and time of measurement. |
md_id |
Integer vector of measurand ID. |
stapacor_value |
Numeric vector of corrected value of measurement. |
overwrite |
Overwrite non-null qf_id values. If |
By design, qf_id with values >= 10 in station_patagonia
indicates that
entries in station_patagonia
are corrected in
station_patagonia_correction
. Thus,
dbAddCorrection_station_patagonia
imposes the constraint qf_id >= 10.
dbUpdate_station_patagonia_qf_id
, on the other hand, allows general
values of qf_id (further checks are done by the database).
For performance reason, contrary to the meta data table functions, these functions do not return anything.
Other custom dbWriteTable functions:
dbAddCorrection_station_adlershof()
,
dbAdd_calibration_state()
,
dbAdd_device_model()
,
dbAdd_device()
,
dbAdd_integration()
,
dbAdd_measurand()
,
dbAdd_physical_quantity()
,
dbAdd_station_adlershof()
,
dbAdd_station_patagonia()
,
dbWriteTable_device_manufacturer()
,
dbWriteTable_device_type()
,
dbWriteTable_integration_type()
,
dbWriteTable_person()
,
dbWriteTable_quality_flag()
,
dbWriteTable_site()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
con <- dbConnect_klimageo()
add all required entries before with the respective dbWriteTable_*
dbAddCorrection_station_patagonia(
con,
stapa_id = c(1,2),
qf_id = c(11,11),
stapacor_datetime =
as.POSIXct(c("2017-01-01 12:15:12", "2017-01-01 12:15:12"), tz = "UTC"),
md_id = c(1,1),
stapacor_value = c(290.12, 289.23))
dbDisconnect(con)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.