Hello, all, I have a dataframe of three rows and umpteen columns. I want to show the maximum, minimum, and median with a vertical line and a central dot (I'd use a boxplot, but with only three data points, that's overkill; I can't just use points, because of overlap and some of the other data plotted on the graph).
This works: > boxplot(data_frame, col="transparent", border="dark grey", xaxt="n", add=TRUE) But these don't: > st <- c(1:19) > segments(st, pmax(data_frame), st, pmin(data_frame)) (no, I haven't tried to put in the median points yet) I can plot them individually with > segments(1, max(data_frame[,1]), 1, pmin(data_frame[,1])) > points(1, median(fly_ash[,1])) but that's a bit tedious. Is there a better way of vectorising these columns such that they will work with pmax? Is there something like a pmedian? Regards, Hazel Jenkins ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.