Flextable's save_as_image
function seems to only understand ASCII characters. Is there a workaround?
library(flextable)
library(officer)
ft <- flextable(
head(mtcars),
col_keys = c("mpg"))
ft <- set_header_labels(ft, mpg = "n°")
ft
library(webshot)
if( require("webshot") ){
save_as_image(x = ft, path = "./test.png")
}
use the unicode value for degree<\/i>
library(flextable)
library(officer)
ft <- flextable(
head(mtcars),
col_keys = c("mpg"))
ft <- set_header_labels(ft, mpg = "n\u00b0")
ft
library(webshot)
if( require("webshot") ){
save_as_image(x = ft, path = "./test.png")
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.