Hi Marna, I prepared this toy example that should help you.
x <- seq(1:100) y <- x*x avg <- mean(y) avg.v <- rep(avg,100) # your average column data df <- as.data.frame(cbind(x, y, avg.v)) library(ggplot2) ggplot(data=df[,-3], aes(x=x, y=y)) + geom_line() + geom_line(data=df[,c(1,3)], color='blue', aes(x=x, y=avg)) Best, -- GG [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.