R and TextMate

December 1, 2009 at 4:54 am 6 comments

| Gabriel |

Now that I’ve started dabbling in R, I figured I needed to get my text editor to highlight the Klingon-esque syntax. TextWrangler and Smultron already support R, but getting it for TextMate requires the Terminal:

cd "~/Library/Application Support/TextMate/Bundles"
svn co http://svn.textmate.org/trunk/Bundles/R.tmbundle/

Note that 64-bit R is buggy so if you have trouble piping scripts from TextMate to Rdaemon (i.e., the command line R running in the background), you can use the bundle editor to redirect it to “R32” instead of just “R” which will force it to use the slightly slower but more reliable 32-bit R. Or if that’s too hard, just stick to piping to R.app instead of Rdaemon.

Also, as long as you’re playing with the TextMate library, you might as well install “GetBundles,” a GUI frontend for browsing the TextMate bundle server.
svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/

Note that GetBundles (with “s”) supersedes the now defunct GetBundle (without “s”) that you might see mentioned if you google things like “TextMate Bundle” or “TextMate R syntax”.

Entry filed under: Uncategorized. Tags: , .

Perl text library Drop the entirely missing variables

6 Comments

  • 1. Heidi  |  June 23, 2010 at 9:32 pm

    Have you found a way to send commands directly to the R GUI? Some things like file.choose are not possible from the command-line editor.

    • 2. gabrielrossman  |  June 24, 2010 at 12:23 pm

      The R bundle for TextMate has a standard action for “Send Selection/Document to … R.app” On OS X the “.app” suffix means a GUI application.

  • 3. Patrick  |  October 5, 2010 at 4:44 pm

    Updating to TextMate 1589 (cutting edge version) seems to have broken my stata.tmbundle. (I get a message saying that the info.plist file in the tmbundle is missing or corrupt, and since it’s still in the package contents, I assume it’s the latter.) I would simply uninstall Beatty’s Stata bundle, but his York site appears to be down and I don’t know where else the Stata bundle can be downloaded. Do you have any advice?

    • 4. gabrielrossman  |  October 5, 2010 at 4:52 pm

      ask somebody who has a working copy of the bundle to look for it in “~/Library/Application Support/TextMate/Bundles”

      in this instance, consider it done as i’ll email you a copy

      • 5. Dan Byler  |  October 12, 2010 at 3:11 pm

        Gabriel,

        Could you email me a copy of the Stata bundle as well?

        Thanks!
        Dan

      • 6. Dan Byler  |  October 12, 2010 at 4:42 pm

        Thanks, Gabriel!

        I took the liberty to post the TextMate bundle for others who may be looking for it, as well as a version modified for tab-completion.

            http://bylr.net/3/2010/10/stata-bundle-for-textmate/

        Cheers,
        Dan



%d bloggers like this: