attr_helper | R Documentation |
Helper function to generate HTML5 attribute strings
attr_helper(attr, separate = FALSE)
attr |
A named list, names are attribute names and values are attribute values. If the items of the list and the items of the tag content are longer than length 1, the items for the attribute will correspond with the items of the content in the same position. (ex. when generating a series of option tags, you might want to pass a different id attribute for each item of the content, you can pass the vector of ids in the named list of attributes) |
separate |
TRUE/FALSE, if TRUE, returns a vector for creating multiple tags at once. |
A HTML attribute string.
attr_helper(attr = list(class = 'test'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.