db_histogram: Computes the bins of the histogram in the server

Description Usage Arguments Details Examples

Description

Computes the bins of the histogram in the server

Usage

1
db_histogram(data, bins = 30, output = "ggplot")

Arguments

data

Data frame or Spark table

bins

Number of bins for the Histogram. Defaults to 30.

output

Sets the type of output, defaults to 'data'. Possible values: 'data', 'ggplot'

Details

The function will use the first column in the data set. Using the dplyr::select statement prior to calling db_histogram will ease adding or removing a plotting step. The 'data' value for the 'db' argument will return a data frame instead of a plot.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# This will return a 'ggplot' of a 30 bin histogram of the 'distance' field
flights %>%
filter(arr_delay < 100) %>%
  select(distance) %>%
  db_histogram()

## End(Not run)

edgararuiz/dbutilities documentation built on May 15, 2019, 11:02 p.m.