Skip to content
Prev 301211 / 398503 Next

Boxplot graphic

Probably the simplest answer is to google 'label boxplot outliers in R'. I found half a dozen solutions, (one of them my own, but that doesn't quite answer your question).

Adding names to a series of data can be as simple as saying
names(x) <- paste("x", 1:length(x))

After that, the solutions google finds answer the question.

One tip: If you want to _replace_ points with names, plot the boxplot with pch=NA (eg
bx <- boxplot(x~g, pch=NA)
to get the boxplot without outliers but with space for them, and then use text(bx$group, bx$out, ...) or similar to put the names in. If you want boxplot to return names, though, you will need to use a modified boxplot function. The first answer Google returns is one such.

S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}