tags:

views:

29

answers:

1

Dear all,

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!

+1  A: 

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 how you can change it whenever a problem occurs.

HTH someone else too.

ran2