Skip to content

Instantly share code, notes, and snippets.

@jrk
Created February 26, 2010 19:44
Show Gist options
  • Save jrk/316073 to your computer and use it in GitHub Desktop.
Save jrk/316073 to your computer and use it in GitHub Desktop.
Wrapper to run R scripts like Python/Perl/Ruby/Bash/anything else sane
#!/bin/sh
# Wrapper to easily run an R script at the command line, with arguments,
# like you're used to with Python/Perl/Ruby/Bash/anything else remotely sane.
#
# Usage:
# runR <script.R> [argument list]
# you can also optionally route output to /dev/null, depending on your desires
R --vanilla "--args ${@:2}" < $1 #>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment