access_rmd {accessrmd}R Documentation

Produce an accessible Rmarkdown file template.

Description

Creates an Rmarkdown template with the HTML structure required by screen readers.

Usage

access_rmd(
  filenm = NULL,
  title = NULL,
  subtitle = NULL,
  lan = NULL,
  author = Sys.info()[8],
  date = format(Sys.Date(), "%d %b %Y"),
  toc = FALSE,
  encoding = "utf-8",
  force = FALSE,
  theme = "default",
  highlight = "null"
)

Arguments

filenm

Required - The name of the file.

title

Required - The document title.

subtitle

Optional - The document subtitle.

lan

Required - The HTML language to set as the value for the lang attribute.

author

Required - The document author. Defaults to the effective user identified by Sys.info().

date

Required - The author date. Defaults to today's date.

toc

Optional, defaults to FALSE. Should a table of contents be included. Valid entries are FALSE (the default) or TRUE.

encoding

Defaults to "utf-8".

force

Defaults to FALSE. If TRUE, overwrites a pre-existing file with the same filenm with warning.

theme

Set to "default", currently the only in-built theme that does not result in accessibility errors.

highlight

Set to "null", currently the only in-built highlight that does not result in accessibility errors.

Value

An Rmarkdown file with an HTML head, populated with metadata specified within the function parameters.

Examples


# create an accessible rmarkdown document from scratch
access_rmd(
  "some_filenm",
  title = "Title Goes Here", lan = "en", author = "Author here"
)



[Package accessrmd version 1.0.0 Index]