View source: R/export_sqlite.R
export_sqlite | R Documentation |
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.
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
# 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.