An R program is generated with the name of path sans
  extension, appended with "-render.R". This contains a header and a call to
  rmarkdown::render or
  quarto::quarto_render. This program is then
  executed from its directory and the output file is optionally opened.
The generated R program is not modified if it already exists, but the program
is examined to confirm it calls rmarkdown::render or
rmarkdown::render.
render(path = NULL, open = rstudioapi::isAvailable(), as_job = FALSE)logical indicating whether the document was successfully
  rendered.
if (FALSE) { # \dontrun{
render("markdown_doc.Rmd")
} # }