I wonder how to suppress error messages in knitr
. My MWE is below:
\documentclass{article}
\begin{document}
<< Test >>=
1:10
X
@
\end{document}
Edited
The object X
does not exist. I want to show X
in my code chunk and want to evaluate it too even this will throw an error. But doesn't want to show any errors in my .tex
document same as we can suppress warnings by setting warning=FALSE
.
X
in my code chunk and want to evaluate it too. But doesn't want to show any errors as we can suppress warnings by settingwarning=FALSE
. – MYaseen208error=FALSE
, but your goal is not fully clear for me. – DrDominclude
chunk option fails when there is an error in the chunk. I hope @Yihui will chime in if it's possible to stop the chunk from appearing in the result no matter what. – Roman Luštrik