Package {yaleBraille}


Type: Package
Title: Generate Braille-Enabled Graphics
Version: 0.2.2
Description: Provides tools for rendering and visualizing Braille patterns in R, using the liblouis translation library. For more information see https://github.com/wininger/yaleBraille.
License: LGPL-2.1 | LGPL-3 [expanded from: LGPL (≥ 2.1)]
Imports: grDevices, graphics, stats, sysfonts, showtext
Encoding: UTF-8
Language: en-US
NeedsCompilation: yes
URL: https://github.com/wininger/yaleBraille
BugReports: https://github.com/wininger/yaleBraille/issues
Config/roxygen2/version: 8.1.0
Config/Needs/check: spelling
LazyData: true
Suggests: knitr, rmarkdown, spelling
VignetteBuilder: knitr
RoxygenNote: 7.3.3
Packaged: 2026-09-22 16:08:43 UTC; wininger
Author: Mike Wininger ORCID iD [aut, cre], liblouis contributors [ctb, cph] (Authors of the bundled liblouis C library (https://liblouis.io))
Maintainer: Mike Wininger <michael.wininger@yale.edu>
Depends: R (≥ 3.5.0)
Repository: CRAN
Date/Publication: 2026-10-02 09:50:02 UTC

Data visualization tools for low-vision and blind end-users

Description

This package provides plotting functions similar to those found in Base R, but with _br suffixes, indicating Braille-functionality. These functions deliver as output a two-page .pdf file: first page is a braille-annotated graph; second page is the text-based graph. Coding occurs via conventional syntax (i.e. text); translation is executed by the liblouis package. Graphical standards are adapted to facilitate printing onto swell-paper. For more information see <https://github.com/wininger/yaleBraille>.

Author(s)

Mike Wininger, michael.wininger@yale.edu

Examples

  
    library(yaleBraille)
    data(yaleSports)
    translateToBraille(yaleSports$Sport[1], table = "en-ueb-g2.ctb")
    plot_br(Weight~Height, data=yaleSports)
  

Braille on Bar Plot

Description

Create Braille-enabled Bar Plot

Usage

barplot_br(...)

Arguments

...

plot parameters as would typically be used in barplot()

Value

two-page .pdf file

Examples


yale = data.frame(yaleSports)
tbl = table(yale$Sport)
barplot_br(tbl,
           over="Bar Chart",
           main="Yale Athletics Dataset",
           xlab="x-axis = Sport",
           ylab="y-axis = Count (n athletes)",
           stem="newBar")


air = airquality
air$Feel = cut(air$Temp,breaks=c(0,65,80,1000),labels=c("cool","warm","hot"))
tbl = table(air$Feel)
barplot_br(tbl,
           over="Bar Chart",
           main="Air Quality: NYC (1973)",
           xlab="x-axis = Temperature Feel",
           ylab="y-axis = Count (n days)",
           stem="airBar",
           cex.main=1.5,
           cex.axis=3.5,
           col="purple")


Braille on Box Plot

Description

Create Braille-enabled Box Plot

Usage

boxplot_br(...)

Arguments

...

plot parameters as would typically be used in boxplot()

Value

two-page .pdf file

Examples


yale = data.frame(yaleSports)
boxplot_br(Height~Sport,data=yale,
      over="Box Plot",
      main="Yale Athletics Dataset",
      xlab="x-axis = Sport",
      ylab="y-axis = Height (inches)",
      stem="newBox")


air = airquality
air$Month = as.factor(air$Month)
boxplot_br(Ozone~Month,data=air,
      lwd=2,pch=16,las=3,lty=1,
      over="Box Plot",
      main="Air Quality: NYC (1973)",
      xlab="x-axis = Month (numeric)",
      ylab="y-axis = Ozone (ppb)",
      stem="airBox",
      cex.main=1.5,
      cex.axis=1.5,
      col="chocolate1")


Braille on Histogram

Description

Create Braille-enabled Histogram

Usage

hist_br(x, breaks = 20, ...)

Arguments

x

numerical data for summarizing in histogram

breaks

number (plus one) of bins in the histogram

...

plot parameters as would typically be used in hist()

Value

two-page .pdf file

Examples


yale = data.frame(yaleSports)
hist_br(yale$Weight,
        over="Histogram",
        main="Yale Athletics Dataset",
        xlab="x-axis = Bodyweight (pounds)",
        ylab="y-axis = Count (n athletes)",
        stem="newHist")


air=airquality
hist_br(air$Temp,
       over="Histogram",
       main="Air Quality: NYC (1973)",
       xlab="x-axis = Temperature (deg)",
       ylab="y-axis = Count (n days)",
       stem="airHist",
       cex.main=2,
       cex.axis=2,
       col="deeppink1")


Braille on Pie Chart

Description

Create Braille-enabled Pie Chart

Usage

pie_br(...)

Arguments

...

plot parameters as would typically be used in pie()

Value

two-page .pdf file

Examples


yale = data.frame(yaleSports)
tbl = table(yale$Sport)
pie_br(tbl,
       over="Pie Chart",
       main="Yale Athletics Dataset",
       xlab=" ",
       ylab=" ",
       stem="newPie")


air = airquality
air$Feel = cut(air$Temp,breaks=c(0,65,80,1000),labels=c("cool","warm","hot"))
tbl = table(air$Feel)
pie_br(tbl,
       over="Pie Chart",
       main="Air Quality: NYC (1973)",
       xlab="",
       ylab="",
       stem="airPie",
       cex.main=2,
       cex=1)


Braille on Scatter or Line Plots

Description

Create Braille-enabled Scatter or Line Plot

Usage

plot_br(x, y = NULL, data = NULL, ...)

Arguments

x

variable for plotting (independent variable, if y is not NULL)

y

dependent variable for plotting

data

data-frame in case formula argument utilized

...

plot parameters as would typically be used in plot()

Value

two-page .pdf file

Examples


yale = data.frame(yaleSports)
plot_br(Weight~Height,data=yale,
        over="Scatter Plot",
        main="Yale Athletics Dataset",
        xlab="x-axis = Height (inches)",
        ylab="y-axis = Weight (pounds)",
        stem="plotScatter")

yale = data.frame(yaleSports)
plot_br(sort(yale$Weight[1:20]),
        over="Scatter Plot",
        main="Yale Athletics Dataset",
        xlab="Athlete (sorted)",
        ylab="y-axis = Weight (pounds)",
        type="b",
        stem="plotLine")

air = airquality
plot_br(air$Temp,air$Ozone,
        over="Scatter Plot",
        main="Air Quality: NYC (1973)",
        xlab="x-axis = Temperature (deg)",
        ylab="y-axis = Ozone (ppb)",
        stem="airPlot",
        cex.main=1.5,
        cex.axis=1.5,
        col="red",
        pch=16)


Translate text to Braille

Description

Translate text to Braille

Usage

translateToBraille(text, table)

Arguments

text

A character string to translate.

table

The Braille table to use (e.g., "en-ueb-g2.ctb").

Value

A character string of translated Braille.


Yale Sports Dataset

Description

Adapted from classic dataset from Yale School of Public Health Introduction to Biostatistics courses (EPH-505, EMPH-535, PUBH-505). Date retrieved from Yale Athletics pages.

Usage

yaleSports

Format

A data frame with 1,228 rows and 6 variables:

Year

Year of sport team operation

Sport

Student athlete team membership

ScramName

Student athlete full name alpha-sorted and lower-cased

Class

Student athlete class standing

Height

Student athlete height in inch units

Weight

Student athlete weight in pounds units

Source

https://yalebulldogs.com (Retrieved Summer, 2018)