Thanks it helped a lot ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/getting-the-value-from-previous-row-tp4554761p4560577.html Sent from the R help mailing list archive at Nabble.com.