Returns a predefined label intended to be used to document a function's title using roxygen2's
@title
tag.
Usage
title_lbl(id = roxy_lbls(type = "title")$id, as_sentence = FALSE, ...)
Arguments
- id
Label identifier. See
roxy_lbls()
for possible values.- as_sentence
Whether or not to format the resulting string as a full sentence, i.e. with the first letter capitalized and a period at the end.
- ...
Further named arguments used to tailor the label to your needs. Not all labels require additional arguments, see
roxy_lbls()
for an overview. If a required argument is not explicitly provided, it is searched for in the parent frames.
Value
A glue character scalar.
Details
A label can be inserted using inline R code as follows:
#' @title `r pkgsnip::title_lbl("ID")`
Note that the above only works in roxygen2 7.1.0+.
Currently, the following @title
labels are available:
id | arguments |
cli_markup_support | |
date | |
dates | |
datetime | |
datetimes | |
dbi_connection | |
df_or_tibble | |
dm | |
dyn_dots_support | |
end_date | |
eol | |
ggplot2_obj | |
glue_chr | |
gt_obj | |
max_cache_age | |
num_vrsn | |
opt_global_max_cache_age | pkg , global_max_cache_age |
path | |
paths | |
pkg_config | pkg |
plotly_obj | |
quiet | |
r_obj | |
resp_obj | |
show_progress | |
start_date | |
strict_list | |
sym | |
tbl_data | |
tibble | |
tibble_cols | cols |
tibble_custom | custom |
tidy_select_support | |
use_cache |
See also
roxygen2 label functions
data_roxy_lbls
,
data_types
,
description_lbl()
,
param_lbl()
,
return_lbl()
,
roxy_lbl()
,
roxy_lbls()
,
type()