当重新使用包含绘图的块时,绘图没有被正确引用,即它们对于两个块都是相同的,尽管它们应该是不同的.我能做些什么呢?
## Test
```{r}
col <- "black"
```
```{r chunk1}
plot(0, col=col)
```
```{r}
col <- "red"
```
```{r chunk1}
```
Run Code Online (Sandbox Code Playgroud)
你应该使用不同的标签
```{r chunk2, ref.label='chunk1'}
```
Run Code Online (Sandbox Code Playgroud)
见http://yihui.name/knitr/demo/reference/