I'm maintaining a package and have to rebuild the README.Rmd file every once in a while.
Using the "knit" button in RStudio, the effect is correct: the file README.md is generated at the root of the package, and a README.html preview is created in a temporary file and opened.
However, if I use the following command, the HTML preview is created at the root of the package, which is unnecessary.
rmarkdown::render(input="README.Rmd")
How to tell this preview file to be temporary, or even to not bother to exist at all?
I tried to set intermediates_dir=tempfile() with no effect, and I couldn't find what command RStudio is running on "knit" push. Moreover, it seems that this simple command does not have this side effect when run through Github Actions (link).
PS: Here is a minimal example of my Rmarkdown file (whole file here):
---
output: github_document
---
Hello Word