Launch R document from Smultron / Fraise

July 12, 2010

[This article was first published on Timothée Poisot » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Perhaps you know of the defunct Smultron, a lightweight editor for Mac OS X. There exists a new version called Fraise, with the same features. Among them, R syntax highlighting and the possibility to interact with the R Gui console.

To do so, when in Fraise, just push Cmd-B to open the Commands window, then create a new command, and type

osascript -e ‘tell application "" to activate’
osascript -e "tell application \"\" to cmd \"setwd(‘%%d’)\""
osascript -e "tell application \"\" to cmd \"source(file=’%%p’,

You can assign a keyboard shortcut to this command. Whenever you will hit the keys, will activate, set the good working directory, and execute your code. Now, you see that it is straightforward to modify this code / create another so that you execute the selected text only.

While Fraise is less powerful than TextMate and its R plugin, it is free, and really easier to instal that SciViews or StatEt.

To leave a comment for the author, please follow the link and comment on their blog: Timothée Poisot » R. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)