boxplot: Create a standard boxplot with a few extra elements added to...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/MaskedFunctions.R

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

1

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. 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.

Value

An object of class boxplot.

Note

I would love to see this function become redundant. This will happen if the extra functionality is included in the boxplot() function in the graphics package. This should be possible as the user experience will not be any different, no matter if the user is blind or sighted.

Author(s)

A. Jonathan R. Godfrey

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

BrailleR documentation built on Aug. 10, 2018, 5:04 p.m.