我正在尝试使用华夫饼功能:
install.packages(c("waffle", "extrafont"))
library(waffle)
library(extrafont)
font_import()
# check that Font Awesome is imported
fonts()[grep("Awesome", fonts())]
# use this if things look odd in RStudio under Windows
loadfonts(device = "win")
# Chart 1
waffle(c(50, 30, 15, 5), rows = 5, title = "Your basic waffle chart")
# Chart 2
waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "child", glyph_size = 6,
title = "Look I made an infographic using R!")
但它只适用于#Chart 1
对于#Chart 2,我收到以下错误消息:
错误:未找到 FontAwesome。通过以下方式安装:https ://github.com/FortAwesome/Font-Awesome/tree/master/fonts
链接不存在。
谢谢!