BrailleR (version 0.29.1)

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

Description

This function is a wrapper to the standard boxplot() 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

boxplot(x, ...)

Arguments

x

a numeric variable.

additional arguments passed on to the plotting function.

Value

An object of class boxplot.

Details

This function masks the function of the same name in the graphics package. The base R implementation does create an object, but does not give it a class attribute, the object does not store all graphical arguments that are passed to the boxplot() 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 boxplot. See the help page for the graphics::boxplot() function to get a more complete description of boxplot creation.

References

The problem of not including class attributes for graphs was identified in: 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 boxplot function should be consulted; see the entry in the graphics package

Examples

Run this code
# NOT RUN {
x=rnorm(1000)
op = par(mfcol=c(2,1))
# the stamdard boxplot function returns
MyBoxplot=graphics::boxplot(x, main="Example boxplot (graphics package)", horizontal=TRUE)
MyBoxplot

# while this version returns
MyBoxplot=boxplot(x, main="Example boxplot (BrailleR package)", horizontal=TRUE)
MyBoxplot
par(op)

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

Run the code above in your browser using DataLab