I was getting errors in my pdf output files after rendering them.
This should be a problem with xfun/knitr packages of R. I tried to update them with no help. None of the commands
warning=FALSE
knitr::opts_chunk$set(warning = FALSE)
options(warn = -1)
would help neither. I then asked a solution to ChatGPT and it proposed the following hacky way which worked like a charm
sink("tmp.txt")
suppressWarnings(rmarkdown::render("path/to/yourfile.rmd"))
sink()
No comments:
Post a Comment