Thankyou very much. I think "try" works for me. I am learning it . Sirius -- View this message in context: http://r.789695.n4.nabble.com/optimization-in-for-loop-tp3633638p3634100.html Sent from the R help mailing list archive at Nabble.com.