If R is already installed on your computer, then ape has to be installed like any other package. Some functions in ape require three other packages: nlme, lattice, and gee. Only the last one will probably need to be installed since the others are included with most distributions of R.
If you have to install R, all required information can be found on the CRAN website. This is summarized here for the most common operating systems. There is also a section on how to update the packages.
Most Linux distributions offer a pre-compiled version of R on their sites. If so, then the easiest way is to install R like your other applications. You have to install "r-base" and "r-recommended" (which includes nlme and lattice).
If no pre-compiled R is available, then refer to the Unix section below.
Once R is installed, download the sources of ape from HERE, and run the following command as root:
R CMD INSTALL ape_3.0-2.tar.gz
If gee is not installed, you have to do the same procedure with this package by going to its page.
If you use R version 2.14.0 or above, I recommend to install ape with "byte-compile" for a substantial increase in performance:
R CMD INSTALL --byte-compile ape_3.0-2.tar.gz
Note: Fedora users should install the RPM R-devel.I386 (or the appropriate version depending on the processor, e.g., R-devel.x86_64) to be able to compile R packages from sources (thanks to Timothée Flutre for this info).Once R is installed, refer to the Linux section above for the installation of ape (and possibly gee).
R for Macintosh can be downloaded HERE. This is a file called R-2.15.0.pkg.
The GUI has a menu from where to install packages. In you want to install ape from the sources (e.g., the available version for Mac is not up-to-date), please read the instructions on the `R for Mac OS X FAQ', section 5.3:
http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages
Then type in R:install.packages("ape", type = "source")
R for Windows can be downloaded HERE. This is a file called R-2.15.0-win.exe. Launch this file to run the installer.
Once R is installed, start R by clicking the short-cut on the desktop. Choose the menu "Packages -> Install the package(s)...": a dialog box opens up to choose the mirror site where to download. A second box then opens up where you select the packages you want to install: select ape, this will also install gee automatically.
Since you may end with many R packages on your computer, it is highly recommended to update them regularly. Whatever your operating system is, you can simply type the following command in R:
update.packages()
(This can be done from a menu under Windows and MacOS.) This function checks the version of each package installed on your computer against the one available on CRAN: if the latter is more recent, R proposes you to update it (your machine must obviously be connected on the internet).
Last updated: April 20, 2012