NAME
Statistics::R - Perl interface with the R statistical program
DESCRIPTION
*Statistics::R* is a module to controls the R interpreter (R project for
statistical computing: ). It lets you start
R, pass commands to it and retrieve the output. A shared mode allow to
have several instances of *Statistics::R* talk to the same R process.
The current *Statistics::R* implementation uses pipes (for stdin, stdout
and and stderr) to communicate with R. This implementation should be
more efficient and reliable than that in previous version, which relied
on reading and writing files. As before, this module works on GNU/Linux,
MS Windows and probably many more systems.
SYNOPSIS
use Statistics::R;
# Create a communication bridge with R and start R
my $R = Statistics::R->new();
# Run simple R commands
my $output_file = "file.ps";
$R->run(qq`postscript("$output_file" , horizontal=FALSE , width=500 , height=500 , pointsize=1)`);
$R->run(q`plot(c(1, 5, 10), type = "l")`);
$R->run(q`dev.off()`);
# Pass and retrieve dat