0

I am trying to adjust plotting and other graphical parameters in an R Markdown document and troubleshoot if the knitted html file is displaying the files correctly. Several of the analyses that I am running in the file are computationally intense and take upwards of 20 minutes to run, such as running replications for a large MCMCglmm model. However, this ends up wasting a lot of time when I've already tested the MCMCglmm model to see if it runs in R Markdown and made sure the file runs correctly. I have several different models in this document and as a result trying to check the formatting results in a lot of wasted time per iteration of the code due to waiting for the replications to complete.

Is there a way to temporarily turn off computationally intense sections of code in R Markdown and make analyses that use the MCMCglmm model run from the previously fitted model in the global environment rather than run the numerous time-intensive replications while I am trying to adjust the formatting and output? I know I can always delete the coding region call for R but I would like a way to do so that I can easily turn on or off and don't risk forgetting to put the coding region back into every part of the document where it is deleted. Obviously I will have to check the coding-intensive regions eventually, but I would like to be able to ignore them until I have other areas of the code properly formatted.

user2352714
  • 314
  • 1
  • 15

0 Answers0