Learn R Programming

pixiedust (version 0.9.4)

sprinkle_bookdown: Change the Bookdown Property in a Dust Table

Description

Tables built for the bookdown package can be referenced in a manner that is consistent between HTML and LaTeX documents.

Usage

sprinkle_bookdown(x, bookdown = getOption("pixie_bookdown", FALSE), ...)

# S3 method for default sprinkle_bookdown(x, bookdown = getOption("pixie_bookdown", FALSE), ...)

# S3 method for dust_list sprinkle_bookdown(x, bookdown = getOption("pixie_bookdown", FALSE), ...)

Arguments

x

An object of class dust

bookdown

logical(1) indicating if the table is being produced in a bookdown document.

...

Additional arguments to pass to other methods. Currently ignored.

Functional Requirements

  1. Change the bookdown attribute of the dust object.

  2. Cast an error if x is not a dust object.

  3. Cast an error if bookdown is not a logical object.

  4. Cast an error if bookdown has length greater than 1.

Author

Benjamin Nutter

Details

bookdown is a package that facilitates the writing of books. One of the advantages of bookdown is the ability to reference tables in a manner similar to LaTeX. The key difference in how pixiedust handles output is the reference specification. See https://bookdown.org/yihui/bookdown/tables.html for details on how bookdown uses labels and references.

See Also

dust, sprinkle