[BioC] Re : missing value in plotDensity

Henrik Bengtsson hb at stat.berkeley.edu
Wed Feb 11 07:02:19 CET 2009


Hi,

plotDensity() of aroma.light takes either a (i) vector, (ii) matrix,
(iii) data.frame, or a (iv) list of vectors.  Examples:

v1 <- rnorm(1000); v1[200:300] <- NA;
v2 <- rnorm(500);
v3 <- rnorm(600); v1[100:300] <- NA;
aroma.light::plotDensity(list(v1,v2,v3));

See help("plotDensity.list", package="aroma.light") for more details.

/Henrik

On Tue, Feb 10, 2009 at 6:40 AM, julien laffaire <roomjr at yahoo.fr> wrote:
> 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
>
> _______________________________________________
> 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
>



More information about the Bioconductor mailing list