How to cancel rendering in an Rmd document when rmarkdown :: render is called?

I am using rmarkdown::render to batch render some Rmd documents in HTML. The source documents contain several pieces of code that require computing resources. In some cases, when the render is on, some variables suggest that the rendering should not continue, how can I cancel / skip the current render to the next one, if any?

In my case, the knitr::knit should be canceled. How can I do it right?

I notice that knitr::knit_exit seems to be doing this work, but I tried it in RStudio rendering and does not work.

+6
source share

All Articles