R/Rchive/spark_specific.R

Defines functions collect.SparkDataFrame display

# display a sample
display <- function(x, n = NULL) {

  rows <- if (is.null(n)) {
    getOption("tibble.print_min", getOption("dplyr.print_min", 10))
  } else n

  as_tibble(SparkR::take(x, rows))

}

# collect
collect.SparkDataFrame <- function(...) {
  SparkR::collect(...)
}
danzafar/tidyspark documentation built on Sept. 30, 2020, 12:19 p.m.