--- title: "Accessibility Example" author: "This document should be close to 508 compliant if the post-processing steps are correctly performed." date: 4/21/2018 fontsize: 11pt output: pdf_document: keep_tex: yes header-includes: - \RequirePackage{accsupp} - \RequirePackage{pdfcomment} - \newcommand{\AccTool}[2]{\BeginAccSupp{method=pdfstringdef,unicode,Alt={{#1}}}\pdftooltip{{#2}}{{#1}}\EndAccSupp{}} --- ```{r setup, include=FALSE} if (!require("knitr")) install.packages("knitr") if (!require("ggplot2")) install.packages("ggplot2") library(knitr) library(ggplot2) knitr::opts_chunk$set(echo = TRUE) ``` ## A Plot This is a plot of the prices of 5,000 round cut diamonds. ```{r diamonds, fig.height = 3, echo = F, results = 'hide', warning = F, error = F, message = F} ggplot(diamonds[sample(1:50000, 5000),]) + geom_point(aes(x=carat, y=price, color=cut), alpha = 0.5) + geom_smooth(aes(x=carat, y=price, color=cut)) ``` ## A Table This is a table of distances between cities. ```{r distances, echo = F, results = 'asis', warning = F, error = F, message = F} kable(as.matrix(eurodist)[1:8,1:8]) ```