Learn R Programming

tokenbrowser (version 0.1.6)

tag_attr: create attribute string for html tags

Description

create attribute string for html tags

Usage

tag_attr(...)

Value

a character vector with attribute strings. Designed to be usable as the attr_str in add_tag(). If ... is empty, NA is returned

Arguments

...

named arguments are used as attributes, with the name being the name of the attribute (e.g., class, style). All argument must be vectors of the same length, or lenght 1 (used as a constant). NA values can be used to skip an attribute. If all attributes are NA, an NA is returned

Examples

Run this code
add_tag('TEXT', 'span')
add_tag('TEXT', 'span', tag_attr(class='CLASS'))

Run the code above in your browser using DataLab