rmarkdown::run does not accept file path with quotes

Hi @technocrat, thank you!

Indeed, I also thought of forcing RStudio to properly escape the quote in the dir argument as well.
I tried defining a new dir, with the path properly written, in the first line of the script:

This works until I get another error - RStudio signals that, when I then click on "Run Document", the document is interpreted as a normal markdown document, not a shiny one.
I know why this happens: I learned here that shiny documents require the very first line of the script to contain the YAML header, otherwise the document will not be recognized as shiny.

Therefore, possible solutions are:

  • Forcing RStudio to read a pre-defined path with properly escaped special symbols in a way different from specifying it in the first line of the script (my preference);
  • Forcing shiny to work even with a first line not starting with a YAML (probably not possible).

I really cannot believe that nobody in the world uses the buttons in RStudio with file paths containing quotes!

Any suggestions? :slight_smile: