Description Usage Arguments Details Value See Also Examples
dbWriteTable_station_patagonia
requires a correct measurand id while
dbAdd_station_patagonia
derives that from the measurand name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | dbAdd_station_patagonia(
conn,
md_name,
stapa_datetime,
stapa_value,
qf_id = NULL
)
dbWriteTable_station_patagonia(
conn,
stapa_datetime,
md_id,
stapa_value,
qf_id = NULL
)
|
conn |
Database connection. |
md_name |
Character vector of measurand name. |
stapa_datetime |
POSIXct vector of date and time of measurement. |
stapa_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_patagonia
requires a correct measurand id
md_id
to write measurements to station_patagonia.
dbAdd_station_patagonia
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_adlershof()
,
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_patagonia(con,
md_name = "TA2M_1"
stapa_datetime = as.POSIXct("2017-01-01 12:05:12", tz = "UTC"),
stapa_value = 272.15)
dbWriteTable_station_patagonia(con,
stapa_datetime = as.POSIXct("2017-01-01 12:15:12", tz = "UTC"),
md_id = 1,
stapa_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.