Thanks Bill, the output of dput was very similar to your example, I was not sure so did not put it on the post. however i uploaded the foo.txt file which contains the part of the data. sharad -- View this message in context: http://r.789695.n4.nabble.com/Help-with-code-tp4218989p4222947.html Sent from the R help mailing list archive at Nabble.com.