On running the following code on R server,
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!