2

How do I run my R Markdown file from PowerShell? I want to automate my markdown file and send the report out as an email using PowerShell. I cannot use the send.mail function in R due to security purposes when trying to access the email servers, and the Rscript.exe command in Powershell will only work for the script file not the markdown file. Any suggestions?

2
  • Rscript rmarkdown::render("sample.Rmd") Commented Jul 14, 2017 at 13:23
  • You may need to provide the path to R.exe or Rscript.exe, as per this answer. Not a big PowerShell user myself, but this is the only way it works for me: &"c:\path\to\R.exe" -e "rmarkdown::render("sample.Rmd")". Note the & and the use of " and -e. Commented Jul 14, 2017 at 14:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.