Hi Monks,
I am interested in calling R script from perl. I am doing it because R takes a huge amount of time in reading the file and I have 500 output files (700 kbs each). I need to do matrix operations on it (thats why I am using R as its very fast in doing the same as it contains many functions :)) on unix platform. I am getting the output file from the perl script. I need to extend the script by calling the R script and passing array (which contains the contents of the file ) as the argument. Can you please help me with the same ?
Glimpse of my code
my $filename = 'file1.txt';
open my $posFile, $filename or die $!;
open my $OUTFILE, '>', 'file2.txt';
@scoreIndividuals = &score( \*$file1,\*$file2);
close($posFile);
close($OUTFILE);
#### Need to pass the contents of the file (as an array) to
#### R script which does only operation on the contents #### (and R sc
+ript does not read the file)
exit;
sub score{
### Calculates score and writes on the file.
}