View source: R/make_hyperlink.R
make_hyperlink | R Documentation |
make_hyperlink
add the relevant <a> tag on a vector.
make_hyperlink(vec, message = NULL)
vec |
A vector. Typically the column of a data.frame. |
message |
The hyperlinks name. If it is omitted, the actual link will be used as the name |
make_hyperlink
The standard way to use this (although it can be used
outside a tableHTML) is to convert a column with plain URLs into
clickable hyperlinks when you render the HTML table. **Make sure
the escape argument of tableHTML is set to FALSE for this to work as
expected.**
A character vector which will represent an HTML hyperlink
#make sure the escape argument is set to FALSE for this to work
tableHTML(data.frame(mpg = make_hyperlink(mtcars$mpg)), escape = FALSE)
tableHTML(data.frame(mpg = make_hyperlink(mtcars$mpg, 1:32)), escape = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.