facet_grid 问题:输入字符串 1 在此区域设置中无效?
我正在尝试使用以下代码创建构面网格
p <- ggplot(melted,aes(factor(country))) + geom_bar() +opts(axis.text.x = theme_text(angle = 90,hjust = 1))
p + facet_grid(. ~ provider)
,但总是收到以下错误:
Error in sub("^[^:]+: ([^\n]+)\n[0-9]+:(。 *)$", "\1\2", expr) : 输入字符串 1 在此区域设置中无效
我不知道我做错了什么。还尝试考虑我的方面,但这也不起作用。
提前谢谢!
I am trying to create facet grid with the following code
p <- ggplot(melted,aes(factor(country))) + geom_bar() +opts(axis.text.x = theme_text(angle = 90,hjust = 1))
p + facet_grid(. ~ provider)
but I always get the following error:
Error in sub("^[^:]+: ([^\n]+)\n[0-9]+:(.*)$", "\1\2", expr) :
input string 1 is invalid in this locale
I do not have any idea what I am doing wrong. also tried to factor my facet, which doesn't work either.
Thx in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己解决了这个问题。这是解决方案。我的区域设置设置为
1 "de_DE.UTF-8/de_DE.UTF-8 /C/C/de_DE.UTF-8/de_DE.UTF-8”
检查过
,我根据 bioconductor 邮件列表,区域设置应设置为 C。这就是我所做的
,瞧,分面工作就像以前一样。我不知道区域设置是如何更改的,但这就是每当出现此问题时您可以更改它的方法。
HTH还有其他人。
I fixed this one on my own. Here's the solution. My locale was set to
1 "de_DE.UTF-8/de_DE.UTF-8/C/C/de_DE.UTF-8/de_DE.UTF-8"
which I checked with
According to the bioconductor mailinglist, locale should be set to C. This is what I did
Et voilà the faceting worked just like it used to. I have no clue how the locale changed, but that's how you can change it whenever this problem occurs.
HTH someone else too.