[R] Locale problem with umlauts in factor levels in 2.7.0 (patched) from grid or lattice
Dieter Menne
dieter.menne at menne-biomed.de
Thu May 1 20:55:37 CEST 2008
With 2.7.0 patched (not tested with 2.0.0), I get an error message in a
program that ran correctly in R 2.6.2 when the grouping factor of a
stripplot contains an Umlaut:
I am aware that there are a few locale-changes in R 2.7.0, but I could not
easily
locate who's at fault
Dieter
library(lattice)
dt = data.frame(x=rnorm(100),y=1:100,levs= as.factor(c("Gru","Grü")))
stripplot(x ~ y|levs, data = dt)
#Error in grid.Call.graphics("L_text", as.graphicsAnnot(x$label), x$x, :
# invalid input 'Grü' in 'utf8towcs'
># Works
as.graphicsAnnot(as.factor(c("Gru","Grü")))
R version 2.7.0 Patched (2008-04-30 r45572)
i386-pc-mingw32
locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;
LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lattice_0.17-6
loaded via a namespace (and not attached):
[1] grid_2.7.0
More information about the R-help
mailing list