dat <- data.frame(
col = "CRAN website", href = "https://cran.r-project.org",
stringsAsFactors = FALSE)
ft <- flextable(dat)
ft <- display(
ft, col_key = "col", pattern = "# {{mylink}}",
formatters = list(mylink ~ hyperlink_text(href, col) )
)
ft
I get the following error message: xdg-open: no method available for opening "https://cran.r-project.org"
So I decide to check the desktop environment set and I run the following command on the terminal:
xdg-settings get default-web-browser
But I get the following exception: xdg-settings: unknown desktop environment
I would like to insert hyperlink text in word doc and hence I am using the hypertext_link function available in flextable package. But I get the above exception when I run the code.
The version of flextable installed on server is 0.4.6 and version of officer is 0.3.2.
Any help would be really appreciated. Thanks!
With those specific package versions your code works on Posit Cloud (Ubuntu 20.04 LTS) so I think this is a problem with a system library that is specific to your Linux distribution, sadly I don't have access to an RHEL system to further investigate.