Difference between revisions of "Installing R"
m |
(Only need to change ''Resources'') |
||
| Line 28: | Line 28: | ||
drwxrwxr-x 9 root admin 306 Jul 27 16:44 Versions | drwxrwxr-x 9 root admin 306 Jul 27 16:44 Versions | ||
</table> | </table> | ||
| + | |||
| + | The symbolic link for ''R'' points (''R -> Versions/Current/R'') to the current release, version which is located at ''/Library/Frameworks/R.framework/Versions/Current''. | ||
The symbolic link ''Resources'' (''R -> Versions/Current/R'') points to the version release directory structure including the currently | The symbolic link ''Resources'' (''R -> Versions/Current/R'') points to the version release directory structure including the currently | ||
| Line 45: | Line 47: | ||
</table> | </table> | ||
| − | + | If you want to change the pointer to the version of ''R'' that you wish to run, all that is required is to change the ''Resources'' pointer, e.g. | |
| − | |||
<table class=document-code><tr><td> | <table class=document-code><tr><td> | ||
sudo -s | sudo -s | ||
[enter password] | [enter password] | ||
| − | |||
rm -f /Library/Frameworks/R.framework/Resources | rm -f /Library/Frameworks/R.framework/Resources | ||
cd /Library/Frameworks/R.framework/ | cd /Library/Frameworks/R.framework/ | ||
| − | |||
ln -s Versions/2.2/Resources Resources | ln -s Versions/2.2/Resources Resources | ||
</table> | </table> | ||
| Line 60: | Line 59: | ||
To point to the current release again; | To point to the current release again; | ||
<table class=document-code><tr><td> | <table class=document-code><tr><td> | ||
| − | |||
rm -f /Library/Frameworks/R.framework/Resources | rm -f /Library/Frameworks/R.framework/Resources | ||
cd /Library/Frameworks/R.framework/ | cd /Library/Frameworks/R.framework/ | ||
| − | |||
ln -s Versions/Current/Resources Resources | ln -s Versions/Current/Resources Resources | ||
</table> | </table> | ||
Revision as of 22:11, 27 July 2006
R programming language
R is a powerful statistical programming language, an implementation of the S programming language, with semantics derived from Scheme (see R programming language for details).
R on OS X
Install the R dmg format from a local CRAN mirror, e.g. Auckland statistics mirror.
Installation details
On OS X, R installs in the path;
/Library/Frameworks/R.framework /Library/Receipts/ # (R-*.pkg receipts) |
The directory structure is;
# ls -la /Library/Frameworks/R.framework/ drwxrwxr-x 8 root admin 272 Jul 27 16:44 . drwxrwxr-x 6 root admin 204 Aug 23 2005 .. -rw-rw-r-- 1 root admin 6148 Aug 23 2005 .DS_Store lrwxr-xr-x 1 root admin 24 Jul 27 16:44 Headers -> Versions/Current/Headers lrwxr-xr-x 1 root admin 31 Jul 27 16:44 PrivateHeaders -> Versions/Current/PrivateHeaders lrwxr-xr-x 1 root admin 18 Jul 27 16:44 R -> Versions/Current/R lrwxr-xr-x 1 root admin 26 Jul 27 16:44 Resources -> Versions/Current/Resources drwxrwxr-x 9 root admin 306 Jul 27 16:44 Versions |
The symbolic link for R points (R -> Versions/Current/R) to the current release, version which is located at /Library/Frameworks/R.framework/Versions/Current.
The symbolic link Resources (R -> Versions/Current/R) points to the version release directory structure including the currently installed packages in the library subdirectory. You can identify all installed versions in the Versions subdirectory;
#ls -la /Library/Frameworks/R.framework/Versions/ drwxrwxr-x 9 root admin 306 Jul 27 16:44 . drwxrwxr-x 8 root admin 272 Jul 27 16:44 .. -rw-rw-r-- 1 root admin 6148 Oct 17 2005 .DS_Store lrwxr-xr-x 1 root admin 5 Aug 16 2005 2.1 -> 2.1.1 lrwxr-xr-x 1 root admin 5 Aug 16 2005 2.1.0 -> 2.1.1 drwxrwxr-x 4 root admin 136 Dec 14 2005 2.1.1 drwxrwxr-x 4 root admin 136 Jul 27 16:44 2.2 drwxrwxr-x 6 root admin 204 Jul 27 16:44 2.3 lrwxr-xr-x 1 root admin 3 Jul 27 16:44 Current -> 2.3 |
If you want to change the pointer to the version of R that you wish to run, all that is required is to change the Resources pointer, e.g.
sudo -s [enter password] rm -f /Library/Frameworks/R.framework/Resources cd /Library/Frameworks/R.framework/ ln -s Versions/2.2/Resources Resources |
To point to the current release again;
rm -f /Library/Frameworks/R.framework/Resources cd /Library/Frameworks/R.framework/ ln -s Versions/Current/Resources Resources |



