rperlinterfacing

Issues in running R from Perl


I want to include Statistics::R for my program. The statement I am including is:

use Statistics::R;

Is there something wrong with it? I tried to run it with just this statement included, the error i got was

Can't locate Statistics/R.pm in @INC(@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at rperl.pl line 2

By the way I am using perl(v5.14.2) on ubuntu,using remote access to a linux server.


Solution

  • The solution was to install the module as non-root user. The details are provided in the following link:

    http://users.soe.ucsc.edu/~you/notes/perl-module-install.html

    After doing the things described here, a couple of small steps are to be completed which are mentioned in the following link:

    http://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations

    This worked for me! I hope it would be of help to others too!