Look at ?Extract myDF <- data.frame(c1 = c(1,1,1,1,2,2,2,2), c2 = c(23,34,45,45,78,65,45,70), c3 = c(12,15,67,87,23,19,90,32)) mean(myDF[myDF$c2 == 45,3])
HTH, Andy ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html