rstudio - Get each line of code in a code chunk to be shown in the 'R Markdown' window as it is executed -


when knitting r markdown file, find myself staring @ markdown output waiting chunk finish. unfortunately, don't know of way of seeing command chunk executing. handy sense of progress, or find performance bottlenecks.

is there knitr option have missed ? setting progress=true, verbose=true shows chunk code before chunk executed. want each line of code shown in console after/before executed, in interactive session.

next console tab @ bottom, see r markdown tab, steps can seen there, see screenshot below:

enter image description here

edit 1: need set global options opts_knit$set(progress = true, verbose = true)

example:

--- title: "untitled" output: html_document ---  ```{r global_options, include=false} library(knitr) opts_knit$set(progress = true, verbose = true) ```  r markdown document. markdown simple ...   ```{r summarycars} summary(cars) ``` 

output on r markdown window:

processing file: temppp.rmd   |................                                                 |  25%   ordinary text without r code    |................................                                 |  50% label: global_options (with options)  list of 1  $ include: logi false    |.................................................                |  75%   ordinary text without r code    |.................................................................| 100% label: summarycars    ~~~~~~~~~~~~~~~~~~~~~~~~~ r code chunk ~~~~~~~~~~~~~~~~~~~~~~~~~~     summary(cars)     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ##------ fri jul 17 09:00:42 2015 ------##   output file: temppp.knit.md 

edit 2: answer doesn't meet op's requirement, keeping answer example illustrate op's code.


Comments