Description Usage Arguments Value Examples
View source: R/export_sqlite.R
Add a list of instrument dataframes from split_instruments() to an RSQLite database, if you want to use SQL commands that way. This is really just a wrapper for lapply to add all the instruments at once.
1 | export_sqlite(conn, instrument_list, ...)
|
conn |
A database connection from RSQLite::dbConnect() |
instrument_list |
A list of instruments, either from split_instruments() or query_subjects() (but you probably want the full data from the former) |
... |
Other options to pass to dbWriteTable |
Nothing, will display a message if successful
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Set up instruments and database
# all_instruments <- split_instruments(report, lookup)
# db_con <- RSQLite::dbConnect(RSQLite::SQLite(), ":memory:")
# Send all instruments to database connection
# export_sqlite(db_con, all_instruments)
# Run a simple query
# RSQLite::dbGetQuery(dbcon, "SELECT
# wab.*,
# wabsum.aq
# FROM wab
# LEFT JOIN wabsum
# USING (record_id, redcap_repeat_instance)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.