Suppose I have the following data set
data <- c(
9.5, 27.9, 7.8, 17.8, 31.4, 25.9, 27.4,
25.2, 31.1, 34.7, 42, 29.1, 32.5, 30.3, 33, 33.8, 41.1, 34.5, 62)
When I drew the boxplot in r
boxplot(data)
I got three outliers 7.8, 9.5, and 62, that are illustrated in the diagram with three small circles.
Here I want to change the pch of the biggest outlier, i.e., 62, to a filled circle, but not the other two smaller outliners.
The following is what I've tried, but it doesn't work:
boxplot(data, outpch = ifelse(data >= 60, 16, 1))
Is there a way to achieve this? Thanks