Skip to content

Instantly share code, notes, and snippets.

@felixjung
Created November 22, 2012 09:37
Show Gist options
  • Save felixjung/4130245 to your computer and use it in GitHub Desktop.
Save felixjung/4130245 to your computer and use it in GitHub Desktop.
R Bundle "Run" Code
if [ ! -z "$TM_INPUT_START_LINE" ]; then
if [ `echo -en "$TM_SELECTED_TEXT" | egrep -cv '^[ ]*#'` -gt 0 ]; then
echo -en "$TM_SELECTED_TEXT" | "$TM_BUNDLE_SUPPORT/tmR.rb" "$CRAN" 1
else
cat | "$TM_BUNDLE_SUPPORT/tmR.rb" "$CRAN" 0
fi
else
cat | "$TM_BUNDLE_SUPPORT/tmR.rb" "$CRAN" 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment