Learn R Programming

BrailleR (version 1.0.2)

Describe: Describe method to help visualize plot types.

Description

A function to help describe what a graph model would look like, to a vision impaired person.

Usage

Describe(x, VI=FALSE, ...)

# S3 method for histogram Describe(x, VI=FALSE, ...)

# S3 method for ggplot Describe(x,VI=FALSE, whichLayer=NULL, ...)

Value

A description in the format of a list. It will have the title, general info and RHints. If multiple layers of a ggplot are being described then it will be a list of descriptions for each layer.

Arguments

x

any R object

VI

Should VI() be called at the same time

whichLayer

Only used with Describe.ggplot, if NULL will either display the layer if ggplot has one layer, ask user for input if it is an interactive session or print out all of the layers

...

other arguments, currently ignored

Author

A. Jonathan R. Godfrey and James A. Thompson

Details

Describe() is for explaining how a given type of graph appears to a sighted person and is intended for use by blind people who do not know how the graph looks. There is room to add hints for displaying the graphs in a more visually appealing manner.

The text description will only be generic to the plot type and not specific information for specific information see VI().

Unlike VI() and ggplot Describe needs to be explicitly called to show its output.

Examples

Run this code
# Base R
scatter = FittedLinePlot(NULL, x = rnorm(1e2), y = rnorm(1e2))
Describe(scatter)
hist = hist(rnorm(1e3))
Describe(hist)

# ggplot
if(require(ggplot2)){
simplePoint = ggplot(NULL, aes(rnorm(1e2), rnorm(1e2))) +
  geom_point()
Describe(simplePoint)
}

Run the code above in your browser using DataLab