Description Usage Arguments Value Examples
Helper function to perform a basic SELECT *
from the noted table projected down by the optional
where clause. Note that some internal processing is performed to reflect general usage patterns
including removing the ROW_ID
column and converting DATE
and TIME
fields to
POSIXct date-time format.
1 | db_get_from_table(con, table, where = NULL)
|
con |
A DBIConnection object, as returned by dbConnect(). |
table |
a character string representing a valit MIMIC-III table name. |
where |
a character string representing a SQL |
a tibble with the results.
1 2 3 4 5 6 7 8 9 10 | con <- RSQLite::dbConnect(RSQLite::SQLite(), ":memory:")
p <- tibble::tibble(SUBJECT_ID = c(10006, 10011))
a <- tibble::tibble(SUBJECT_ID = c(10006, 10011))
RSQLite::dbWriteTable(con, "PATIENTS", p)
RSQLite::dbWriteTable(con, "ADMISSIONS", a)
patients <- db_get_from_table(con, "PATIENTS")
admissions <- db_get_from_table(con, "ADMISSIONS", where = "WHERE SUBJECT_ID = 10006")
RSQLite::dbDisconnect(con)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.