Haakon
Haakon

Reputation: 21

knitr - Rmarkdown Execution halted problem

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

Messege

What is my next course of action?

Upvotes: 2

Views: 10729

Answers (2)

Ambu Vijayan
Ambu Vijayan

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

The error says "duplicate chunk label". All chunks must have unique names so try putting another label to the duplicate chunk :)

Upvotes: 2

Related Questions