aou_compute {allofus} | R Documentation |
Compute a dplyr tbl SQL query into a temp table
Description
Computes a temporary table from a dplyr chain that returns an SQL query (e.g., tbl(con, table)) and returns the name of the temporary table. May be useful to create intermediate tables to reduce long queries. The temporary table will only exist for the current session and will nee to be created again a new session.
Usage
aou_compute(data, ..., con = getOption("aou.default.con"))
Arguments
data |
A reference to an unexecuted remote query (e.g., the result of a
|
... |
Other arugments passed to |
con |
Connection to the allofus SQL database. Defaults to
|
Details
Value
A reference to a temporary table in the database.
Examples
con <- aou_connect()
tmp_tbl <- dplyr::tbl(con, "concept") %>%
dplyr::select(concept_id) %>%
head(10) %>%
aou_compute()
tmp_tbl
[Package allofus version 1.1.0 Index]