Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (36 sloc) 992 Bytes
\title{Evaluate an expression using \code{tags}}
\item{code}{A set of tags.}
This function makes it simpler to write HTML-generating code. Instead of
needing to specify \code{tags} each time a tag function is used, as in
\code{tags$div()} and \code{tags$p()}, code inside \code{withTags} is
evaluated with \code{tags} searched first, so you can simply use
\code{div()} and \code{p()}.
If your code uses an object which happens to have the same name as an
HTML tag function, such as \code{source()} or \code{summary()}, it will call
the tag function. To call the intended (non-tags function), specify the
namespace, as in \code{base::source()} or \code{base::summary()}.
# Using tags$ each time
tags$div(class = "myclass",
# Equivalent to above, but using withTags
div(class = "myclass",
Jump to Line
Something went wrong with that request. Please try again.