When a chunk that includes plotting is reused the plots are not referenced properly, ie they are identical for both chunks though they are supposed to be different. What can I do about it?
## Test
```{r}
col <- "black"
```
```{r chunk1}
plot(0, col=col)
```
```{r}
col <- "red"
```
```{r chunk1}
```
You should use a different label like
```{r chunk2, ref.label='chunk1'}
```
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.