Fairly new-ish to R, so apologies if I've completely overlooked something.
I have an R script that uses purrr::walk to create pdf reports using rmarkdown::render. In render() the input Rmd script file works fine when it has spaces in the name, but when I renamed it with underscores it states the directory it is contained in does not exist.
This code runs fine and produces the required output.
I only have it once without the underscores and that works fine. But if I rename it with underscores and change the input parameter to reflect that then I get the directory does not exist error
As I said, once I remove all the underscores it runs fine. I even kept all the underscores in and tried with input = "./rooms/report_per_board template.Rmd" and that runs fine. It just seems to not like the input file having all underscores between words.
input = "./rooms/report_per_board_template.Rmd" - Doesn't work
input = "./rooms/report per board template.Rmd" - Does work
input = "./rooms/report_per_board template.Rmd" - Does work
As your input and output leaves in the same directory, does it work if you change the working dir before rendering (either using xfun::in_dir() or withr::with_dir()) ?
If so, there could be an issue somewhere in rmarkdown and path handling. If you could create a reproducible example (e.g. github repo or a zip folder), then open an issue in rmarkdown repo.