BrailleR (version 1.0.2)

VI: Extract information from a graphical object

Description

A method that extracts the most relevant information from a graphical object (or implied set of graphical objects) and display the interpreted results in text or HTML form.

The method includes representations of summary methods that are more suitable for blind users. For example, the method for a data.frame uses a single line for each variable instead of the normal column layout used by the summary method.

Usage

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

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

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

# S3 method for htest VI(x, Describe=FALSE, digits = getOption("digits"), ...)

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

# S3 method for ggplot VI(x, Describe=FALSE, threshold=10, template=system.file("whisker/VIdefault.txt", package="BrailleR"), ...)

Value

Nothing is returned when working with most of the functions functionality.

The VI.lm() method is the first to move away from this idea and use a process that builds on the UniDesc() function. In this case, the method creates an R markdown file and compiles it into HTML. The HTML document is opened if the R session is interactive.

VI.ggplot returns a structure containing a hierarchical representation of the graph as well as the text description as a character vector. When run interactively, the text description is printed.

Arguments

x

any R object

Describe

Should the Describe() function be called at the same time

digits

number of decimal places to show

threshold

Only for ggplot. Maximum number of data items that should be individually listed in the output.

template

Only for ggplot. Template file, in mustache format, to be used in creating the text

...

other arguments, currently ignored

Author

A. Jonathan R. Godfrey, Debra Warren, Sophie Banks, Tony Hirst, Timothy P. Bilton and James A. Thompson

Details

VI() is intended to extract the specific details for the particular graph or output.

It will provide the information as a printout to the console/terminal window.

Examples

Run this code
# Base R
RandomX=rnorm(500)
PlottedFig=hist(RandomX)
VI(PlottedFig)

# ggplot
if(require(ggplot2)){
ggplot(economics_long, aes(date, value01, colour = variable)) +
  geom_line() +
  ggtitle('dummy title')
}

Run the code above in your browser using DataLab