I found this link very helpful in understanding how to write lines to a file: Write lines of text to a file in R
Unfortunately though I\'m finding that I do not know how
Use paste instead of cat
paste
cat
file.create("sample.txt") fileConn <- file("sample.txt") writeLines(c(paste(i, j, k, "07"),"1","41.6318 -87.0881 10.0"), fileConn) close(fileConn) file.show("sample.txt")