thanks a lot, works perfectly -- View this message in context: http://r.789695.n4.nabble.com/calculate-an-value-in-dependence-of-another-column-tp4683727p4683732.html Sent from the R help mailing list archive at Nabble.com.