memdb_frame

0th

Percentile

Create a database table in temporary in-memory database.

memdb_frame() works like tibble::tibble(), but instead of creating a new data frame in R, it creates a table in src_memdb().

Usage
memdb_frame(..., .name = unique_table_name())

tbl_memdb(df, name = deparse(substitute(df)))

src_memdb()

Arguments
...

A set of name-value pairs. Arguments are evaluated sequentially, so you can refer to previously created elements. These arguments are processed with rlang::quos() and support unquote via !! and unquote-splice via !!!. Use := to create columns that start with a dot.

df

Data frame to copy

name, .name

Name of table in database: defaults to a random name that's unlikely to conflict with an existing table.

Aliases
  • memdb_frame
  • tbl_memdb
  • src_memdb
Examples
# NOT RUN {
library(dplyr)
df <- memdb_frame(x = runif(100), y = runif(100))
df %>% arrange(x)
df %>% arrange(x) %>% show_query()

mtcars_db <- tbl_memdb(mtcars)
mtcars_db %>% count(cyl) %>% show_query()
# }
Documentation reproduced from package dbplyr, version 1.4.2, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.