[R] 'system' command through Rserve

Patil, Prasad Prasad_Patil at hms.harvard.edu
Fri Aug 1 15:52:49 CEST 2008


Hi Jeff,

You are absolutely right. In all the mess, I forgot that my Rserve was
started by a different user! Sometimes it's the simplest solution, isn't
it? Thanks a lot.

-Prasad

-----Original Message-----
From: Jeffrey Horner [mailto:jeff.horner at vanderbilt.edu] 
Sent: Thursday, July 31, 2008 5:14 PM
To: Patil, Prasad
Cc: r-help at r-project.org
Subject: Re: [R] 'system' command through Rserve

This probably has to do with your ssh configuration and nothing to do 
with R.  How are you starting Rserve? Is it run with the same user 
privileges as when you run R manually?

Best,

Jeff
Patil, Prasad wrote on 07/31/2008 02:51 PM:
> Hello,
> 
>  
> 
> I've installed an Rserve instance on a remote server. I have no
problem
> interfacing with it and running most commands. I have loaded some R
> scripts on the remote server, and one of them contains a system
command
> to copy a file (created by the script) onto another server. When I run
> the script on the remote server itself, the script works as I intend:
it
> creates a .csv file and uses scp to copy it onto another server. When
I
> run the script remotely (through an Rconnection in Java), the .csv is
> created but the file is not copied onto the other server. Is there any
> reason why a system command would work when called locally but not
when
> called remotely?
> 
>  
> 
> The format is as follows:
> 
>  
> 
> # create array
> 
>  
> 
> write.csv(array, "array.csv")
> 
>  
> 
> system("scp /{path}/array.csv {remote server}:/{path2}")
> 
>  
> 
> Again, the script works correctly when run through R on the remote
> server, but when I run it through Rserve, everything works except for
> the 'system' command. Any insights would be greatly appreciated.
> 
>  
> 
> Thanks a lot,
> 
>  
> 
> Prasad
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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.


-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner



More information about the R-help mailing list