Adding R support (via Rscript interface).

I haven't been able to test this yet since I don't have a mac, but here's a first attempt to provide some support for R.