tag_attr {tokenbrowser}R Documentation

create attribute string for html tags

Description

create attribute string for html tags

Usage

tag_attr(...)

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

Value

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

Examples

add_tag('TEXT', 'span')
add_tag('TEXT', 'span', tag_attr(class='CLASS'))

[Package tokenbrowser version 0.1.5 Index]