I have found what I think is a superior solution, though it shows the output in R rather than Ultraedit.
First, navigate to http://www.pspad.com/en/pspad-extensions.php
. (Yes, a "rival" text editor
). Grab the "accessR.zip" file. All you need from the zip archive is a program called clipboardtor.exe, which was written using a utility called autoit (http://www.autoitscript.com/site/autoit/
. You can read more about AutoIt at the link provided, but in a nutshell the utility allows you to script GUIs, and, furthermore, compile the script into an application. ClipboardtoR is therefore a standalone application that essentially finds the R console and pastes into the window. (It also works with an R session through PuTTY, if you need that.) The only drawback is that it is supposed to start R if it isn't already, but I'm guessing recent changes have broken that functionality.
The concept for using it to work with Ultraedit is the same as my utility above. Put ClipboardtoR in a suitable location, and create a tool to call it as a DOS program. You can then write macros and scripts to select text (such as a line), copy text, and call the tool which will send it to R. There is one caveat, though. I prefer using macros in this case over scripts because scripts will create a new, temporary window indicating execution. ClipboardtoR will take this temporary window as the "active" window and attempt to return focus to it after R does its thing. Of course, it will fail and leave R with the focus. Using macros solves this problem.