Description Usage Arguments Details Value See Also Examples
dbWriteTable_station_adlershof requires a correct measurand id while
dbAdd_station_adlershof derives that from the measurand name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | dbAdd_station_adlershof(
conn,
md_name,
stadl_datetime,
stadl_value,
qf_id = NULL
)
dbWriteTable_station_adlershof(
conn,
stadl_datetime,
md_id,
stadl_value,
qf_id = NULL
)
|
conn |
Database connection. |
md_name |
Character vector of measurand name. |
stadl_datetime |
POSIXct vector of date and time of measurement. |
stadl_value |
Numeric vector of measurement values. |
qf_id |
Integer vector with 1 <= qf_id <= 9 indicating value ok and qf_id >= 10 indicating value not ok. |
md_id |
Integer vector of measurand ID. |
dbWriteTable_station_adlershof requires a correct measurand id
md_id to write measurements to station_adlershof.
dbAdd_station_adlershof finds md_id from a given measurand name
md_name. To this end, it queries the table measurand and
selects the according to md_setup_datetime the most recent
md_id.
For performance reason, contrary to the meta data table functions, this function does not return anything.
Other custom dbWriteTable functions:
dbAddCorrection_station_adlershof(),
dbAddCorrection_station_patagonia(),
dbAdd_calibration_state(),
dbAdd_device_model(),
dbAdd_device(),
dbAdd_integration(),
dbAdd_measurand(),
dbAdd_physical_quantity(),
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_*
dbAdd_station_adlershof(con,
md_name = "TA2M_1"
stadl_datetime = as.POSIXct("2017-01-01 12:05:12", tz = "UTC"),
stadl_value = 272.15)
dbWriteTable_station_adlershof(con,
stadl_datetime = as.POSIXct("2017-01-01 12:15:12", tz = "UTC"),
md_id = 1,
stadl_value = 273.15)
dbDisconnect(con)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.