Learn R Programming

pixiedust (version 0.9.4)

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

# S3 method for default sprinkle_caption(x, caption, ...)

# S3 method for 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.

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

Benjamin Nutter

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.

See Also

dust, sprinkle