[英]How to display special characters in flextable save_as_image routine
Flextable's save_as_image
function seems to only understand ASCII characters. Flextable 的
save_as_image
函数似乎只能理解 ASCII 字符。 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>使用 unicode 值作为度数<\/b><\/p>
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")
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.