How to insert plain picture (jpeg / png) from chunk with knitr

后端 未结 1 980
死守一世寂寞
死守一世寂寞 2021-02-02 13:48

I want to insert a picture at the beginning of text using a code block, not markdown. I am using the Tufte handout template output: rmarkdown::tufte_handout and whe

1条回答
  •  臣服心动
    2021-02-02 14:17

    When a figure is not generated from R code, you may use knitr::include_graphics() to insert it to the document, e.g.

    ```{r echo=FALSE, out.width='100%'}
    knitr::include_graphics('./cropped-banner_efpt.jpg')
    ```
    

    0 讨论(0)
提交回复
热议问题