Thanks a lot Duncan! It works fine now. Divya -- View this message in context: http://r.789695.n4.nabble.com/Problem-executing-function-tp3894359p3898054.html Sent from the R help mailing list archive at Nabble.com.