On Monday 06 September 2004 16:54, [EMAIL PROTECTED] 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
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html