# NOT RUN {
if (require(dbplyr)) {
mtcars2 <- src_memdb() %>%
copy_to(mtcars, name = "mtcars2-cc", overwrite = TRUE)
remote <- mtcars2 %>%
filter(cyl == 8) %>%
select(mpg:drat)
# Compute query and save in remote table
compute(remote)
# Compute query bring back to this session
collect(remote)
# Creates a fresh query based on the generated SQL
collapse(remote)
}
# }
Run the code above in your browser using DataLab