dplyr
and sparklyr
Run DEV version of dplyr
(appears to be CRAN release candidate) and DEV sparklyr
as of 5-19-2017.
# devtools::install_github('tidyverse/dbplyr') # devtools::install_github('rstudio/sparklyr') suppressPackageStartupMessages(library('dplyr')) packageVersion("dplyr") library('sparklyr') packageVersion("sparklyr") if(requireNamespace("dbplyr", quietly = TRUE)) { packageVersion("dbplyr") } R.Version()$version.string base::date() sc <- sparklyr::spark_connect(version='2.0.2', master = "local")
d1 <- copy_to(sc, data.frame(x=1:3, y=4:6), 'd1', overwrite = TRUE) d2 <- copy_to(sc, data.frame(x=1:3, y=7:9), 'd2', overwrite = TRUE) left_join(d1, d2, by='x')
dLocal <- data.frame(x = 1:2, origCol = c('a', 'b'), stringsAsFactors = FALSE) d <- copy_to(sc, dLocal, 'd', overwrite = TRUE) # local rename(dLocal, x2 = x, origCol2 = origCol) # Spark rename(d, x2 = x, origCol2 = origCol)
spark_disconnect(sc) rm(list=ls()) gc(verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.