Resizing images in RMarkdown

后端 未结 4 860
迷失自我
迷失自我 2021-02-04 12:37

I\'m trying to convert a R markdown .Rmd document to .pdf. Unfortunately, the images are too large. Is there any way to change the size of the image?

4条回答
  •  一整个雨季
    2021-02-04 13:31

    Use this at the beginning of a chunk:

    Decimals assigned to fig.height and fig.width are interpreted as inches. Other units of measure also allowed if explicit.

    ```{r, echo=FALSE, fig.height=2.7, fig.width=9}
    #your R code here
    ```
    

提交回复
热议问题