0

How do I use gt_hyperlink from {gtExtras} to add a link to a cell in a gt table? In this example, the words, "This is CNN", would link to cnn.com

library("tidyverse")
library("gt")
library("gtExtras")

df <- tibble(
  name = "This is CNN"
)

df |> gt() |> 
  gt_hyperlink("This is CNN", "www.cnn.com")
shafee
  • 15,566
  • 3
  • 19
  • 47
ixodid
  • 2,180
  • 1
  • 19
  • 46
  • Untested but I imagine you would use it before converting your data frame to a `gt()` object, so `tibble(name = list(gt_hyperlink("This is CNN", "www.cnn.com"))) %>% gt()` – Ritchie Sacramento Nov 15 '22 at 03:09

0 Answers0