Reputation: 21
I have encountered the following error when I try to knit my r-markdown document:
processing file: Exam.Rmd Error in parse_block(g[-1], g1, params.src, markdown_mode) : Duplicate chunk label 'setup', which has been used for the chunk:
knitr::opts_chunk$set(echo = TRUE) Calls: ... process_file -> split_file -> lapply -> FUN -> parse_block Execution halted
What is my next course of action?
Upvotes: 2
Views: 10729
Reputation: 51
Most probably this line got copy pasted some how in your code
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(warning = FALSE)
knitr::opts_chunk$set(message = FALSE)
Delete the duplicate and you are good to go.
Upvotes: 0
Reputation: 21
The error says "duplicate chunk label". All chunks must have unique names so try putting another label to the duplicate chunk :)
Upvotes: 2