Hello, See ?open and ?capture.output or ?textConnection To open a connection (with 'open') then write to it is probably the solution. Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/add-data-to-a-file-while-doing-a-loop-tp4269086p4269396.html Sent from the R help mailing list archive at Nabble.com.