Here is a slight modification of one of the R Bundle commands which lets you send a file to be processed the R GUI. I started with the built-in “Send selection to R” which looks like this:
osascript -e 'tell application "R" to activate' -e "tell application "R" to cmd "${TM_SELECTED_TEXT//"/\"}""
I replaced $TM_SELECTED_TEXT with source("$TM_FILEPATH"):
osascript -e 'tell application "R" to activate' -e "tell application "R" to cmd "source(\"$TM_FILEPATH\")""
I have a more detailed explanation here: http://love.agent.ie/ articles/2006/07/02/passing-scripts-to-the-r-gui
-Ana