[Rd] problem with The R/Splus--Perl Interface

From: Rispoli Rossella <rispoli_at_tigem.it>
Date: Mon, 20 Oct 2008 11:43:44 +0200


Hi,
I'm new to using the R/Splus--Perl Interface, and I have same problem to understand how to pass the structure from Perl to R. I'm trying to call the function 'max' on the bi-dimensional array, before I tried to do the same thing on the vector as follows:

@x = &R::call("seq", 1,10);

$val=&R::call("max",@x);

print "val $val \n";
and it works, after this I try to do the same things on the matrix as follows:

'create matrix x'
$val=&R::call("max",@t);

it's dosen't works and return me this error: invalid 'type' (list) of argument
Caught error in R::call()

After This I tried also to create a matrix from the perl code with the command call ('matrix'....) as follows:
'create array t'
my @v=&R::call("matrix",\@t,2,3);
or
my @v=&R::eval("matrix(@t,2,3)");
But doesn't work.

At the end my question is: there is a mode to pass a matrix from perl to R, and if it dosen't exist, how can I call a R function with an bi- dimensional array created in Perl script using the The R/Splus--Perl Interface?



Rossella Rispoli,
Bioinformatics Core Group
Telethon Institute of Genetics and Medicine (TIGEM) Via P. Castellino 111, 80131, Naples, Italy
Tel: +39 081 6132 498
Fax: +39 081 6132 351
Web: http://bioinformatics.tigem.it/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 20 Oct 2008 - 10:26:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 20 Oct 2008 - 16:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive