Dear R-Users, how to include error bars within lattice? How should the panel = function(x,y,...){ looks like? Does panel.arrows works here as well? I appreciate any help on this. Regards, Mario AT [[alternative HTML version deleted]]
?llines, lsegments and the like can be used in the panel functions to draw any sort of error bar that you can compute from the x,y,... data of the panel. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA "The business of the statistician is to catalyze the scientific learning process." - George E. P. Box> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Mario > Aigner-Torres > Sent: Wednesday, October 19, 2005 2:34 PM > To: r-help at stat.math.ethz.ch > Subject: [R] adding error bars to lattice plots > > Dear R-Users, > > how to include error bars within lattice? > How should the panel = function(x,y,...){ > looks like? > Does panel.arrows works here as well? > > I appreciate any help on this. > > Regards, > > Mario AT > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >
Have you looked at xYplot and panel.xYplot from Dr. Harrell's Hmisc package? --Matt> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Mario > Aigner-Torres > Sent: Thursday, October 20, 2005 9:52 AM > To: Berton Gunter; r-help at stat.math.ethz.ch > Subject: Re: [R] adding error bars to lattice plots > > > Thanks Bert! > > I have right now a dataset that looks like this: > > > tail(partition, 3) > element run logfO2 TC buffer xAn sdXan Di Disigma > 416 Al 36 -0.68 1180 AIR 0.734 0.007 2.10 0.02 > 417 Ca 36 -0.68 1180 AIR 0.734 0.007 1.29 0.02 > 418 Na 36 -0.68 1180 AIR 0.734 0.007 1.16 0.06 > > Basicaly I would like to insert error bars into a xyplot like this > > > xyplot(log10(Di) ~ TC | element.ord, groups=buffer.ord, #pch=16, > + #subset=no1140, > + data=partition, > + auto.key=list(columns=3), > + ) > > How could llines, lsegments or perhaps panel.arrows look like? > > I appreciate any help on this. > > Best regards, > > Mario > > > On 10/19/05, Berton Gunter <gunter.berton at gene.com> wrote: > > > > ?llines, lsegments and the like can be used in the panel > functions to draw > > any sort of error bar that you can compute from the x,y,... > data of the > > panel. > > > > -- Bert Gunter > > Genentech Non-Clinical Statistics > > South San Francisco, CA > > > > "The business of the statistician is to catalyze the > scientific learning > > process." - George E. P. Box > > > > > > > > > -----Original Message----- > > > From: r-help-bounces at stat.math.ethz.ch > > > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Mario > > > Aigner-Torres > > > Sent: Wednesday, October 19, 2005 2:34 PM > > > To: r-help at stat.math.ethz.ch > > > Subject: [R] adding error bars to lattice plots > > > > > > Dear R-Users, > > > > > > how to include error bars within lattice? > > > How should the panel = function(x,y,...){ > > > looks like? > > > Does panel.arrows works here as well? > > > > > > I appreciate any help on this. > > > > > > Regards, > > > > > > Mario AT > > > > > > [[alternative HTML version deleted]] > > > > > > ______________________________________________ > > > R-help at stat.math.ethz.ch mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide! > > > http://www.R-project.org/posting-guide.html > > > > > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide!http://www.R-project.org/posting-guide.html
On 10/21/05, Mario Aigner-Torres <mario.aignertorres@gmail.com> wrote:> > Hi Deepayan, > > my error bars are "delta"; they should be transformed as " Di - Disigma", > "Di+Disigma", being let's say "lower" and "upper, respectively. > > To that both my y (Di) as the error bars should be in log10. > > One potential problem is that I plot my y (Di) against x (element), which > are multiple. > The xyplot looks ok, but I get "panel" errors for trying out with the > error bars via panel.arrows. > > I appreciate your kind help on this! > > Regards, > > Mario > > On 10/21/05, Deepayan Sarkar <deepayan.sarkar@gmail.com> wrote: > > > > On 10/20/05, Mario Aigner-Torres <mario.aignertorres@gmail.com> wrote: > > > Thanks Bert! > > > > > > I have right now a dataset that looks like this: > > > > > > > tail(partition, 3) > > > element run logfO2 TC buffer xAn sdXan Di Disigma > > > 416 Al 36 -0.68 1180 AIR 0.734 0.007 2.10 0.02 > > > 417 Ca 36 -0.68 1180 AIR 0.734 0.007 1.29 0.02 > > > 418 Na 36 -0.68 1180 AIR 0.734 0.007 1.16 0.06 > > > > > > Basicaly I would like to insert error bars into a xyplot like this > > > > How are your error bars defined? > > > > > > xyplot(log10(Di) ~ TC | element.ord, groups=buffer.ord, #pch=16, > > > + #subset=no1140, > > > + data=partition, > > > + auto.key=list(columns=3), > > > + ) > > > > > > How could llines, lsegments or perhaps panel.arrows look like? > > > > > > I appreciate any help on this. > > > > > > Best regards, > > > > > > Mario > > > > > > > > > On 10/19/05, Berton Gunter <gunter.berton@gene.com> wrote: > > > > > > > > ?llines, lsegments and the like can be used in the panel functions > > to > > > draw > > > > any sort of error bar that you can compute from the x,y,... data of > > the > > > > panel. > > > > > > > > -- Bert Gunter > > > > Genentech Non-Clinical Statistics > > > > South San Francisco, CA > > > > > > > > "The business of the statistician is to catalyze the scientific > > learning > > > > process." - George E. P. Box > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: r-help-bounces@stat.math.ethz.ch > > > > > [mailto:r-help-bounces@stat.math.ethz.ch ] On Behalf Of Mario > > > > > Aigner-Torres > > > > > Sent: Wednesday, October 19, 2005 2:34 PM > > > > > To: r-help@stat.math.ethz.ch > > > > > Subject: [R] adding error bars to lattice plots > > > > > > > > > > Dear R-Users, > > > > > > > > > > how to include error bars within lattice? > > > > > How should the panel = function(x,y,...){ > > > > > looks like? > > > > > Does panel.arrows works here as well? > > > > > > > > > > I appreciate any help on this. > > > > > > > > > > Regards, > > > > > > > > > > Mario AT > > > > > > > > > > [[alternative HTML version deleted]] > > > > > > > > > > ______________________________________________ > > > > > R-help@stat.math.ethz.ch mailing list > > > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > > > PLEASE do read the posting guide! > > > > > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > > > > > > > > > > > > > > > > > > > > > > > [[alternative HTML version deleted]] > > > > > > ______________________________________________ > > > R-help@stat.math.ethz.ch mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide! > > > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > > > > > > >[[alternative HTML version deleted]]