Describe | R Documentation |
A function to help describe what a graph model would look like, to a vision impaired person.
Describe(x, VI=FALSE, ...)
## S3 method for class 'histogram'
Describe(x, VI=FALSE, ...)
## S3 method for class 'ggplot'
Describe(x,VI=FALSE, whichLayer=NULL, ...)
x |
any R object |
VI |
Should |
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 |
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.
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.
A. Jonathan R. Godfrey and James A. Thompson
# 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.