missing value in plotDensity
1
0
Entering edit mode
shirley zhang ★ 1.0k
@shirley-zhang-2038
Last seen 10.2 years ago
Hi All, Does anybody know how to use plotDensity() with missing value? Thanks, Shirley
• 4.1k views
ADD COMMENT
0
Entering edit mode
@julien-laffaire-3273
Last seen 10.2 years ago
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 ! ail/transfert_mails.html
ADD COMMENT
0
Entering edit mode
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 votre historique sur Yahoo! Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html >
ADD REPLY
0
Entering edit mode
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
ADD REPLY
0
Entering edit mode
Hi Shirley The multidensity and multiecdf functions in the geneplotter package are also attempts to address your use case. Let me know how you find them. Best wishes Wolfgang -- ---------------------------------------------------- Wolfgang Huber EMBL-EBI http://www.ebi.ac.uk/huber julien laffaire 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 >>>> >>>> _______________________________________________
ADD REPLY
0
Entering edit mode
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 >
ADD REPLY

Login before adding your answer.

Traffic: 688 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6