Dear Deepayan, I wasn't aware of panel.identify(), which I too will find very useful. As you say, it is strange that you can identify points that aren't plotted; this is the case for my solution for boxplot() as well -- though the reason it works there is more obvious (at least to me).
Thanks, John -------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -------------------------------- > -----Original Message----- > From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] > Sent: Friday, February 11, 2005 10:43 PM > To: [email protected] > Cc: John Fox; 'Christoph Lehmann' > Subject: Re: [R] label outliers in boxplot and/or bwplot > > 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
