简体   繁体   中英

R-markdown self_contained

I'm using R-markdown for a couple of reports. I do it with self contained graphics because I send it via email.

This worked till recently. But now the images are not shown anymore (with the error of a cross in a box). It might be that I updated the Version of RStudio. I used this a the top of the script:

---
title: "blablablab"
author: "blablablab"
output:
html_document:
fig_caption: yes
toc: no
toc_depth: 2
toc_float: no
number_sections: false
self_contained: yes
---

I know that this question is not very specific. I just wanted to ask if there is anybody which also had self contained graphics which suddenly didn't work anymore.

Thanks for the help in advance!

Greetings Dani

I just had same problem. In RStudio i had previously:

output:
  html_document:
    self_contained: yes

and it always worked properly producing self-contained HTML. TODAY it stopped working properly. I did update Rstudio a few weeks ago and might not have noticed problem, not sure. SO now i changed to:

output:
  html_document:
    self_contained: yes
    mode: selfcontained

Which seems strange and redundant with two separate lines trying to make things self-contained BUT it worked.

As a sanity check, make sure that you do not have the option include=FALSE in your global chunk options opts_chunk$set

When that is the case, the images are created and stored in the figure-html directory, but not embedded in the html file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM