add_label: Helper function to create labelled captions for 'pander'...

View source: R/add_label.R

add_labelR Documentation

Helper function to create labelled captions for pander tables

Description

The function adds a reference label to the caption so that pander tables can be cross-referenced in bookdown using the ⁠\@ref(tab:label)⁠ syntax. The function should only be used in pander(x, caption = add_label()).

Usage

add_label(caption = "", tag = "tab")

Arguments

caption

The caption text as a string

tag

The tag to use as a prefix. Default is tab.

Value

The caption text prefixed with a reference label.

See Also

Other utility: get_path_to_protocol(), get_protocol_type(), get_protocolnumbers(), get_short_titles(), get_version_number(), increment_version_number()

Examples

add_label("caption text")

inbo/protocolshelper documentation built on Sept. 6, 2024, 9:15 p.m.