Thanks Dieter. It works. -- View this message in context: http://n4.nabble.com/Problems-with-looping-in-R-tp1475550p1475619.html Sent from the R help mailing list archive at Nabble.com.