R from perl
3
0
Entering edit mode
@madhurima-bhattacharjee-1465
Last seen 10.2 years ago
Hello, I want to use R from perl programming environment. I have downloaded RSPerl_0.8-0.tar.gz from omegahat.org. I couldnot understand the following instruction: To use R from within Perl, R CMD INSTALL -c -l /<wherever>/ --configure-args='--with-in-perl' RSPerl_0.8-0.tar.gz What do I exactly need to do? Can anybody please help me asap? Thanks and Regards, Madhurima Bhattacharjee.
• 2.5k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On 12/13/05 10:02 AM, "madhurima bhattacharjee" <madhurima_b at="" persistent.co.in=""> wrote: > Hello, > > I want to use R from perl programming environment. > I have downloaded RSPerl_0.8-0.tar.gz from omegahat.org. > I couldnot understand the following instruction: > > To use R from within Perl, > > R CMD INSTALL -c -l /<wherever>/ --configure-args='--with-in-perl' > RSPerl_0.8-0.tar.gz > > > What do I exactly need to do? > Can anybody please help me asap? R CMD INSTALL -c -l LIBRARY_LOCATION --configure-args='--with-in-perl' RSPerl_0.8-0.tar.gz Do this at the command line and replace LIBRARY_LOCATION with where you typically install your R packages. If you don't know, then leave '-l LIBRARY_LOCATION' out. Sean
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On 12/13/05 2:20 PM, "madhurima_b at persistent.co.in" <madhurima_b at="" persistent.co.in=""> wrote: > Is R recognised as a proper command to run on dos? >From the RSPerl page--I have bad news: http://www.omegahat.org/RSPerl/ "A (very) brief description of calling R from Perl. This only works on Unix. (Only tested on Linux.) Do not expect this to run on Windows."
ADD COMMENT
0
Entering edit mode
Hi, One possible solution on Windows is when you would have an R script that can get the data it needs from some temporary files created by Perl and knows what is has to do with it. Then include this line in your Perl code: my $cmd = `R CMD BATCH yourscript.R`; make the R script write the output to some other temporary files which are then read by Perl. Instead of working with temp files you could also use a database .... Best, Steffen Sean Davis wrote: > >On 12/13/05 2:20 PM, "madhurima_b at persistent.co.in" ><madhurima_b at="" persistent.co.in=""> wrote: > > > >>Is R recognised as a proper command to run on dos? >> >> > >>From the RSPerl page--I have bad news: >http://www.omegahat.org/RSPerl/ > >"A (very) brief description of calling R from Perl. This only works on Unix. >(Only tested on Linux.) Do not expect this to run on Windows." > >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor > > >
ADD REPLY
0
Entering edit mode
On 12/14/05 4:15 AM, "Steffen Durinck" <sdurinck at="" ebi.ac.uk=""> wrote: > Hi, > > One possible solution on Windows is when you would have an R script that > can get the data it needs from some temporary files created by Perl and > knows what is has to do with it. > > Then include this line in your Perl code: > my $cmd = `R CMD BATCH yourscript.R`; > > make the R script write the output to some other temporary files which > are then read by Perl. > Instead of working with temp files you could also use a database .... I forgot to mention one pure-perl solution, Statistics-R: http://search.cpan.org/~gmpassos/Statistics-R-0.02/ Works with Windows. Quite a different interface than RSPerl, but does start a persistent R interpreter. Sean > Sean Davis wrote: > >> >> On 12/13/05 2:20 PM, "madhurima_b at persistent.co.in" >> <madhurima_b at="" persistent.co.in=""> wrote: >> >> >> >>> Is R recognised as a proper command to run on dos? >>> >>> >> >>> From the RSPerl page--I have bad news: >> http://www.omegahat.org/RSPerl/ >> >> "A (very) brief description of calling R from Perl. This only works on Unix. >> (Only tested on Linux.) Do not expect this to run on Windows." >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> >> >>
ADD REPLY
0
Entering edit mode
Kort, Eric ▴ 220
@kort-eric-1483
Last seen 6.7 years ago
United States
To be complete, he would actually need: my $cmd = `R CMD BATCH yourscript.R; system($cmd); Right? And depending what he does in the script, the following might be expedient: my $cmd = `R CMD BATCH yourscript.R > results.txt; system($cmd); He also asked earlier "Is R recognised as a proper command to run on dos?"...the answer being yes, if you installed it and it is in your PATH, which is no different than Perl. -Eric Steffen Durinck wrote: >Hi, > >One possible solution on Windows is when you would have an R script that >can get the data it needs from some temporary files created by Perl and >knows what is has to do with it. > >Then include this line in your Perl code: >my $cmd = `R CMD BATCH yourscript.R`; > >make the R script write the output to some other temporary files which >are then read by Perl. >Instead of working with temp files you could also use a database .... > >Best, >Steffen > > Sean Davis wrote: > >On 12/13/05 2:20 PM, "madhurima_b at persistent.co.in" ><madhurima_b at="" persistent.co.in=""> wrote: > > > >>Is R recognised as a proper command to run on dos? >> >> > >>From the RSPerl page--I have bad news: >http://www.omegahat.org/RSPerl/ > >"A (very) brief description of calling R from Perl. This only works on Unix. >(Only tested on Linux.) Do not expect this to run on Windows." > >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor > > > _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor This email message, including any attachments, is for the so...{{dropped}}
ADD COMMENT

Login before adding your answer.

Traffic: 602 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6