Message-ID: <B562D130-C49D-45AF-98A4-9E4A9FF32CB7@charite.de>
Date: 2005-12-29T23:09:19Z
From: Tilo Blenk
Subject: please recommend an editor (Hai Lin)
For the BBEdit/TextWrangler users.
If you do not use it already, you may find the following Applescript
helpful:
set selectedText to selection as string
tell application "R"
activate
cmd selectedText
end tell
It is very basic but it works. If you write some R code in BBEdit you
can select some commands there, select the Applescript via the menu
or a keyboard shortcut, and the commands are executed in the R console.
To create the script just open the script editor in BBEdit, copy the
code into the editor, compile it, and save the script into '~/Library/
Application Support/BBEdit/Scripts/'. You will find the script in the
Applescript menu. You may want to set a keyboard shortcut (Window >
Palettes > Scripts menu and then Set Key).
Tilo