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!
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
Sys.getlocale()
According to the bioconductor mailinglist, locale should be set to C. This is what I did
Sys.setlocale(locale="C")
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With