Add hypertext reference to html document.
href(x, href, fmt, verbose = TRUE)Object of class 'html'.
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.
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.
A logical value, whether to show messages.
use(pkg = "RcppCWB", corpus = "REUTERS")
#> ✔ corpus loaded: REUTERS
a <- corpus("REUTERS") %>%
subset(places = "argentina") %>%
html() %>%
highlight(lightgreen = 3997) %>%
href(href = list("3997" = "https://en.wikipedia.org/wiki/Argentina"))
#> ℹ assign href based on cpos
if (interactive()) show(a)