# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- library(DAAG) gender1 = with( socsupport, abbreviate( gender, 1 ) ) table(gender1) country3 = with( socsupport, abbreviate( country, 3 ) ) table( country3 ) num = with( socsupport, seq(along=gender) ) lab = paste( gender1, country3, num, sep=":" ) # label for each of the points # Following hints found here: http://stackoverflow.com/questions/7929542/boxplot-outlier-labeling-in-r bp = boxplot( socsupport ) out_lab = c() for( i in seq(bp$out) ){ out_lab[i] = lab[bp$out[i]] } identify( bp$group, bp$out, labels=out_lab, cex=0.7 )