I have a complex .Rmd file that creates plots and tables in a loop. It works perfectly fine when knitting from the RStudio UI via the knit button (to html).
In the loop iterations I wrap each ggplot object in a print statement and cat("\n\n") before printing a kable(). This works fine from the UI.
Now I want to call it directly from render() with different arguments. When I call render(), I see the print(kable()) updates the View window in the RStudio IDE but the table does not also appear in the html results. All the other content is fine.
The code chunk has results='asis'.
Sorry but the code is in a secure environment and was hoping someone might give me a pointer before I try to create an example.