Dear all, Does anyone knwo how to add error bar to the data point in a simple xyplot? Right now, I have a .dat file including both the data points and their standard deviation and read it in R. I tried function arrows(). But it didn't gave me any arrows. Thanks for the help! Jeny
<jz7 <at> duke.edu> writes: : Does anyone knwo how to add error bar to the data point in a simple : xyplot? Right now, I have a .dat file including both the data points and : their standard deviation and read it in R. I tried function arrows(). But : it didn't gave me any arrows. See errbar in package Hmisc and plotCI in package gregmisc.
On Monday 06 September 2004 16:54, jz7 at duke.edu wrote:> Dear all, > > Does anyone knwo how to add error bar to the data point in a simple > xyplot? Right now, I have a .dat file including both the data points > and their standard deviation and read it in R. I tried function > arrows(). But it didn't gave me any arrows.If you are talking about xyplot in the lattice package, you need to use larrows instead of arrows. e.g. your call might look like xyplot(y ~ x, data, sd = data$sd, panel = function(x, y, subscripts, sd, ...) { larrows(x, y - 2 * sd[subscripts], x, y + 2 * sd[subscripts], angle = 90, code = 3, ...) panel.xyplot(x, y, ...) }) Alternatively, you could use xYplot in the Hmisc package. Deepayan
Hello, Use the function xYplot from hmisc package cheers, Marta
Alternatively, use the plotCI() function from the gregmisc package. -G -----Original Message----- From: r-help-bounces at stat.math.ethz.ch To: jz7 at duke.edu Cc: r-help at stat.math.ethz.ch Sent: 9/7/04 5:08 AM Subject: Re: [R] how to add error bar to the data in R? Hello, Use the function xYplot from hmisc package cheers, Marta ______________________________________________ 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 LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}