renderLinks {netCoin}R Documentation

Create an html list of links.

Description

Create an html list of links.

Usage

renderLinks(data, columns, target = "_blank", sites = NULL)

Arguments

data

data frame which contains the data.

columns

column name which contains the urls.

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.

Value

a character vector of html formatted links.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

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"))

[Package netCoin version 2.0.48 Index]