Re: [R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-06 Thread Mike Williamson
Ista, Thanks for this method, it works! Unfortunately 'R' still spits everything out to std out, but the variable as you describe below grabs only the final output variable, similar to how functions or scripts work internally within 'R'. Thanks! Kjetil, Thanks also for your input, but

[R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-03 Thread Mike Williamson
Hey everyone, I know that I can call 'R' from other scripts, and that I can make command calls from 'R' (e.g., using system() ). But how can I get 'R' to RETURN values to the script that called it. E.g., I would like to be able to do something like the following (as a simpler example) from

Re: [R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-03 Thread Ista Zahn
Hi Mike, Is this what you want? #!/bin/bash myTest=$(Rscript testing.R.r) echo myTest contains echo $myTest Note that testing.R.r will have to cat() or print() myResult (e.g, my testing.R.r contains myResult - paste(Hello World) cat(myResult) Best, Ista On Fri, Dec 3, 2010 at 1:23 PM, Mike

Re: [R] How to get 'R' to talk BACK to other languages / scripts??

2010-12-03 Thread Kjetil Halvorsen
see below. On Fri, Dec 3, 2010 at 3:23 PM, Mike Williamson this.is@gmail.com wrote: Hey everyone,    I know that I can call 'R' from other scripts, and that I can make command calls from 'R' (e.g., using system() ).  But how can I get 'R' to RETURN values to the script that called it.