knitr (R) - how not to embed images in the HTML file?

前端 未结 4 775
醉梦人生
醉梦人生 2020-12-05 18:13

This is probably very easy but I can\'t seem to find it in docs. I would like to not embed the generated images in the HTML file itself.

So basically I want knit2htm

4条回答
  •  臣服心动
    2020-12-05 18:44

    Its not knitr that does this, knitr just produces a modified markdown file after running the R chunks. So you need to look at the help for the markdown package to figure out...

    Its the base64_images option. Coffee hasn't kicked in yet, so I haven't exactly sussed out how to set/reset individual markdown options, but clearing them all out works for me:

     > knit2html("foo.Rmd",options="")
    

    producing

     

    plot of chunk unnamed-chunk-1

    in foo.html.

    If clearing all those options breaks other stuff, then read up on markdownHTMLOptions.

提交回复
热议问题