Hi,
here comes the next improved version of the Rdaemon.
Installation: -install R daemon.tmbundle as usual -open the gear menu for R daemon and execute 'Install Rdaemon' [make sure that the folder ~/Rdaemon doesn't exist in beforehand]
Usage: -open a new document and set the language to 'R console (Rdaemon)' -press OPT+APPLE+C to show the general control menu -choose 'Start Rdaemon' -type a command and press RETURN or ENTER
[look at the menu structure of the Rdaemon bundle in order to see what's possible]
Key binding: If you are at a command line (with beginning > + : or Browse) RETURN executes the command. The same for ARROW UP/DOWN for history. If you are inside of a text or whatever RETURN + ARROW UP/DOWN are set to the default behaviour. To use the default behaviour if your inside of a command line use APPLE+RETURN, or APPLE+ARROW UP/DOWN
ENTER always executes the current command.
Auto-completion is now bound to CTRL+.
Notes: 1) I improved the interaction between TM and R in such a way, that TM will always wait for a response from R, meaning TM expects a '> ', '+ ', or ': '. Otherwise TM will freeze (cancelling by pressing APPLE+.).
1a) To make sure that readline commands work you have to append ': ' to each prompt! Example:
a <- readline("value for x: ")
value for x:
|
| = caret. Enter now the value for a and press RETURN
Otherwise TM will freeze. For all internal prompts I checked is that the case.
2) edit() and fix() work if you execute these commands as background task (SHIFT+ENTER). Otherwise TM will freeeze because R calls 'mate -w'! If you want to edit an object use the 'Show Workspace' (OPT+APPLE+W) command and press the 'edit' button.
3) I wrote a Package Manager for loading/detaching of installed packages (OPT+APPLE+P). Use the checkboxes for that.
[The next item at the todo list is the write an 'Install Package' GUI]
4) quartz() ONLY works if you installed the 'CarbonEL' package!!
5) As default ?topic will open the HTML page in the default browser. You can change this in options().
6) Rdaemon comes with its own language grammar.
7) RAM drive: r_out (the entire console data) are stored in ~/Rdaemon/r_out. If you have a bit free RAM you can start Rdaemon in the RAM drive mode, meaning r_out (and some temp files) will now stored at a RAM drive which increase the speed enormously. To set up a RAM drive make the following: -go to TM's preference pane and choose Advanced > Shell variables -create a new variable called 'TM_RdaemonRAMDRIVE' and set it to '1' -start Rdaemon as usual -in addition you can specify the RAM size with the shell variable 'TM_RdaemonRAMSIZE'; the default is 50MB -while running Rdaemon with a RAM drive the daemon will check the free space and outputs a message if the free space is less than 3% for safety reasons. Then you can save the workspace; restart Rdaemon; and load the workspace
-if you set TM_RdaemonRAMDRIVE to '0' or delete it Rdaemon runs using the hard disk -! unfortunately there is no way to detach the ram drive; the only way is to restart your Mac ! (I'm working on it)
8) CTRL+H opens a help menu for the current word. Sometimes if you click 'fast' at a link inside of the HTML page TM doesn't follow that link. Thus click 'slower' and then it works ;)
9) For some GUI commands I make usage of the sink() command. Normally it works fine. But if you type e.g. '2+4' press RETURN and you don't see the reslut (only '> ') it could be that sink was not reset. To reset sink invoke OPT+APPLE+M and execute 'Reset Output' once or twice until you the correct output. As I mentioned this only occurs if you develop stuff.
So, please test it and give feedback. I would be very appreciated to receive any kinds of comments on it.
Have fun (hopefully)
--Hans