Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tag_parsers

Parse tags


Description

These functions parse the raw tag value, convert a string into a richer R object and storing it in val, or provide an informative warning and returning NULL.

Usage

tag_value(x)

tag_inherit(x)

tag_name(x)

tag_two_part(x, first, second, required = TRUE, markdown = TRUE)

tag_name_description(x)

tag_words(x, min = 0, max = Inf)

tag_words_line(x)

tag_toggle(x)

tag_code(x)

tag_examples(x)

tag_markdown(x)

tag_markdown_with_sections(x)

Arguments

x

A roxy_tag object to parse

first, second

Name of first and second parts of two part tags

required

Is the second part required (TRUE) or can it be blank (FALSE)?

markdown

Should the second part be parsed as markdown?

min, max

Minimum and maximum number of words

Value

A roxy_tag object with the val field set to the parsed value.

New tag

To create a new @mytag define roxy_tag_parse.roxy_tag_mytag(). It should either call one of the functions here, or directly set x$val.


roxygen2

In-Line Documentation for R

v7.1.1
GPL (>= 2)
Authors
Hadley Wickham [aut, cre, cph] (<https://orcid.org/0000-0003-4757-117X>), Peter Danenberg [aut, cph], Gábor Csárdi [aut], Manuel Eugster [aut, cph], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.