dbAdd_physical_quantity: Add a physical quantity into 'physical_quantity' table

Description Usage Arguments Details Value See Also Examples

View source: R/db_write.R

Description

These function add rows defining a physical quantity into physical_quantity. Follow the CF conventions as far as possible. dbAdd_physical_quantity supports this by getting both the unit and the description from valid standard names set with pq_name. dbWriteTable_physical_quantity allows entering the strings manually, however, it does not enforce valid CF strings.

Usage

1
2
3
4
5
6
7
8
9
dbAdd_physical_quantity(conn, pq_name, pq_comment = NULL)

dbWriteTable_physical_quantity(
  conn,
  pq_name,
  pq_unit,
  pq_description = NULL,
  pq_comment = NULL
)

Arguments

conn

Database connection.

pq_name

String vector of name of physical quantity.

pq_comment

String vector of additional comments.

pq_unit

String vector of units of physical quantity. Use "1" for unitless quantities.

pq_description

String vector of description of physical quantity.

Details

dbAdd_physical_quantity queries http://cfconventions.org/Data/cf-standard-names/48/src/cf-standard-name-table.xml once per session. Thus, it requires an internet connection.

Value

Data frame of newly added rows.

See Also

Other custom dbWriteTable functions: dbAddCorrection_station_adlershof(), dbAddCorrection_station_patagonia(), dbAdd_calibration_state(), dbAdd_device_model(), dbAdd_device(), dbAdd_integration(), dbAdd_measurand(), dbAdd_station_adlershof(), dbAdd_station_patagonia(), dbWriteTable_device_manufacturer(), dbWriteTable_device_type(), dbWriteTable_integration_type(), dbWriteTable_person(), dbWriteTable_quality_flag(), dbWriteTable_site()

Examples

1
2
3
4
5
6
## Not run: 
con <- dbConnect_klimageo()
dbWriteTable_physical_quantity(con, "air temperature", "degC")
dbDisconnect(con)

## End(Not run)

sebschub/klimageodb documentation built on Sept. 25, 2021, 4:16 p.m.