Dear member,

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

system("ssh login@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@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

______________________________________________
R-help@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.

Reply via email to