0

I'm a novice in R and have had an issue recently on knitting an .Rmd file. I can get the .md file with no errors and generate figures and tables on my computer, but the .md file never converts to HTML. There are a few code chunks that may be a bit taxing, like reading in multiple files at the beginning, using a pathway enrichment package, and turning a long table into a figure, but the entire code runs in minutes without any issues. So I'm not sure if these are the only reasons why the .md file is not converting to HTML.

I've been able to make HTMLs before on other .Rmd files and even this one (once or twice only), and I've tried reinstalling the latest R (4.3.1), RStudio (July 2023 release), updating pandoc (3.1.6) and all R packages, and downloading all my PC's software updates, all to no avail. Any insight on where things might be hanging up would be greatly appreciated!

  • 1
    Welcome to SO, pcsrkkhlt! It's difficult to give much comment on this without knowing anything about the source `.Rmd` document or how you are calling `rmarkdown::render` to convert it. Please make this question *reproducible*. This includes simple Rmd contents and the rendering code you've attempted (including any errors/warnings received). Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. Thank you! – r2evans Jul 31 '23 at 18:30

1 Answers1

0

What likely is happening here is that the "taxing" chunks are still being evaluated and you need to wait longer for them to be completed. To avoid long runtimes, you could outsource those data processing code chunks into a standalone R Script which saves the results using save() or saveRDS(). In the Rmd you then read in the data using load() or readRDS().

Till
  • 3,845
  • 1
  • 11
  • 18
  • Thanks for your response! I also think this is the likely culprit and will probably have to employ a workaround like this then if prolonged waiting doesn't work. Really appreciate it! – pcsrkkhlt Jul 31 '23 at 22:16