Warnings like
[WARNING] Could not fetch resource anovaformulario.png
seems not be catched by tryCatch
like in code bellow using rmarkdown::render
tryCatch(
{
rmarkdown::render("filename.Rmd", output_format = "html_document", quiet = TRUE)
},
warning = function(cond) {
if (grepl("fetch resource",cond$message)) {
cat("Missing image file\n")
}
}
)