sprinkle_caption: Change the Caption in a Dust Table

View source: R/sprinkle_caption.R

sprinkle_captionR Documentation

Change the Caption in a Dust Table


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.


sprinkle_caption(x, caption, ...)

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

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



An object of class dust


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


Additional arguments to pass to other methods. Currently ignored.


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.


Benjamin Nutter

See Also

dust, sprinkle

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