I'm using the officedown
package to generate a Word document. May I ask, if I want to import a well-designed figure from the disk, how to control officedown
not to change the height/width ratio of the figure?
For example, my original figure looks like this:
However, in the Word document generated by officedown
, it looks like this:
May I ask, how to avoid the distortion in officedown
? And how to make the width of the figure take the whole line?
My question can be reproduced by the following code:
---
output: officedown::rdocx_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.cap = TRUE,
message = FALSE,
warning = FALSE
)
library(officedown)
library(officer)
```
```{r}
knitr::include_graphics("the file path to a figure")
```
Your kind guidance is much appreciated!