Description Usage Arguments Details Value See Also
These function retrieve the respective tables and views as a data frame from the database.
conn |
Database connection. |
start_datetime |
Start date and time as a single POSIXct value. |
end_datetime |
End date and time as a single POSIXct value. |
md_id |
Integer vector of measurand ID. |
Most of the listed function retrieve present tables in the database. For
convinience, function of the form dbReadTable_*_detail receive the
views which join different database tables together. For example,
dbReadTable_measurand_detail retrieves the measurand table with
all id fields replaced by the corresponding information in
physical_quantity, calibration_state, etc. Only the tables that
include measurement data allow a preselection of the data to retrieve only a
part of the data set.
The functions return a data frame that contains the data from the
respective remote table, effectively the result of calling
dbGetQuery with SELECT * FROM <name>. Commands
that retrieve measurement data (dbReadTable_station_*) allow a
preselection of the data with start_datetime, end_datetime
and md_id; all other tables are retrieved completely. An error is
raised if the table does not exist. An empty table is returned as a data
frame with zero rows.
dbReadTable for the general function to retrieve
complete tables. dbGetQuery and
http://db.rstudio.com/best-practices/run-queries-safely/ for more
general SQL queries. Alternatively, you can use tbl of
the dplyr package to only work on part of the database.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.