Just a small typo. I forgot a ) in the polygon function. The code must be: polygon(x = c(qrv[1], drv$x[select], qrv[2]), y = c(0, drv$y[select], 0), col='blue')
______________________________________________ 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.