Description Usage Arguments Value See Also Examples
dbWriteTable_measurand
requires a correct physical quantity id, site
id, calibrated device id, integration id and, optionally, person id.
dbAdd_measurand
derives the physical quantity id, site id, calibrated
device id and person id from the respective names; integration id still have
to be entered numerical as id. Note that dbAdd_measurand
derives the calibrated device id from the device id with the most recent
calibration date calstate_datetime
. Use
dbReadTable_integration_detail
to query the integration table
and select the correct id.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | dbAdd_measurand(
conn,
md_name,
md_setup_datetime,
pq_name,
site_name,
dev_name,
int_id,
md_height = NULL,
md_orientation = NULL,
md_tilt = NULL,
pers_name = NULL,
md_comment = NULL
)
dbWriteTable_measurand(
conn,
md_name,
md_setup_datetime,
pq_id,
site_id,
calstate_id,
int_id,
md_height = NULL,
md_orientation = NULL,
md_tilt = NULL,
pers_id = NULL,
md_comment = NULL
)
|
conn |
Database connection. |
md_name |
Character vector of measurand name. |
md_setup_datetime |
POSIXct vector of date and time of set-up of measurand. |
pq_name |
String vector of name of physical quantity. |
site_name |
String vector of name of site or name of campaign. |
dev_name |
String vector of name of device. |
int_id |
Integer vector of |
md_height |
Numeric vector of measurement height. |
md_orientation |
Numeric vector of north-south measurement orientation. |
md_tilt |
Numeric vector of measurement tilt. |
pers_name |
Character vector of person name. |
md_comment |
Character vector of additional information. |
pq_id |
Integer vector of |
site_id |
Integer vector of |
calstate_id |
Integer vector of |
pers_id |
Integer vector of |
Data frame of newly added rows.
Other custom dbWriteTable functions:
dbAddCorrection_station_adlershof()
,
dbAddCorrection_station_patagonia()
,
dbAdd_calibration_state()
,
dbAdd_device_model()
,
dbAdd_device()
,
dbAdd_integration()
,
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 15 | ## Not run:
con <- dbConnect_klimageo()
# add all required entries before with the respective dbWriteTable_*
dbWriteTable_measurand(md_name = "TA2M_1",
md_setup_datetime = as.POSIXct("2012-01-01 12:15:12", tz = "UTC"),
pq_id = 1,
site_id = 1,
calstate_id = 1,
int_id = 1,
md_height = 2.,
pers_id = 1,
md_comment = "the 2m temperature"))
dbDisconnect(con)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.