- , . , .
, :
set.seed(1501)
y <- c(4, 0, 7, -5, rnorm(16))
x1 <- c("a", "a", "b", "b", sample(letters[1:2], 16, T))
lab_y <- sample(letters, 20)
bx <- boxplot(y~x1)
out_lab <- c()
for (i in seq(bx$out)) {
out_lab[i] <- lab_y[which(y == bx$out[i])[1]]
}
identify(bx$group, bx$out, labels = out_lab, cex = 0.7)
, identify(), , ,
. "STOP".
, ! !
PS: for, , - .
EDIT: Federico link , ! :
boxplot(y~x1)
identify(as.integer(as.factor(x1)), y, labels = lab_y, cex = 0.7)