On Friday 11 February 2005 21:20, John Fox wrote:
> Dear Christoph,
>
> (I don't believe that this question was answered; my apologies if it
> was.)
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > Christoph Lehmann
> > Sent: Friday, February 11, 2005 8:44 AM
> > To: [email protected]
> > Subject: [R] label outliers in boxplot and/or bwplot
> >
> > Hi
> >
> > Is there a way to lable (e.g. observation-number) the
> > outliers in a boxplot?
>
> You can use identify() with horizontal coordinates at 1 (and at
> successive integers for parallel boxplots); e.g.,
>
> x <- c(rnorm(98), 8, 10)
> boxplot(x)
> identify(rep(1, 100), x)
>
> > and in a bwplot?
>
> Not to my knowledge.
Actually, it turns out that the obvious analog works with bwplot too
(though it's a bit weird that you can 'identify' points that are not
actually plotted). See below.
> I hope this helps.
> John
>
> > thanks a lot
> >
> > Christoph
> >
> >
> > P.S. identify() is not available with bwplot, is it?
There's panel.identify(). You could use it as part of your panel
function, but in this case it might be more natural to do it after the
fact, as in:
bwplot(x)
trellis.focus("panel", 1, 1)
panel.identify()
trellis.unfocus()
This has the added advantage that you don't have to specify 'x' and 'y'
explicitly, they're taken from the corresponding panel data.
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