Problem solved, thanks everyone for your help. Céline -- View this message in context: http://r.789695.n4.nabble.com/Sum-with-condition-tp3972839p3984909.html Sent from the R help mailing list archive at Nabble.com.