Last data update: 2014.03.03
|
R: HTML/XML tag formatter
HTML/XML tag formatter
Description
Formats an HTML/XML tag, using a low-level syntax.
Usage
hmakeTag(tag, data=NULL, ..., newline=FALSE)
Arguments
tag |
a character vector or matrix containing the HTML/XML tags.
|
data |
a character vector or matrix containing the tag bodies.
|
newline |
a logical. Appends a newline \n character at the end of the tags.
|
... |
optional attributes that will be appended to the tags.
|
Details
This low-level function is used by hwrite to build HTML tags.
This function is useful to build non-standard or rare HTML tags.
Value
A character vector or matrix, containing the output HTML/XML tags.
Author(s)
Gregoire Pau, gpau@ebi.ac.uk, 2008
See Also
hwrite .
Examples
## simple call
hmakeTag('a','Centipede',href='http://en.wikipedia.org/wiki/Centipede')
## vectorized calls
hmakeTag('tag',1:10,color='red')
hmakeTag(colors()[1:10],1:10,semantic='color')
## nested calls
hmakeTag('html',hmakeTag('body','Text'),'xml:lang'='en')
Results
|