tbl.Pool | R Documentation |
Wrappers for key dplyr (and dbplyr) methods so that pool works seemlessly with dbplyr.
tbl.Pool(src, from, ..., vars = NULL)
copy_to.Pool(dest, df, name = NULL, overwrite = FALSE, temporary = TRUE, ...)
src , dest |
A dbPool. |
from |
Name table or |
... |
Other arguments passed on to the individual methods |
vars |
A character vector of variable names in |
df |
A local data frame, a |
name |
Name for remote table. Defaults to the name of |
overwrite |
If |
temporary |
if |
library(dplyr)
pool <- dbPool(RSQLite::SQLite())
# copy a table into the database
copy_to(pool, mtcars, "mtcars", temporary = FALSE)
# retrieve a table
mtcars_db <- tbl(pool, "mtcars")
mtcars_db
mtcars_db %>% select(mpg, cyl, disp)
mtcars_db %>% filter(cyl == 6) %>% collect()
poolClose(pool)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.