4
我正在尝试使用ggplot2获取在R中工作的xkcd字体。但是我遇到了一些问题。 这是我迄今为止所做的。 1)从〜/ .fonts 目录中的xkcd站点安装“Humor Sans”字体2)安装“extrafont”软件包。该安装工作顺利。 3)当我尝试导入的字体我碰到下面的错误加载库R ggplot2字体问题
library(extrafont)
不过。
> font_import(pattern="Humor Sans")
Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.
Continue? [y/n] y
Scanning ttf files in /usr/share/fonts/, ~/.fonts/ ...
Extracting .afm files from .ttf files...
Error in data.frame(fontfile = ttfiles, FontName = "", stringsAsFactors = FALSE) :
arguments imply differing number of rows: 0, 1
关于我可能做错了什么或我应该做什么的任何建议? 感谢很多提前
编辑:运行Ubuntu 12.04
运行Ubuntu 12.04。这并没有解决问题。此外,它已根据错误消息 – broccoli 2013-05-12 18:01:52
扫描该目录。然后,您应该在该目录上显示ls的结果。错误消息也说没有任何匹配的模式。 – 2013-05-12 18:31:59
目录〜/ .fonts只有Humor-Sans.ttf文件。 – broccoli 2013-05-12 18:56:21