LoginSignup
3
2

More than 5 years have passed since last update.

RHmmをインストールする

Last updated at Posted at 2015-06-02

もうCRANからは手に入らないっぽい

というわけでアーカイブから最新版をダウンロードして、それをインストールしましょう。
ちなみに、僕はMacのOSX10, Yosemiteで作業しています。

2013年4月が最終版になっているようですね。
ダウンロードしたら、Rを開いて、

install.packages("ダウンロードしたtar.gzファイルのパス", repos = NULL, type = "source")

これでRHmmを使えます。

ちなみに、僕は下記のエラーが出ました

ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lquadmath
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RHmm.so] Error 1
ERROR: compilation failed for package ‘RHmm’

下記のサイトを参考にして解決しました。
gfortranのバージョンが古いとかなんとからしいです

以下の2行をターミナルで実行すればOK

curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /

あと、library(RHmm)で使おうと思ったらMASSとnlme`が入っていないよと怒られたので、これら2つのライブラリも追加してやりました

install.packages('MASS')
install.packages('nlme')
3
2
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
3
2