How do I write all the printed items in .txt file as an output in R -


suppose have hundreds of print statements , inside loop. although these print statements displayed while running code, want summarized output file written in realtime or @ completion of job.

for example

     print("first print , write.txt")      check<-1:50      for(i in 1:length(check)){      print(paste0("this want print , write output",i))      print(paste0("this want print , write output.txt",i))      } 

i check sink() function. can find information here

http://www.statmethods.net/interface/io.html

you can setup file want write, , can use cat() output information. can have output sent file , console.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -