Append lines to a file February 17, 2023 by Tarik Have you tried using the write function? line="blah text blah blah etc etc" write(line,file="myfile.txt",append=TRUE)