Skip to content

Instantly share code, notes, and snippets.

@hannesdatta
Created October 13, 2023 13:44
Show Gist options
  • Save hannesdatta/b121672164b9747ef248a23d5c769174 to your computer and use it in GitHub Desktop.
Save hannesdatta/b121672164b9747ef248a23d5c769174 to your computer and use it in GitHub Desktop.
starting up R from the command line/terminal
R --vanilla < "filename.R" # you see output on screen
Rscript filename.R # no output, unless explicitly "print"-ed
R -e "unlink(*.*)" # executes one R command
R -e "rmarkdown::render('filename.Rmd', output_file='../paper/output/filename.pdf')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment