In RStudio, is it possible to have a code chunk that sends commands to the terminal (specifically Windows CMD prompt)? I know that I can use the command prompt via the "Terminal" tab in RStudio, but I would like to write these commands in a code chunk within a larger RMarkdown document. This way, when I click "Run All", the commands are sent automatically at the appropriate time.
system()
,shell()
, orsystem2()
commands (depending on your scenario) will all execute system commands from within R.shell()