I need to plot the outliers from a boxplot on to a map. My lecturer gave me the function to extract all outliers from this boxplot:
outliers = match(names(boxplot(pc3, plot = FALSE)$out), names(pc3))
(pc3 being the data)
I am then plotting them using:
points(Data.1$X[outliers], Data.1$Y[outliers], col = "red", cex = 3, lwd = 2)
However I want to extract the positive outliers into one variable and the negative outliers into a different variable in order to plot them in different colours. How do I do this?
Thank you.