问题描述
我的目标是使用R中的richtext_grob函数以及预先创建的对象来创建多色标题。
在将此对象(即包含字符值)插入跨度元素时,这导致函数接管对象的名称而不是对象的值。
是否可以将R对象插入到span元素中以创建多色文本?
有关代码示例,请参见下文。
speler <- "example_speler" # Enter name of player
title <- gridtext::richtext_grob(text = '<span style="color:red">Statistieken van</span><span style="color:#3492da"> **speler**</span>',gp = gpar(fontsize = 30,fontface = "bold",fontfamily = "Candara")) # Create a title with two colours
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)