Is it possible to embed a hyperlink to sections in a bookdown document and to webpages in a table?
(Apologies for the lack of proper repex, but not sure how to create one for a multiple file problem like bookdown)
I have tried to embed a DT table in a bookdown document that has links to sections and websites but haven't managed to get it to work - code below
Any pointers greatly recieved,
library(DT) library(dplyr) #section link is the anchor name in the document that I am hoping to reference using \@ref() my_data<-tibble(section=c('introduction','Chapter two'),section_link=c('intro','section_two'), weblink=c('www.google.com','www.bing.com')) # This code seems to break my bookdown rendering #my_data<-my_data%>% # mutate(markdown_link=paste0('@ref(',section_link,')'))%>% # mutate(hyperlink=paste0("<a href='", weblink,"' target='_blank' class='btn btn-link'>", "Link to weblink","</a>")) DT::datatable(my_data,escape=FALSE)