Skip to content

Instantly share code, notes, and snippets.

@perlatex
Created October 26, 2022 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlatex/2e0611ea8e8e11f04a05d220246637af to your computer and use it in GitHub Desktop.
Save perlatex/2e0611ea8e8e11f04a05d220246637af to your computer and use it in GitHub Desktop.
---
output: officedown::rdocx_document
---
```{r setup, include=FALSE}
library(officedown)
library(ggplot2)
```
# section 1
## Figure1-1
display Figure1-1, it is ok.
```{r fig.cap="economics plot", fig.id = "tsplot1", fig.cap.tnd = 1}
ggplot(economics, aes(date, unemploy / pop)) +
geom_line() +
theme_minimal()
```
# section 2
## Figure2-1
expected Figure2-1, but it display Figure 2-2.
```{r fig.cap="economics plot", fig.id = "tsplot2", fig.cap.tnd = 1}
ggplot(economics, aes(date, unemploy / pop)) +
geom_line() +
theme_minimal()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment