19
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RubyからRを使う(Mountail Lion)

Posted at

###1. R_HOMEの設定
.bash_profileに以下を追加。

.bash_profile
export R_HOME=/Library/Frameworks/R.framework/Resources

###2. RSRubyをインストール

$ gem install rsruby -- --with-R-lib=/Library/Frameworks/R.framework/Libraries --with-R-include=/Library/Frameworks/R.framework/Headers

###3. 動くか試す

r_ruby.rb
require 'rsruby'
r = RSRuby::instance
puts r.sum(1,2,3)   #=> 6

##参照
rakkyooの備忘録 RubyでRの関数を使う(macOS X)
Mae向きな日記 RSRubyのインストール

19
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?