View source: R/get_templates.R
renderLinks | R Documentation |
Create an html list of links.
renderLinks(data, columns, labels = NULL, target = "_blank", sites = NULL)
data |
data frame which contains the data. |
columns |
column name which contains the urls. |
labels |
column name which contains the text to display. |
target |
The target attribute specifies where to open the linked document: '_blank' opens the linked document in a new window or tab; '_self' opens the linked document in the same frame as it was clicked; framename opens the linked document in the named iframe. |
sites |
A data frame of 3 columns (url, name, icon) with the sites that the function will recognize. |
a character vector of html formatted links.
Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/
links <- data.frame(name = c(
"Camarhynchus psitticula",
"Camarhynchus pauper",
"Camarhynchus parvulus"
), wikipedia=c(
"https://en.wikipedia.org/wiki/Large_tree_finch",
"https://en.wikipedia.org/wiki/Medium_tree_finch",
"https://en.wikipedia.org/wiki/Small_tree_finch"
),wikidata=c(
"https://www.wikidata.org/wiki/Q578835",
"https://www.wikidata.org/wiki/Q1125857",
"https://www.wikidata.org/wiki/Q1086136"
))
html <- renderLinks(links,c("wikipedia","wikidata"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.