Warning for LC_CTYPE when R is ran through ssh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning for LC_CTYPE when R is ran through ssh

R help mailing list-2
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

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Warning for LC_CTYPE when R is ran through ssh

Jeff Newmiller
I don't think that warning is originating from R... LC_TYPE is an environment variable that the standard C library pays attention to, so could be either ssh on your local computer or ssh on the remote computer in response to something the local ssh is doing.

IMO this question belongs in a forum about Ubuntu or ssh, or possibly R-sig-debian.

--
Sent from my phone. Please excuse my brevity.

On March 14, 2018 2:17:20 AM PDT, Marc Girondot via R-help <[hidden email]> wrote:

>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
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.