show markdown execution in console

Usually, i use rmarkdown's function render to generate my interactive reports. My question is how can i get my execution printing in R console? for example when i run .Rmd file which contains this code:

for(i in 1:400000){

I want to see i's printing in my R console before the html output file will be created.

Thank you for your help.

I think one trick could be to use message(i) and use message=FALSE as option for this chunk .
Doing this, the message won't be include in the html output and redirectes to the console where render is called.

Not sure but worth a try! :wink:

Thanks! for your help :slight_smile: i will try it.