[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bioc-devel
Subject:    [Bioc-devel] bioconductor@stat.math.ethz.ch
From:       fcombes () gmail ! com (Florence Combes)
Date:       2005-05-19 15:59:25
Message-ID: 73dae3060505190659525082b5 () mail ! gmail ! com
[Download RAW message or body]

Dear R-helpers,

I am running well Perl and R on my Debian Linux, and I tried RSPerl.
Installation is ok and all simple functions run well. But I have a
problem to call the "lines" function.
I would like to draw an histogram with the density curve on. Is is OK
in R with the command:

>x<-rnorm(1000)
>hist(x,prob=T)
>lines(density(x))

for example.

Now, I have a Perl script with which  pars files, and I obtain data in
a list @distance. I draw an hist with RSPerl command (from Perl):

--------------------------
(---Perl script---)

&R::initR("--silent");
&R::library("RSPerl");
@Rdata=&R::call("as.numeric", \@distance);

&R::callWithNames("hist", {'', \@Rdata, 'main', '', 'xlab',
"Distribution of the distances between oligo-5' and sequence 3'",
'br', 15, 'col', 'gray', 'prob', 'T'} );

&R::call("lines", ("density", \@Rdata)) );

sleep(4);

&R::call("dev.off");

exit;
-----------------------------

All runs well: I obtained the histogram graph, and it seems that the
density call runs well since I have the message
"Performed the call, result has length 7"
and I read the density fuction results in 7 parameters;
but just after I have a message like "segmentation fault".

I cannot understand what happens ?

Has someone already encountered this problem or know how to abtain an
histogram and the density line with RSPerl ???

Thanks a lot for your help, caus I tried all I could think of ...

Florence.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic