```{r, error=TRUE, echo=FALSE, message=FALSE, results='hide', warning=FALSE}
abc1 <- data.frame(content(xyz)$test[[1]]$text)
abc2 <- data.frame(content(xyz)$test[[2]]$text)
abc3 <- data.frame(content(xyz)$test[[3]]$text)
abc4 <- data.frame(content(xyz)$test[[4]]$text)
abc5 <- data.frame(content(xyz)$test[[5]]$text)
```
I have mentioned the r chunk from my rmarkdown as above. I'm creating dataframes abc1,abc2,abc3...abc23 inside an r chunk. The problem is that I get a "OUT OF SUBSCRIPTION BOUND ERROR" as "test[[4]]$text" 4th element of test list does not exist and the process of compilation halts and final output is printed in HTML output.
By making error=TRUE, I can avoid the problem of halting of the compilation. The compilation gets completed but the end result is that the ERROR MESSAGES get printed on the final HTML output. Is there a way to avoid the error messages to be shown or deleted from the final HTML document. I have tried using result='hide' but doesn't seem to solve this issue. How should I get a clean HTML output with rmarkdown without error messages?
Here's the error message that gets printed on the final HTML output which I'm trying to get rid of using r chunk options:
## Error in content(xyz)$test[[4]]: subscript out of bounds