`
dat <- data.frame(
col = "entrez",
href = "https://www.ncbi.nlm.nih.gov/gene?cmd=Retrieve&dopt=full_report&list_uids=6850",
stringsAsFactors = FALSE)
ft <- flextable(dat)
ft <- display(
ft, col_key = "col", pattern = "# {{mylink}}",
formatters = list(mylink ~ hyperlink_text(href, col) )
)
ft # works fine
doc <- read_pptx() %>%
add_slide(layout = 'Title and Content', 'Office Theme') %>%
ph_with_flextable(ft) # error
Error in doc_parse_raw(x, encoding = encoding, base_url = base_url,
as_html = as_html, : EntityRef: expecting ';' [23]
repeat with:
dat <- data.frame(
col = "entrez", href = URLencode("https://www.ncbi.nlm.nih.gov/gene?cmd=Retrieve&dopt=full_report&list_uids=6850", reserved = TRUE),
stringsAsFactors = FALSE)
ft <- flextable(dat)
ft <- display(
ft, col_key = "col", pattern = "# {{mylink}}",
formatters = list(mylink ~ hyperlink_text(href, col) )
)
ft # clicking the link in rstudio fails
doc <- read_pptx() %>%
add_slide(layout = 'Title and Content', 'Office Theme') %>%
ph_with_flextable(ft) # fine, no error message, but error message when opening pp file