sprinkle_caption_number: Change the Caption in a Dust Table

Description Usage Arguments Details Functional Requirements Author(s) See Also

View source: R/sprinkle_caption_number.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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 Jan. 16, 2021, 5:25 p.m.