Hi all,
I am struggling with remote R sessions and a (I suspect) locale related
encoding problem: Using the X11 device (X11forwarding enabled),
whenever I try to plot something containing umlauts using ggplot2, I am
seeing sth like
,----
| Error in grid.Call(L_stringMetric, as.graphicsAnnot(x$label)) :
| invalid use of -61 < 0 in 'X11_MetricInfo'
`----
Using base graphics is fine as is plotting to another device (pdf, say).
Here is some code to reproduce:
,----
| plot(1:10, 1:10, main = "gr??e")
| ## this works
|
| library("ggplot2")
| qplot(1:10, 1:10)
| ## this works still
|
| qplot(1:10, 1:10) + xlab("gr??e")
| ## ERROR
`----
My setup:
- locally:
Linux (Debian GNU/Linux 9)
- remotely
Linux (RHEL Server release 7.3 (Maipo)
(Maybe) relevant bits of my .ssh/config:
,----
| Host theserver
| HostName XXX.XXX.XXX.XXX
| ForwardX11 yes
| ForwardX11Timeout 596h
| IdentityFile ~/.ssh/id_rsa
| IdentitiesOnly yes
| ForwardAgent yes
| ServerAliveInterval 300
`----
Thanks in advance for your help!
Best,
Andreas
encoding/locale problem with ssh -X
2 messages · Andreas Leha
1 day later
Hi Paul, Thanks for following this up! It used to be R version 3.3.1 I updated to R version 3.4.0 Now everything seems to work! Many thanks! Best, Andreas
On 23/06/17 03:02, Paul Murrell wrote:
Hi
What version of R do you have (on the remote machine) ?
I can replicate this with ...
x11(type="Xlib")
library(grid)
convertHeight(stringDescent("gr??e"), "in")
... on R 3.2.5, but not on, e.g., R 3.4.0 (just running R locally in
both cases).
Paul
On 21/06/17 20:05, Andreas Leha wrote:
Hi all,
I am struggling with remote R sessions and a (I suspect) locale related
encoding problem: Using the X11 device (X11forwarding enabled),
whenever I try to plot something containing umlauts using ggplot2, I am
seeing sth like
,----
| Error in grid.Call(L_stringMetric, as.graphicsAnnot(x$label)) :
| invalid use of -61 < 0 in 'X11_MetricInfo'
`----
Using base graphics is fine as is plotting to another device (pdf, say).
Here is some code to reproduce:
,----
| plot(1:10, 1:10, main = "gr??e")
| ## this works
|
| library("ggplot2")
| qplot(1:10, 1:10)
| ## this works still
|
| qplot(1:10, 1:10) + xlab("gr??e")
| ## ERROR
`----
My setup:
- locally:
Linux (Debian GNU/Linux 9)
- remotely
Linux (RHEL Server release 7.3 (Maipo)
(Maybe) relevant bits of my .ssh/config:
,----
| Host theserver
| HostName XXX.XXX.XXX.XXX
| ForwardX11 yes
| ForwardX11Timeout 596h
| IdentityFile ~/.ssh/id_rsa
| IdentitiesOnly yes
| ForwardAgent yes
| ServerAliveInterval 300
`----
Thanks in advance for your help!
Best,
Andreas
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.