[BioC] Re : missing value in plotDensity

julien laffaire roomjr at yahoo.fr
Tue Feb 10 15:40:12 CET 2009


Perhaps you should do it like this :

v1, v2 and v3 are 3 vectors of inequal sizes.

plot(density(v1), xlim=c(), ylim=c(), col="black")
lines(density(v2), col="red")
lines(density(v3), col="blue")

In this way you don't have to add NA values but you will need to "play" with xlim and ylim to find the good scale.

is it ok ?
J

--- En date de : Mar 10.2.09, shirley zhang <shirley0818 at gmail.com> a écrit :

> De: shirley zhang <shirley0818 at gmail.com>
> Objet: Re: Re : [BioC] missing value in plotDensity
> À: roomjr at yahoo.fr
> Cc: "Bioconductor Mailing List" <bioconductor at stat.math.ethz.ch>
> Date: Mardi 10 Février 2009, 14h57
> Hi Julien and Bioconductor
> 
> Thanks for your reply and sorry that I did not make myself
> clear.
> 
> I would like to draw 3 density plots in one figure. Since
> the size of
> each vector is different, I created a matrix "x"
> by adding NA value in
> order to make the size same. However when I call
> plotDensity(x) in
> package "affy", it gives me the following error
> message:
> 
> "x contains missing values".
> 
> My problem is how to draw 3 density plots in one figure
> when the size
> is different.
> 
> Thanks,
> Xiaoling
> 
> On Mon, Feb 9, 2009 at 4:57 PM, julien laffaire
> <roomjr at yahoo.fr> wrote:
> > Hi Shirley,
> > you can handle missing values with the na.rm option
> which is TRUE by default. I've change some values of one
> of my dataset to NA et it works well.
> > I hope it can help.
> > Julien
> >
> >
> >
> > --- En date de : Lun 9.2.09, shirley zhang
> <shirley0818 at gmail.com> a écrit :
> >
> >> De: shirley zhang <shirley0818 at gmail.com>
> >> Objet: [BioC] missing value in plotDensity
> >> À: "Bioconductor Mailing List"
> <bioconductor at stat.math.ethz.ch>
> >> Date: Lundi 9 Février 2009, 22h14
> >> Hi All,
> >>
> >> Does anybody know how to use plotDensity() with
> missing
> >> value?
> >>
> >> Thanks,
> >> Shirley
> >>
> >> _______________________________________________
> >> Bioconductor mailing list
> >> Bioconductor at stat.math.ethz.ch
> >> https://stat.ethz.ch/mailman/listinfo/bioconductor
> >> Search the archives:
> >>
> http://news.gmane.org/gmane.science.biology.informatics.conductor
> >
> >
> >     
> __________________________________________________________________________________________________
> > Ne pleurez pas si votre Webmail ferme ! Récupérez

> http://fr.docs.yahoo.com/mail/transfert_mails.html
> >


      __________________________________________________________________________________________________
Ne pleurez pas si votre Webmail
hoo.com/mail/transfert_mails.html



More information about the Bioconductor mailing list