Wednesday, November 10, 2010

OSX R.app Ruby

I want to use ruby, and later a rails application to work with the R statistical application. CRAN R.app home.


  1. sudo gem install simpler
  2. OSX Snow Leopard 10.6 already has ruby installed.
  3. OSX includes Preview.app for viewing pdf documents.
  4. Run an example.

$ irb
>> require 'simpler'
>> r = Simpler.new
>> x = [1,2,7]
>> y = [3,4,8]
>> r.pdf_viewer = "open /Applications/Preview.app"
>> r.show!(x,y) {|xr,yr| "plot(#{xr},#{yr})"}

resulting image shown in preview...


This code is from the info on github.
https://github.com/jtprince/simpler

No comments:

Post a Comment