Dear,ALL

I am using CRAN module Statistics::R to run R scripts in Perl, The problem
is how to pass the array variable to R?
Following is my Perl script:

#!/usr/bin/perl

use strict;
use warnings;
use Statistics::R;

open DATA,"<","data.txt" or die "$!";
my @data = <DATA>;
my $R = Statistics::R -> new();
$R -> startR;
$R -> send(qq'x <- ...') #how to pass @data to the R variable x?

Any suggestion will be appreciate~

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to