Re: [R-SIG-Mac] Execute code to the GUI R.app from Smultron or BBEdit
Hi, On Dec 28, 2008, at 7:46 PM, Guillaume Chapron wrote: Hello, I would like to know how (if) I can, with Smultron or BBEdit as external editors, execute a line or the whole document into the GUI R.app. Ideally, I would type Apple+R and this would go. There is a bundle to do this with Textmate, but I have not found anything for Smultron or BBEdit. Has anyone been able to do this? Thanks! Check out these recent threads: TextWrangler: https://stat.ethz.ch/pipermail/r-sig-mac/2008-November/005534.html Smultron: https://stat.ethz.ch/pipermail/r-sig-mac/2008-December/005691.html -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University http://cbio.mskcc.org/~lianos ___ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Execute code to the GUI R.app from Smultron or BBEdit
Hi, Check out these recent threads: TextWrangler: https://stat.ethz.ch/pipermail/r-sig-mac/2008-November/005534.html Smultron: https://stat.ethz.ch/pipermail/r-sig-mac/2008-December/005691.html -steve Hi, Thanks a lot - apparently I did not search well in the archive. I will just post a recap here for BBEdit in case some people want to do it as well: *Open Script Editor (located in Applications/AppleScript) *File- new script *Paste this (modified from Jean Thioulouse code for TextWrangler on this list): tell application BBEdit set the_selection to (selection of front window as string) if (the_selection) is then set the_selection to line (get startLine of selection) of front window as string end if end tell tell application R cmd the_selection end tell Save this script into this directory ~/Library/Application Support/BBedit/Scripts/ In BBEdit go to the menu Windows - Palettes-Scripts Your script should be visible there, and you can set a key to run it. Thanks again Guillaume ___ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac