sprinkle_caption_number: Change the Caption in a Dust Table

View source: R/sprinkle_caption_number.R

sprinkle_caption_numberR Documentation

Change the Caption in a Dust Table

Description

The table caption is often used as a brief title, but may also be used to provide a longer statement explaining how to interpret the table results.

Usage

sprinkle_caption_number(x, caption_number, ...)

## Default S3 method:
sprinkle_caption_number(
  x,
  caption_number = getOption("pixie_caption_number", TRUE),
  ...
)

## S3 method for class 'dust_list'
sprinkle_caption_number(
  x,
  caption_number = getOption("pixie_caption_number", TRUE),
  ...
)

Arguments

x

An object of class dust

caption_number

logical(1) When TRUE, the table caption is prefixed with "Table #". Table numbering is suppressed when FALSE. When numbering is suppressed, the table number counter will not increment.

...

Additional arguments to pass to other methods. Currently ignored.

Details

Table numbering makes it possible to reference tables within a document. In some cases, the numbering is not desired. Suppressing numbering may restrict the ability to make reference to the table.

Functional Requirements

  1. Change the caption_number attribute of the dust object.

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

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

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

Author(s)

Benjamin Nutter

See Also

dust, sprinkle


pixiedust documentation built on Oct. 10, 2023, 9:07 a.m.