HistEZR {RcmdrPlugin.EZR}R Documentation

Plot a Histogram

Description

This function is a wrapper for the hist function in the base package, permitting percentage scaling of the vertical axis in addition to frequency and density scaling. This function is modified from the Hist() function in the Rcmdr package. HistEZR() package in RcmdrPlugin.EZR uses hist2() insted of hist(). In hist2(), the method to set breakpoints between histogram cells was changed from "Sturges" to "Scott".

Usage

HistEZR(x, scale=c("frequency", "percent", "density"), xlab=deparse(substitute(x)), 
	ylab=scale, main="", ...)

Arguments

x

a vector of values for which a histogram is to be plotted.

scale

the scaling of the vertical axis: "frequency" (the default), "percent", or "density".

xlab

x-axis label, defaults to name of variable.

ylab

y-axis label, defaults to value of scale.

main

main title for graph, defaults to empty.

...

arguments to be passed to hist.

Value

This function returns NULL, and is called for its side effect — plotting a histogram.

See Also

hist

Examples

    data(iris, package="datasets")
    HistEZR(iris$Petal.Length, scale="percent")
    

[Package RcmdrPlugin.EZR version 1.68 Index]