Off topic:how to incorporate R script in perl program and then run it from perl
1
0
Entering edit mode
7.1 years ago

I wanna know how to run fully functional R scripts in from perl command line interpreter using the output of perl. All I have is a perl scripts which perform certain calculations and gives output in specific length of nucleotide sequence, I have to use those nucleotide sequence file as an input in R script and run in perl and get an output in a graphical format. I request if anybody can post a working example or guide me on the same seeing which it i can implement it in my program. this is the example which i followed whole running R from perl command line

use Statistics::R ;

my $R = Statistics::R->new() ;

$R->startR ;

$R->send(q`postscript("file.ps" , horizontal=FALSE , width=500 , height=500 , pointsize=1)`) ;
$R->send(q`plot(c(1, 5, 10), type = "l")`) ;

$R->send(qq`x = 123 \n print(x)`) ;
my $ret = $R->read ;

$R->stopR() ;

please help me out with this. Thanks in advance

R programming perl Both R and perl intergrated • 4.6k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2701 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