RMarkdown Knit to html fails when ggplot added

Greetings,
I can run and knit a basic .Rmd that only deals with reading and summarizing my data. However, once I add any sort of graph/plot, knit fails.

I’ve read about a lot of issues with knit but haven't found one that addresses my issue (at least not that I could tell).

For example, adding the code below produced a knit error.

#		BOX PLOT
ggplot(data = dat1, mapping = aes(x = group.factor, y = bdi_total)) +
	geom_boxplot()

The commands and errors are below:

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Knit_PT_analyses.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output Knit_PT_analyses.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable 'theme:bootstrap' --include-in-header /var/folders/_z/cq1q31pn4f96303f_p64khkc0000gn/T//RtmpoH5Z4V/rmarkdown-str475879f8c71b.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' 
output file: Knit_PT_analyses.knit.md

pandoc: Could not fetch Knit_PT_analyses_files/figure-html/---> boxplot-1.png" width=“672” /></p>
</div>
</div>




</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- tabsets -->

<script>
$(document).ready(function () {
  window.buildTabsets(
Knit_PT_analyses_files/figure-html/---> boxplot-1.png" width=“672” /></p>
</div>
</div>




</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- tabsets -->

<script>
$(document).ready(function () {
  window.buildTabsets(: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 67
Execution halted

Any suggestions on how to address this issue would be greatly appreciated.

Cheers,
Jason

Hi @Jason.C,
You will need to show us a complete but simple xxx.Rmd file that gives these errors when you try to knit it. That way we can help diagnose the problem.
Check here for guidance:
https://stackoverflow.com/help/minimal-reproducible-example

Thank you. I am working on an MRE.

Jason

While working on the MRE the errors disappeared.
Now to trouble shoot.
Jason

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.