href-function {polmineR}R Documentation

Add hypertext reference to html document.

Description

Add hypertext reference to html document.

Usage

href(x, href, fmt, verbose = TRUE)

Arguments

x

Object of class 'html'.

href

A named list with hypertext references that will be inserted as attribute href of a elements. The names of the list are either colors of highlighted text that has been generated previously, or corpus positions.

fmt

A format string with an xpath expression used to look up the node where the tooltip is inserted. If missing, a heuristic evaluating the names of the tooltips list decides whether tooltips are inserted based on highlighting colors or corpus positions.

verbose

A logical value, whether to show messages.

Examples

use(pkg = "RcppCWB", corpus = "REUTERS")

a <- corpus("REUTERS") %>%
  subset(places = "argentina") %>%
  html() %>%
  highlight(lightgreen = 3997) %>%
  href(href = list("3997" = "https://en.wikipedia.org/wiki/Argentina"))
  
if (interactive()) show(a)

[Package polmineR version 0.8.9 Index]