[Tex/LaTex] what does this error message suggest?

errorsknitr

An error just prompted up when I process an .Rnw file using RSudio:

Loading required package: knitr
Warning message:
package ‘knitr’ was built under R version 3.1.2 


processing file: PROVIDE_definition_f9pr1.Rnw
Error in parse_block(g[-1], g[1], params.src) : duplicate label 'match'
Calls: knit ... process_file -> split_file -> lapply -> FUN -> parse_block
Execution halted

I think it is related to package knitr, but I have no idea where the error come from. Does anybody know what happened?

Best Answer

It suggests that you have at least two code chunks with the same label match, like this

<<match>>=
@

<<match>>=
@

Duplicate labels are not allowed in knitr.

Related Question