sprinkle_caption: Change the Caption in a Dust Table

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

View source: R/sprinkle_caption.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
sprinkle_caption(x, caption, ...)

## Default S3 method:
sprinkle_caption(x, caption, ...)

## S3 method for class 'dust_list'
sprinkle_caption(x, caption, ...)

Arguments

x

An object of class dust

caption

character(1) giving the new caption for the table.

...

Additional arguments to pass to other methods. Currently ignored.

Details

The caption may be set during the initial dust call. This method allows for modification afterward, such as in the case of when a dust object is loaded from memory and the initial call cannot be accessed.

Functional Requirements

  1. Change the caption attribute of the dust object.

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

  3. Cast an error if caption is not a character object.

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

Author(s)

Benjamin Nutter

See Also

dust, sprinkle


pixiedust documentation built on Jan. 16, 2021, 5:25 p.m.