简体   繁体   English

从Perl运行R的问题

[英]Issues in running R from Perl

I want to include Statistics::R for my program. 我想在程序中包含Statistics :: R。 The statement I am including is: 我包括的声明是:

use Statistics::R; 使用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 无法在@INC中找到Statistics / R.pm(@INC包含:/ etc / perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 / usr / lib /在rperl.pl第2行上的perl5 / usr / share / perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 / usr / local / lib / site_perl。)

By the way I am using perl(v5.14.2) on ubuntu,using remote access to a linux server. 顺便说一下,我在ubuntu上使用perl(v5.14.2),使用对Linux服务器的远程访问。

The solution was to install the module as non-root user. 解决方案是以非root用户身份安装模块。 The details are provided in the following link: 以下链接提供了详细信息:

http://users.soe.ucsc.edu/~you/notes/perl-module-install.html 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 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! 我希望这也会对其他人有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM