hist {BrailleR}R Documentation

Create a standard histogram with a few extra elements added to the output object

Description

This function is a wrapper to the standard hist() function in the graphics package. It adds detail to the stored object so that a better text description can be formulated using the VI() method in the BrailleR package.

Usage

hist(x, ...)

Arguments

x

a numeric variable.

...

additional arguments passed on to the plotting function.

Details

This function masks the function of the same name in the graphics package. Even though the base R implementation does create an object of class histogram, the object does not store all graphical arguments that are passed to the hist() function. The functionality should be no different at all for anyone who is not using the VI() function to gain a more detailed text description of the histogram. See the help page for the graphics::hist() function to get a more complete description of histogram creation.

Value

An object of class histogram as per the hist() function from the graphics package, with the addition of any calls to the main title or axis labels.

Author(s)

A. Jonathan R. Godfrey

References

Godfrey, A.J.R. (2013) ‘Statistical Software from a Blind Person's Perspective: R is the Best, but we can make it better’, The R Journal 5(1), pp73-79.

See Also

The base R implementation of the hist function should be consulted, using the entry in the graphics package

Examples

x=rnorm(1000)
# the stamdard hist function returns
MyHist=graphics::hist(x, xlab="random normal values", main="Example histogram (graphics package)")
MyHist

# while this version returns
MyHist=hist(x, xlab="random normal values", main="Example histogram (BrailleR package)")
MyHist

# The VI() method then uses the extra information stored
VI(MyHist)

[Package BrailleR version 0.32.1 Index]