Compute a histogram over a numeric column. If breaks=="FD", the MAD is used over the IQR in computing bin width. Note that we do not beautify the breakpoints as R does.

h2o.hist(x, breaks = "Sturges", plot = TRUE)

Arguments

x

A single numeric column from an H2OFrame.

breaks

Can be one of the following: A string: "Sturges", "Rice", "sqrt", "Doane", "FD", "Scott" A single number for the number of breaks splitting the range of the vec into number of breaks bins of equal width A vector of numbers giving the split points, e.g., c(-50,213.2123,9324834)

plot

A logical value indicating whether or not a plot should be generated (default is TRUE).

Examples

# NOT RUN {
library(h2o)
h2o.init()

f <- "http://h2o-public-test-data.s3.amazonaws.com/smalldata/iris/iris_train.csv"
iris <- h2o.importFile(f)
h2o.asnumeric(iris["petal_len"])
h2o.hist(iris["petal_len"], breaks = "Sturges", plot = TRUE)
# }