[R] Warning for LC_CTYPE when R is ran through ssh

Marc Girondot marc_grt at yahoo.fr
Wed Mar 14 10:17:20 CET 2018


Dear member,

When I run a code on a computer B from a computer A through shh using 
for example:

system("ssh login at IPadress \"R -e 'print(1)'\"")
[Note that I don't need indicate password because ~/.ssh/authorized_keys 
is used]

I get a warning:
During startup - Warning message:
Setting LC_CTYPE failed, using "C"

The code is working (it prints 1) but I don't like get a warning.

R 3.4.3 is installed on the IPadress computer under Ubuntu 16.04

In this computer, I tried to add in .Rprofile this line:
Sys.setlocale(category = "LC_CTYPE", locale = "en_US.UTF-8")

it is recognized but I get always the same warning when the code is ran 
through ssh:

 > system("ssh login at IPadress \"R -e 'print(1)'\"")

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

.... some messages are removed for simplicity

[1] "en_US.UTF-8"
[Previously saved workspace restored]

During startup - Warning message:
Setting LC_CTYPE failed, using "C"
 > print(1)
[1] 1

If I run the same in the local terminal, I don't get the warning:

~$ R -e "print(1)"

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

.... some messages are removed for simplicity


[1] "en_US.UTF-8"
[Previously saved workspace restored]

 > print(1)
[1] 1


Has someone a solution to not get this warning when a code is ran 
through ssh ?

Thanks

Marc Girondot



More information about the R-help mailing list