Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

using R from Perl

by renovatio66 (Initiate)
on Aug 05, 2010 at 14:17 UTC ( [id://853143] : perlquestion . print w/replies, xml ) Need Help??

renovatio66 has asked for the wisdom of the Perl Monks concerning the following question:

hi I am a student in UK and has just come across perl scripting language. basically I am a biology student and quite knowledgeful about R but this perl is a new thing for me. my question is: how could I call the R scripts from the perl command line to obtain its results? i have wasted a lot of my time on this and still has got no idea on how to tackle it, probably system commands or backticks. any reply would be very helpful to me. hoping to find my result soon.

Replies are listed 'Best First'.
Re: using R from Perl
by marto (Cardinal) on Aug 05, 2010 at 14:22 UTC

      Would BioPerl also be useful?


        I think this is covered in Perl and Bioinformatics which I suggested since they are a biology student. It may or may not be helpful :)

        Sorry as I told you, I can not install anything and i dont have bioperl/RSperl/statistics::R. is there a way to do it then?
Re: using R from Perl
by lima1 (Curate) on Aug 05, 2010 at 14:22 UTC
    Have you tried RSPerl? I used it about 2-3 years ago and it worked.
      i can not install RSPerl as I don't have the admin rights. Is there any other way? to call R script through perl command line and getting the result.
        I'd be pretty surprised if you can't install RSPerl in your home. I'm quite sure I did... Just RTM.
Re: using R from Perl
by erix (Prior) on Aug 06, 2010 at 12:03 UTC
Re: using R from Perl
by MidLifeXis (Monsignor) on Aug 06, 2010 at 13:25 UTC

    Also see system, fork, exec, and Yes, even you can use CPAN. Also, have you tried anything yourself? If so, can you share? What have you tried? Perhaps there is something obvious in your approach that some fellow monk may help you to see.