November 30, 2009
I’m looking at ways to provide access to R via a web application. First rule: see what’s available first, before you reinvent the wheel. It’s not pretty.
From the R Web Interfaces FAQ:
||Page last updated 1999. Of the 3 example links on the page one ran very slowly, the second not at all and the third is broken.
||Or rather, not online. Unless this CGI form is the same thing. I tried Example 1, it returned a server error.
||Links to several CGI forms, none of which worked for me.
|CGI-based R access
||Link did not load.
||Package now maintained at Omegahat. Did not attempt installation. Last updated 2005.
||I could not connect to this URL.
||The pick of the bunch. Provides server-side access to R through an Apache module. I was able to install RApache on 32-bit (but not 64-bit) Ubuntu 9.10 and get it running. Could use more documentation.
||Serves R via TCP/IP. Last updated 2006.
||Broken link. No longer exists, so far as I can tell.
|R PHP Online
||Link out of date (but you can follow it to the newer page). Last updated 2003, so unlikely to be much use.
||Last updated 2006; the example that I tried gave a server error.
||A Bioconductor package. Did not investigate further.
||An application to create R web interfaces. My browser hung at “waiting for cache”. I gave up.
So, aside from RApache and some very old-fashioned and/or broken CGI scripts, I conclude that there is little interest in writing beautiful, modern statistical web applications (notable exception). Not so much a case of “reinventing” as “inventing”.
November 18, 2009
Update: I should have said Rails IDE – but I’m sure similar plugins are available for other languages
I fired up NetBeans at work today, tried to open a Rails project and – inexplicably, it crashed. All is well at home, so I’m blaming work machine setup issues as-yet unknown (but I suspect, involving the letters “ATI”).
It got me thinking that, as much as I like NetBeans, it is still just a memory-eating, CPU-hogging, bloated Java-based GUI. For some time I’ve wanted to convert my favourite editor, Emacs, to something more like an IDE.
It's Emacs, but not as we know it
The WyeWorks Blog
to the rescue. Install emacs-23 and a couple of Ruby gems, clone their github repository
of Emacs plugins, copy to your ~/.emacs.d/ and voilà – marvel at your new, shiny editing environment. I also replaced my ~/.emacs with their init.el
The key plugins include ECB, textmate.el, Rinari and yasnippet, plus a bunch of modes for syntax highlighting. If you’ve only tried cursory Emacs customisation in the past the results are a little alarming at first, but you’ll be back to coding (and saying “Ooh! Aah!”) in no time at all.
November 6, 2009
Named rjson, appropriately. It’s quite basic just now, but contains methods for interconversion between R objects and JSON. Something like this:
data <- list(a=1,b=2,c=3)
json <- toJSON(data)
Use cases? I wonder if RApache could be used to build an API that serves R data in JSON format?
November 2, 2009
Recording my Ubuntu upgrade experience has become something of a tradition, so here goes.
- Machine 1 (laptop, LG T1 Express Duo). Largely trouble-free. On-board soundcard not seen on reboot. Fixed (temporarily, lost on reboot) using “sudo alsa force-reload”.
- Machine 2 (various generic hardware, cobbled together over many years). Upgrade smooth until final restart, when machine froze. Rebooted to a blank screen. Fixed by swapping out ATI video card for old NVidia FX5200. Discovered that rsyslog is running riot due to a hot CPU and is trying to fill up /var/log.
- Machine 3 (Dell Optiplex GX550). Install froze at “stopping winbind server”. Rebooted with rescue CD, mounted and chroot-ed into Linux partition, tried “dpkg –force-all –configure -a”, but to no avail. Reinstalled in same partition, all is working well.
All in all, not very impressed. Canonical, could do better.