Reputation: 323
I am doing computation with a very big database and when I start a loop in general, it can take few hours.
I need to create a text file in the loop, to know at which [i]
I am.
The file can be overwritten at evry [i]
. It is just to control how it is going without stopping the program.
Any Idea?
Upvotes: 1
Views: 44
Reputation: 545885
Check out the writeLines
function. The second argument allows you to specify a file path:
writeLines(as.character(i), 'progress.log')
Upvotes: 1