R のインストール
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
COLOR(red){SIZE(25){R のインストール}}
Windows, Mac, Linux(redhat, yellowdog, vine,...), Unix の...
----
#contents
----
*CRANにproxy環境で接続 [#bb94dda4]
R4.2.0で接続方法変わりました。アップデートしたら接続でき...
Windowsの例として
setx HTTPS_PROXY=http://USERNAME:PASSWORD@proxy.example.c...
のようにして環境変数に設定しておくとうまくいきました。
* Windows 版 R のインストール [#p7074c04]
最新版は[[こちら:https://ftp.yz.yamagata-u.ac.jp/pub/cran...
** Windows Vista での問題点 [#h4666b84]
Vistaにインストールして動かないと嘆いている方はここを読ん...
http://cran.r-project.org/bin/windows/rw-FAQ.html#Does-R-...
Vista (に限らず2000,XPでも同種の障害が生じ得ます) では、...
C:\Documents and Settings\<USERNAME>\My Documents
以下に本体をインストールしたり、ユーザのライブラリパスを...
素直に、Vistaの新しい既定のパスを使いましょう。
** 参考リンク [#v33ca538]
-[[Installing R packages without admin rights on MS Windo...
* Mac 版 R のインストール [#xb827720]
**[[Mac OSX:http://cran.ism.ac.jp/bin/macosx/]] [#f6085c...
最新版は[[こちら:https://ftp.yz.yamagata-u.ac.jp/pub/cran...
** 参考リンク [#kb583159]
http://aoki2.si.gunma-u.ac.jp/R/begin.html
** Fink 版 R のインストール [#f098cc2d]
Fink は、MacOSX用のパッケージ管理システムである。Fink を...
$ fink install r-base
とすることで、CLI 版 R がインストールできる。OSX 10.13~10...
- 対応している R のバージョンは、3.4 から 3.1。複数バージ...
- パッケージは、CRAN からも Fink からもインストールできる...
- QGIS からは qgis-plugin-manager をインストールすること...
- GUI としては、X11ベースのRコマンダーと RStudio (rstudio...
- Fink は日本人が多い。R のメンテナ(Fink のメンテナであ...
[http://pdb.finkproject.org/pdb/browse.php?summary=cran F...
** Mac Ports 版 R のインストール [#f098cc2d]
Mac Ports は、MacOSX用のパッケージ管理システムである。
Mac Portsでは3種類のRのPort (R, R-app, R-framework)が用意...
$ sudo port install R
とすることで、CLI 版 R がインストールできる。このシステム...
variantとよばれるオプションの指定が可能で、cranで配布され...
用意されているvariantsは下記の通り。
R has the variants:
accelerate: build using the BLAS and Lapack in Apple'...
* conflicts with atlas builtin_lapack
atlas: build using the BLAS in the atlas port
* conflicts with accelerate builtin_lapack
[+]builtin_lapack: build using reference BLAS and Lapack
* conflicts with accelerate atlas
[+]cairo: use cairo and pango
debug: build with debug symbols
dragonegg33: Build using the MacPorts dragonegg 3.3 c...
* conflicts with dragonegg34 g95 gcc44 gcc45 gcc46 ...
dragonegg34: Build using the MacPorts dragonegg 3.4 c...
* conflicts with dragonegg33 g95 gcc44 gcc45 gcc46 ...
g95: Build using the g95 Fortran compiler
* conflicts with dragonegg33 dragonegg34 gcc44 gcc4...
gcc44: Build using the MacPorts gcc 4.4 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc45 ...
gcc45: Build using the MacPorts gcc 4.5 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc46: Build using the MacPorts gcc 4.6 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc47: Build using the MacPorts gcc 4.7 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc48: Build using the MacPorts gcc 4.8 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc49: Build using the MacPorts gcc 4.9 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc5: Build using the MacPorts gcc 5 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
[+]gcc6: Build using the MacPorts gcc 6 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc7: Build using the MacPorts gcc 7 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
[+]recommended: install recommended R packages
tcltk: enable use of tcltk
* requires x11
tests: include tests of R installation
[+] x11: enable use of x11
なお、R-appとR-frameworkにはvariantsはない。
Mac PortsはRのバージョンアップに追従してくれるので、Mac P...
※Mac Portsのバージョンが古いとインストールに失敗する場合...
以下のコマンドでMac Portsを最新化しておく。
$ sudo port selfupdate
** バイナリの提供されていないないパッケージ [#ga3d6e58]
MacOSXではデフォルトでバイナリのパッケージをインストール...
rgdalを例にとって説明する。
+ CRANからrgdalのソースファイル(例えば、rgdal_0.6-28.tar...
+ rgdalが依存するライブラリ(gdalとproj)をあらかじめイン...
-- MacPortsを使っている場合、次のようにしてインストールする
$ sudo port install gdal proj
+ とりあえずインストールを試みる。ソースファイルがあるデ...
$ sudo R CMD INSTALL rgdal_0.6-28.tar.gz
* installing to library ‘/Library/Frameworks/R.framework...
* installing *source* package ‘rgdal’ ...
gdal-config: gdal-config
[中略]
checking for proj_api.h... yes
checking for pj_init_plus in -lproj... no
Error: libproj.a not found.
[後略]
インストールに失敗した
+ エラーからprojライブラリのインストール先が見つからない...
-- MacPortsの場合、インストール先は次のようにして確認できる
$ port contents proj
Port proj contains:
/opt/local/bin/cs2cs
/opt/local/bin/geod
[中略]
/opt/local/include/nad_list.h
/opt/local/include/org_proj4_Projections.h
/opt/local/include/proj_api.h
/opt/local/include/projects.h
/opt/local/lib/libproj.0.6.6.dylib
[後略]
projライブラリのインストール先は/opt/local/libであること...
+ rgdalのtar.gzを展開し、./configure --helpを実行してオプ...
$ ./configure --help
[中略]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --...
--with-gdal-config=GDAL_CONFIG
the location of gdal-config
--with-proj-include=INCLUDE_PATH
the location of proj header fi...
--with-proj-lib=LIB_PATH
the location of proj libraries
projライブラリのインストール先を指定するには、には--with-...
+ Rのインストールの時にどうすればconfigureのオプションを...
$ R CMD INSTALL --help
Usage: R CMD INSTALL [options] pkgs
[中略]
for Unix
--configure-args=ARGS
set arguments for the configure s...
--configure-vars=VARS
set variables for the configure s...
--libs-only only install the libs directory
--no-multiarch build only the main architecture
[後略]
ヘルプによると--configure-args=で指定すればよいと書いてあ...
+ オプションをつけて再度インストール
$ sudo R CMD INSTALL rgdal_0.6-28.tar.gz --configure-arg...
* installing to library ‘/Library/Frameworks/R.framework...
* installing *source* package ‘rgdal’ ...
gdal-config: gdal-config
checking for gcc... gcc -arch x86_64 -std=gnu99
[中略]
* DONE (rgdal)
無事にインストールできた
* Linux 版 R のインストール [#if8c08b4]
** Debian GNU/Linux (含む Knoppix)の場合 (インターネット...
(ADSL 等の比較的高速なインターネット接続可能状態にあるこ...
- root になる
- エディタで /etc/apt/source.list に次の行を付け加える(最...
deb ftp://ftp.jp.debian.org/debian-jp stable-jp main co...
deb ftp://ftp.jp.debian.org/debian-jp testing-jp main c...
deb ftp://ftp.jp.debian.org/debian-jp unstable-jp main ...
- Debian パッケージリスト更新命令を実行
apt-get update
- 次の命令を実行。自動的に関連基本パッケージ(数値ライブラ...
apt-get install r-base
- 関連パッケージは同様にインストール。例えば
apt-get install r-cran-hmisc
- バージョンアップは同様の手順でできる。古いものを削除す...
- Knoppix(-jp) の場合基本メニューにある Debian パッケージ...
- ちなみに現時点での Debian.org にある R 関連のパッケージ...
|r-base | r-cran-coda | r-cran-lmtest| ...
|r-cran-vr| r-noncran-lindsey|r-base-core | ...
| r-cran-mapdata| r-cran-rmysql | r-cran-xml ...
|r-base-dev | r-cran-design | r-cran-mapproj |...
|r-doc-html | r-omegahat-ggobi |r-base-html | ...
| r-cran-maps | r-cran-rpart | r-doc-info| ...
|r-base-latex | r-cran-foreign | r-cran-mcmcpack ...
| r-doc-pdf | r-pdl|r-cran-abind | r-cran-...
| r-cran-mgcv | r-cran-statdataml| r-gnome | ...
|r-cran-boot | r-cran-hmisc | r-cran-mysql | ...
| r-mathlib | r-xml |r-cran-car| r-cra...
| r-cran-nlme | r-cran-tkrplot| r-noncran-desi...
| r-cran-lattice | r-cran-qtl | r-cran-tser...
** openSUSE10.2 Linux 版インストール [#xb9b1224]
-YaST2を立ち上げインストールソースの変更を行う。
-追加ボタンでhttpを選択。サーバー名に
software.opensuse.org/download/science/openSUSE_10.2/を入力
-改めてソフトウエア管理からインストールする。
-たぶん他のバージョンやyumを用いて/etc/yum.repos.dの変更...
やってませんが。
-CRANミラーでのSuSE用r-baseのアップが遅いのですが、こちら...
-suse10.3の場合、リポジトリをsoftware.opensuse.org/downlo...
** Ubuntu Linux の場合: [#pbac840c]
Ubuntu Linux 版のRのインストールと関連パッケージのインス...
(1) /etc/apt/sources.list ファイルをルート権限で編集
(ルートパスワードの入力が求められます)
ここでは既定のエディター gedit を使います。
$ sudo gedit /etc/apt/sources.list
(2) 使用中の Ubuntu のバージョンに応じてつぎのような一...
(統計数理研究所のミラーを使う)
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu hardy/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu gutsy/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu feisty/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu dapper/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu natty/
(3) Ubuntu レポジトリの公開鍵を入手
$ gpg --keyserver subkeys.pgp.net --recv-key E2A11821
$ gpg -a --export E2A11821 | sudo apt-key add -
(http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu/READMEに...
$ gpg --keyserver keyserver.ubuntu.com --recv-key E084D...
$ gpg -a --export E084DAB9 | sudo apt-key add -
(4) R 本体と Ubuntu に用意されているパッケージのインスト...
(システムにインストールするためやはりルート権限で実行)
(r-base-dev をインストールするとCやFortranがインスト...
$ sudo apt-get update
$ sudo apt-get install r-base
$ sudo apt-get install r-base-dev
$ sudo apt-get install r-cran-*
(5) Ubuntu に用意されていないパッケージ xxx はCRANからxx...
ダウンロードし以下の命令を端末で実行
$ sudo R CMD INSTALL xxx.tar.gz
UBUNTU PACKAGES FOR R
R packages for Ubuntu on i386 and amd64 are available fo...
releases of Ubuntu until their official end of life date...
these are Hardy Heron (8.04), Gutsy Gibbon (7.10), Feist...
Drake (6.06). See https://wiki.ubuntu.com/Releases for d...
INSTALLATION
To obtain the latest R packages, add an entry like
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
in your /etc/apt/sources.list file. See http://cran.r-pr...
for the list of CRAN mirrors. To install the complete R ...
sudo apt-get update
sudo apt-get install r-base
Users who need to compile packages should also install t...
sudo apt-get install r-base-dev
The R packages for Ubuntu should otherwise behave like t...
information, see the README file in http://cran.R-projec...
SUPPORTED PACKAGES
A number of R packages are available from the Ubuntu rep...
starting with r-cran-. Note, however, that only the pack...
r-recommended bundle are kept up-to-date on CRAN. Curren...
r-cran-boot
r-cran-cluster
r-cran-codetools
r-cran-foreign
r-cran-kernsmooth
r-cran-lattice
r-cran-mgcv
r-cran-nlme
r-cran-rpart
r-cran-survival
r-cran-vr
The other r-cran-* packages are updated with Ubuntu rele...
Because they rely on the installed version of R, we also...
experimental basis, up-to-date versions of the following...
littler
rkward
python-rpy (not on Dapper)
python-rpy-doc (not on Dapper)
Please notice that the maintainers are not necessarily u...
themselves, so positive and negative feedback through th...
below) would be appreciated.
SECURE APT
The Ubuntu archives on CRAN are signed with the key of "...
<vincent.goulet@act.ulaval.ca>" with key ID E2A11821. Yo...
with
gpg --keyserver subkeys.pgp.net --recv-key E2A11821
and then feed it to apt-key with
gpg -a --export E2A11821 | sudo apt-key add -
Some people have reported difficulties using this approa...
related to a firewall blocking port 11371. An alternativ...
for the key at http://keyserver.noreply.org/ and copy th...
file, say key.txt. Then, feed the key to apt-key with
sudo apt-key add key.txt
ADMINISTRATION AND MAINTENANCE OF R PACKAGES
The R packages part of the Ubuntu r-base and r-recommend...
into the directory /usr/lib/R/library. These can be upda...
sudo apt-get update
sudo apt-get upgrade
The other r-cran-* packages shipped with Ubuntu are inst...
/usr/lib/R/site-library.
Installing R packages not provided with Ubuntu first req...
the packages from source. These tools are installed via ...
with
sudo apt-get install r-base-dev
Then a site administrator can install R packages into th...
/usr/local/lib/R/site-library by running R as root and u...
> install.packages()
function. A routine update can then be undertaken from R...
> update.packages(lib.loc = "/usr/local/lib/R/site-li...
Individual users can install R packages into their home ...
procedure is to create a file ~/.Renviron containing, e....
R_LIBS="~/lib/R/library:${R_LIBS}"
The install.packages() and update.packages() functions w...
~/lib/R/library.
* Unix 版 R のインストール [#h726f629]
** ソースからのコンパイル法 (含む Linux) [#gea6368d]
[[山本HP:http://stat.sm.u-tokai.ac.jp/~yama/R/install.htm...
快適なダウンロードがお望みなら[[CRAN国内ミラーの使い方]]...
R-2.2.0 では,特に何にもしないで,
./configure
make
make install
で無事 make できるようになった
*REvolutionR(IntelMKL版R:マルチコア対応:Windows,MacOSX)...
本家とは別にビルドされたマルチコア対応版R。比較的高速。~
Windows版、MacOSX版あり。~
[[REvolutionRは連邦の新型か]]参照
*Microsoft R Open [#ofbba321]
最新版は[[こちら:https://mran.microsoft.com/open]]からダ...
*Linuxでソースからのビルド(VineLinuxを例として) [#e326b...
Linux の中には実行ファイルが用意されていないものがありま...
当方,VineLinux 4.2 を使っており,以下の手順でソースから...
- ルート権限になった後,下記サイトから R-2.8.1.tar.gz を...
[[http://cran.md.tsukuba.ac.jp/src/base/R-2/R-2.8.1.tar.g...
-「R HOME」というディレクトリを作成した後,ここで R-2.8.1...
-Linux 環境によっては「f77(g77で代替化)」「readline(も...
$ apt-get update
$ apt-get install gcc-g77
$ apt-get install readline
$ apt-get install readline4
$ apt-get install gcc
$ apt-get install gcc-c++
- kterm 上で「R HOME」に移動し、下記コマンドを実行する。
$ ./configure
$ make
$ make install
- 「./configure」実行時に以下のエラーが出る場合がある.
configure: error: --with-readline=yes (default) and head...
configure: error: --with-x=yes (default) and X11 headers...
その場合は,「./configure」にオプションを付けると無理やり...
./configure --with-readline=no --with-x=no
あまり望ましくないので、エラーが出た場合はconfig.logの中...
(足らないライブラリとしてはXOrg-devel libpng-devel pcre-...
apt-cache search XXX 等を実行して、足らないパッケージを探...
ちなみに、XOrg-develとreadline-develが足りなかった場合は...
$ apt-get install XOrg-devel
$ apt-get install readline-devel
* パッケージのインストール [#s57cd20b]
** ネットにつながった、自分が管理するコンピューターに、CR...
1. install.packages("パッケージ名") で簡単にインストール...
2. インストールしおえたら library(パッケージ名) でロード...
** 上記以外で、圧縮パッケージだけは入手できた場合 [#db181...
1. まず .libPaths()
でパッケージを入れるべきlibraryフォルダを確認。そこにパッ...
2. library() コマンドでインストールはできたことを確認...
3. library(パッケージ名) でロード(読み込み)する。エ...
(注:ロードはRを起動するたびに行わないといけない。そのパ...
* 興味のある分野のパッケージを丸ごとインストールする [#k5...
[[CRAN Task View]]
終了行:
COLOR(red){SIZE(25){R のインストール}}
Windows, Mac, Linux(redhat, yellowdog, vine,...), Unix の...
----
#contents
----
*CRANにproxy環境で接続 [#bb94dda4]
R4.2.0で接続方法変わりました。アップデートしたら接続でき...
Windowsの例として
setx HTTPS_PROXY=http://USERNAME:PASSWORD@proxy.example.c...
のようにして環境変数に設定しておくとうまくいきました。
* Windows 版 R のインストール [#p7074c04]
最新版は[[こちら:https://ftp.yz.yamagata-u.ac.jp/pub/cran...
** Windows Vista での問題点 [#h4666b84]
Vistaにインストールして動かないと嘆いている方はここを読ん...
http://cran.r-project.org/bin/windows/rw-FAQ.html#Does-R-...
Vista (に限らず2000,XPでも同種の障害が生じ得ます) では、...
C:\Documents and Settings\<USERNAME>\My Documents
以下に本体をインストールしたり、ユーザのライブラリパスを...
素直に、Vistaの新しい既定のパスを使いましょう。
** 参考リンク [#v33ca538]
-[[Installing R packages without admin rights on MS Windo...
* Mac 版 R のインストール [#xb827720]
**[[Mac OSX:http://cran.ism.ac.jp/bin/macosx/]] [#f6085c...
最新版は[[こちら:https://ftp.yz.yamagata-u.ac.jp/pub/cran...
** 参考リンク [#kb583159]
http://aoki2.si.gunma-u.ac.jp/R/begin.html
** Fink 版 R のインストール [#f098cc2d]
Fink は、MacOSX用のパッケージ管理システムである。Fink を...
$ fink install r-base
とすることで、CLI 版 R がインストールできる。OSX 10.13~10...
- 対応している R のバージョンは、3.4 から 3.1。複数バージ...
- パッケージは、CRAN からも Fink からもインストールできる...
- QGIS からは qgis-plugin-manager をインストールすること...
- GUI としては、X11ベースのRコマンダーと RStudio (rstudio...
- Fink は日本人が多い。R のメンテナ(Fink のメンテナであ...
[http://pdb.finkproject.org/pdb/browse.php?summary=cran F...
** Mac Ports 版 R のインストール [#f098cc2d]
Mac Ports は、MacOSX用のパッケージ管理システムである。
Mac Portsでは3種類のRのPort (R, R-app, R-framework)が用意...
$ sudo port install R
とすることで、CLI 版 R がインストールできる。このシステム...
variantとよばれるオプションの指定が可能で、cranで配布され...
用意されているvariantsは下記の通り。
R has the variants:
accelerate: build using the BLAS and Lapack in Apple'...
* conflicts with atlas builtin_lapack
atlas: build using the BLAS in the atlas port
* conflicts with accelerate builtin_lapack
[+]builtin_lapack: build using reference BLAS and Lapack
* conflicts with accelerate atlas
[+]cairo: use cairo and pango
debug: build with debug symbols
dragonegg33: Build using the MacPorts dragonegg 3.3 c...
* conflicts with dragonegg34 g95 gcc44 gcc45 gcc46 ...
dragonegg34: Build using the MacPorts dragonegg 3.4 c...
* conflicts with dragonegg33 g95 gcc44 gcc45 gcc46 ...
g95: Build using the g95 Fortran compiler
* conflicts with dragonegg33 dragonegg34 gcc44 gcc4...
gcc44: Build using the MacPorts gcc 4.4 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc45 ...
gcc45: Build using the MacPorts gcc 4.5 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc46: Build using the MacPorts gcc 4.6 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc47: Build using the MacPorts gcc 4.7 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc48: Build using the MacPorts gcc 4.8 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc49: Build using the MacPorts gcc 4.9 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc5: Build using the MacPorts gcc 5 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
[+]gcc6: Build using the MacPorts gcc 6 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
gcc7: Build using the MacPorts gcc 7 compiler
* conflicts with dragonegg33 dragonegg34 g95 gcc44 ...
[+]recommended: install recommended R packages
tcltk: enable use of tcltk
* requires x11
tests: include tests of R installation
[+] x11: enable use of x11
なお、R-appとR-frameworkにはvariantsはない。
Mac PortsはRのバージョンアップに追従してくれるので、Mac P...
※Mac Portsのバージョンが古いとインストールに失敗する場合...
以下のコマンドでMac Portsを最新化しておく。
$ sudo port selfupdate
** バイナリの提供されていないないパッケージ [#ga3d6e58]
MacOSXではデフォルトでバイナリのパッケージをインストール...
rgdalを例にとって説明する。
+ CRANからrgdalのソースファイル(例えば、rgdal_0.6-28.tar...
+ rgdalが依存するライブラリ(gdalとproj)をあらかじめイン...
-- MacPortsを使っている場合、次のようにしてインストールする
$ sudo port install gdal proj
+ とりあえずインストールを試みる。ソースファイルがあるデ...
$ sudo R CMD INSTALL rgdal_0.6-28.tar.gz
* installing to library ‘/Library/Frameworks/R.framework...
* installing *source* package ‘rgdal’ ...
gdal-config: gdal-config
[中略]
checking for proj_api.h... yes
checking for pj_init_plus in -lproj... no
Error: libproj.a not found.
[後略]
インストールに失敗した
+ エラーからprojライブラリのインストール先が見つからない...
-- MacPortsの場合、インストール先は次のようにして確認できる
$ port contents proj
Port proj contains:
/opt/local/bin/cs2cs
/opt/local/bin/geod
[中略]
/opt/local/include/nad_list.h
/opt/local/include/org_proj4_Projections.h
/opt/local/include/proj_api.h
/opt/local/include/projects.h
/opt/local/lib/libproj.0.6.6.dylib
[後略]
projライブラリのインストール先は/opt/local/libであること...
+ rgdalのtar.gzを展開し、./configure --helpを実行してオプ...
$ ./configure --help
[中略]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --...
--with-gdal-config=GDAL_CONFIG
the location of gdal-config
--with-proj-include=INCLUDE_PATH
the location of proj header fi...
--with-proj-lib=LIB_PATH
the location of proj libraries
projライブラリのインストール先を指定するには、には--with-...
+ Rのインストールの時にどうすればconfigureのオプションを...
$ R CMD INSTALL --help
Usage: R CMD INSTALL [options] pkgs
[中略]
for Unix
--configure-args=ARGS
set arguments for the configure s...
--configure-vars=VARS
set variables for the configure s...
--libs-only only install the libs directory
--no-multiarch build only the main architecture
[後略]
ヘルプによると--configure-args=で指定すればよいと書いてあ...
+ オプションをつけて再度インストール
$ sudo R CMD INSTALL rgdal_0.6-28.tar.gz --configure-arg...
* installing to library ‘/Library/Frameworks/R.framework...
* installing *source* package ‘rgdal’ ...
gdal-config: gdal-config
checking for gcc... gcc -arch x86_64 -std=gnu99
[中略]
* DONE (rgdal)
無事にインストールできた
* Linux 版 R のインストール [#if8c08b4]
** Debian GNU/Linux (含む Knoppix)の場合 (インターネット...
(ADSL 等の比較的高速なインターネット接続可能状態にあるこ...
- root になる
- エディタで /etc/apt/source.list に次の行を付け加える(最...
deb ftp://ftp.jp.debian.org/debian-jp stable-jp main co...
deb ftp://ftp.jp.debian.org/debian-jp testing-jp main c...
deb ftp://ftp.jp.debian.org/debian-jp unstable-jp main ...
- Debian パッケージリスト更新命令を実行
apt-get update
- 次の命令を実行。自動的に関連基本パッケージ(数値ライブラ...
apt-get install r-base
- 関連パッケージは同様にインストール。例えば
apt-get install r-cran-hmisc
- バージョンアップは同様の手順でできる。古いものを削除す...
- Knoppix(-jp) の場合基本メニューにある Debian パッケージ...
- ちなみに現時点での Debian.org にある R 関連のパッケージ...
|r-base | r-cran-coda | r-cran-lmtest| ...
|r-cran-vr| r-noncran-lindsey|r-base-core | ...
| r-cran-mapdata| r-cran-rmysql | r-cran-xml ...
|r-base-dev | r-cran-design | r-cran-mapproj |...
|r-doc-html | r-omegahat-ggobi |r-base-html | ...
| r-cran-maps | r-cran-rpart | r-doc-info| ...
|r-base-latex | r-cran-foreign | r-cran-mcmcpack ...
| r-doc-pdf | r-pdl|r-cran-abind | r-cran-...
| r-cran-mgcv | r-cran-statdataml| r-gnome | ...
|r-cran-boot | r-cran-hmisc | r-cran-mysql | ...
| r-mathlib | r-xml |r-cran-car| r-cra...
| r-cran-nlme | r-cran-tkrplot| r-noncran-desi...
| r-cran-lattice | r-cran-qtl | r-cran-tser...
** openSUSE10.2 Linux 版インストール [#xb9b1224]
-YaST2を立ち上げインストールソースの変更を行う。
-追加ボタンでhttpを選択。サーバー名に
software.opensuse.org/download/science/openSUSE_10.2/を入力
-改めてソフトウエア管理からインストールする。
-たぶん他のバージョンやyumを用いて/etc/yum.repos.dの変更...
やってませんが。
-CRANミラーでのSuSE用r-baseのアップが遅いのですが、こちら...
-suse10.3の場合、リポジトリをsoftware.opensuse.org/downlo...
** Ubuntu Linux の場合: [#pbac840c]
Ubuntu Linux 版のRのインストールと関連パッケージのインス...
(1) /etc/apt/sources.list ファイルをルート権限で編集
(ルートパスワードの入力が求められます)
ここでは既定のエディター gedit を使います。
$ sudo gedit /etc/apt/sources.list
(2) 使用中の Ubuntu のバージョンに応じてつぎのような一...
(統計数理研究所のミラーを使う)
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu hardy/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu gutsy/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu feisty/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu dapper/
deb http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu natty/
(3) Ubuntu レポジトリの公開鍵を入手
$ gpg --keyserver subkeys.pgp.net --recv-key E2A11821
$ gpg -a --export E2A11821 | sudo apt-key add -
(http://cran.md.tsukuba.ac.jp/bin/linux/ubuntu/READMEに...
$ gpg --keyserver keyserver.ubuntu.com --recv-key E084D...
$ gpg -a --export E084DAB9 | sudo apt-key add -
(4) R 本体と Ubuntu に用意されているパッケージのインスト...
(システムにインストールするためやはりルート権限で実行)
(r-base-dev をインストールするとCやFortranがインスト...
$ sudo apt-get update
$ sudo apt-get install r-base
$ sudo apt-get install r-base-dev
$ sudo apt-get install r-cran-*
(5) Ubuntu に用意されていないパッケージ xxx はCRANからxx...
ダウンロードし以下の命令を端末で実行
$ sudo R CMD INSTALL xxx.tar.gz
UBUNTU PACKAGES FOR R
R packages for Ubuntu on i386 and amd64 are available fo...
releases of Ubuntu until their official end of life date...
these are Hardy Heron (8.04), Gutsy Gibbon (7.10), Feist...
Drake (6.06). See https://wiki.ubuntu.com/Releases for d...
INSTALLATION
To obtain the latest R packages, add an entry like
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu...
in your /etc/apt/sources.list file. See http://cran.r-pr...
for the list of CRAN mirrors. To install the complete R ...
sudo apt-get update
sudo apt-get install r-base
Users who need to compile packages should also install t...
sudo apt-get install r-base-dev
The R packages for Ubuntu should otherwise behave like t...
information, see the README file in http://cran.R-projec...
SUPPORTED PACKAGES
A number of R packages are available from the Ubuntu rep...
starting with r-cran-. Note, however, that only the pack...
r-recommended bundle are kept up-to-date on CRAN. Curren...
r-cran-boot
r-cran-cluster
r-cran-codetools
r-cran-foreign
r-cran-kernsmooth
r-cran-lattice
r-cran-mgcv
r-cran-nlme
r-cran-rpart
r-cran-survival
r-cran-vr
The other r-cran-* packages are updated with Ubuntu rele...
Because they rely on the installed version of R, we also...
experimental basis, up-to-date versions of the following...
littler
rkward
python-rpy (not on Dapper)
python-rpy-doc (not on Dapper)
Please notice that the maintainers are not necessarily u...
themselves, so positive and negative feedback through th...
below) would be appreciated.
SECURE APT
The Ubuntu archives on CRAN are signed with the key of "...
<vincent.goulet@act.ulaval.ca>" with key ID E2A11821. Yo...
with
gpg --keyserver subkeys.pgp.net --recv-key E2A11821
and then feed it to apt-key with
gpg -a --export E2A11821 | sudo apt-key add -
Some people have reported difficulties using this approa...
related to a firewall blocking port 11371. An alternativ...
for the key at http://keyserver.noreply.org/ and copy th...
file, say key.txt. Then, feed the key to apt-key with
sudo apt-key add key.txt
ADMINISTRATION AND MAINTENANCE OF R PACKAGES
The R packages part of the Ubuntu r-base and r-recommend...
into the directory /usr/lib/R/library. These can be upda...
sudo apt-get update
sudo apt-get upgrade
The other r-cran-* packages shipped with Ubuntu are inst...
/usr/lib/R/site-library.
Installing R packages not provided with Ubuntu first req...
the packages from source. These tools are installed via ...
with
sudo apt-get install r-base-dev
Then a site administrator can install R packages into th...
/usr/local/lib/R/site-library by running R as root and u...
> install.packages()
function. A routine update can then be undertaken from R...
> update.packages(lib.loc = "/usr/local/lib/R/site-li...
Individual users can install R packages into their home ...
procedure is to create a file ~/.Renviron containing, e....
R_LIBS="~/lib/R/library:${R_LIBS}"
The install.packages() and update.packages() functions w...
~/lib/R/library.
* Unix 版 R のインストール [#h726f629]
** ソースからのコンパイル法 (含む Linux) [#gea6368d]
[[山本HP:http://stat.sm.u-tokai.ac.jp/~yama/R/install.htm...
快適なダウンロードがお望みなら[[CRAN国内ミラーの使い方]]...
R-2.2.0 では,特に何にもしないで,
./configure
make
make install
で無事 make できるようになった
*REvolutionR(IntelMKL版R:マルチコア対応:Windows,MacOSX)...
本家とは別にビルドされたマルチコア対応版R。比較的高速。~
Windows版、MacOSX版あり。~
[[REvolutionRは連邦の新型か]]参照
*Microsoft R Open [#ofbba321]
最新版は[[こちら:https://mran.microsoft.com/open]]からダ...
*Linuxでソースからのビルド(VineLinuxを例として) [#e326b...
Linux の中には実行ファイルが用意されていないものがありま...
当方,VineLinux 4.2 を使っており,以下の手順でソースから...
- ルート権限になった後,下記サイトから R-2.8.1.tar.gz を...
[[http://cran.md.tsukuba.ac.jp/src/base/R-2/R-2.8.1.tar.g...
-「R HOME」というディレクトリを作成した後,ここで R-2.8.1...
-Linux 環境によっては「f77(g77で代替化)」「readline(も...
$ apt-get update
$ apt-get install gcc-g77
$ apt-get install readline
$ apt-get install readline4
$ apt-get install gcc
$ apt-get install gcc-c++
- kterm 上で「R HOME」に移動し、下記コマンドを実行する。
$ ./configure
$ make
$ make install
- 「./configure」実行時に以下のエラーが出る場合がある.
configure: error: --with-readline=yes (default) and head...
configure: error: --with-x=yes (default) and X11 headers...
その場合は,「./configure」にオプションを付けると無理やり...
./configure --with-readline=no --with-x=no
あまり望ましくないので、エラーが出た場合はconfig.logの中...
(足らないライブラリとしてはXOrg-devel libpng-devel pcre-...
apt-cache search XXX 等を実行して、足らないパッケージを探...
ちなみに、XOrg-develとreadline-develが足りなかった場合は...
$ apt-get install XOrg-devel
$ apt-get install readline-devel
* パッケージのインストール [#s57cd20b]
** ネットにつながった、自分が管理するコンピューターに、CR...
1. install.packages("パッケージ名") で簡単にインストール...
2. インストールしおえたら library(パッケージ名) でロード...
** 上記以外で、圧縮パッケージだけは入手できた場合 [#db181...
1. まず .libPaths()
でパッケージを入れるべきlibraryフォルダを確認。そこにパッ...
2. library() コマンドでインストールはできたことを確認...
3. library(パッケージ名) でロード(読み込み)する。エ...
(注:ロードはRを起動するたびに行わないといけない。そのパ...
* 興味のある分野のパッケージを丸ごとインストールする [#k5...
[[CRAN Task View]]
ページ名: