Learn R Programming

h2o (version 2.8.4.4)

hist.H2OParsedData: Obtain and display a histogram for H2O parsed data.

Description

hist.H2OParsedData, a method for the hist generic. Obtain and returns a histogram for an H2OParsedData object.

Usage

## S3 method for class 'H2OParsedData':
hist(x, freq = TRUE, \dots)

Arguments

x
An H2OParsedData object with a single numeric column.
freq
logical; if TRUE, the histogram graphic is a representation of frequencies, the counts component of the result; if FALSE the probability density is plotted.
...
Additional arguments affecting the summary produced. (Currently unimplemented).

Value

  • An object of class "histogram" which is a list with components:
  • breaksthe n+1 cell boundaries.
  • countsn integers; count of values for each nth cell.
  • densitythe relative frequencies counts/(rows*bin_size) for each cell.
  • midsthe n cell midpoints.
  • xnamea character string with the column name of the vector.
  • equidistlogical, indicating if the distances between breaks are all the same

Details

Counts of numeric values are plotted in cells which is defined in the histogram object as breaks. The height of a rectangle is proportional to the number of points falling into the cell.

Examples

Run this code
# Request hists for an H2O parsed data set: 
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)

# Request a histogram for a subset of columns in an H2O parsed data set 
hist(prostate.hex[,3])

Run the code above in your browser using DataLab