Hi, I have the similar issue. Error creating notebook: duplicate label '...', when I try to use knitr’s code externalization, namely, knitr::read_chunk() in the notebook’s setup chunk.
When I restart R and run all Chunks, it is good. However, when I try to save the notebook, the error pop up. I don't think I have any duplicate labels. Following is the image of my result.
knitr require unique label for chunk. Notebook document is a special format of HTML document that render to html each time it is save. As you cannot render with duplicated label, it cannot be save. For html_document format, there is no issue with saving but you will have an error when rendered.
I understand what you say. There should be no duplicated chunk labels.
However, I don't think my chunk labels are duplicated. If you think my chunk labels are duplicated, could you please point out how they are duplicated?
I just wanted to knitr a R script following , but I got an error.