How do I configure R so programs developed in RStudio run successfully in R?

Pandoc definitely works with R! RStudio just comes packed-in with a bunch of stuff (like pandoc).

Pandoc is an external dependency for RMarkdown (which, as @RobertMyles points out, is what is called when you hit the Knit button in RStudio). RStudio bundles the rmarkdown package and pandoc in when you install it; if you want to install R but not RStudio, you'll need to also install pandoc and rmarkdown yourself.

The version of R that comes with RStudio is totally vanilla, as far as I'm aware, and it can run independently. So you can just install RStudio but then call R from the command line, and all of those dependencies like pandoc should be fine. (This is what I do!)

EDIT: for example, here's a screenshot of RStudio running a script on my computer:

And here's me running that script directly from the command line (note, above, that my script starts with a shebang so that I can run it with ./test.r, not RScript test.r):

1 Like