Learn R Programming

BrailleR (version 1.0.2)

ViewSVG: Create the necessary files to allow interactive viewing of SVG

Description

Copy files from the package folders to the current working directory and write a markdown file that contains the links to all accessible SVG files in the current directory.

Usage

ViewSVG(file = "index")

Value

NULL. This function exists for its side effects only.

Arguments

file

The file basename to be used. This file will be made in the current directory.

Author

A. Jonathan R. Godfrey and James A. Thompson

Details

This will create a html file that has a list of the available svg in the current directory. This only supports the current working directory at the moment. However this is planned on changing in the future. To make the files you can use the MakeAccessibleSVG() function

References

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

MakeAccessibleSVG

Examples

Run this code
library(ggplot2)

# Make a few svg webpages
tsplot = TimeSeriesPlot(airquality, x=airquality$Temp)
MakeAccessibleSVG(tsplot, file = "tsplot")

barChart = ggplot(Orange, aes(x = Tree)) +
  geom_bar()
MakeAccessibleSVG(barChart, file = "barChart")

histogram = ggplot(attenu, aes(x=dist)) +
geom_histogram()
  histogram
MakeAccessibleSVG(histogram, file="histogram")

# Display the 'home' page
ViewSVG()

# Cleaning up afterwards
# Created by the MakeAccessibleSVG (xml and svg are auto deleted)
unlink("histogram.html")
unlink("barChart.html")
unlink("tsplot.html")
unlink("index.html") # Created by the ViewSVG function

Run the code above in your browser using DataLab