To install R for the first time, or to replace an outdated version of R, download the appropriate version of R from its website.
If you are working on a Mac we would also recommend installing Rstudio, which can be downloaded from its website here.
Make sure that you have the most recent version of R. You can check your
R version by typing the command R.version into an R command
prompt. The current version of R is:
R.version
## _
## platform x86_64-w64-mingw32
## arch x86_64
## os mingw32
## system x86_64, mingw32
## status
## major 3
## minor 3.2
## year 2016
## month 10
## day 31
## svn rev 71607
## language R
## version.string R version 3.3.2 (2016-10-31)
## nickname Sincere Pumpkin Patch
To install packages, open a new session of R. No other sessions of R should be currently running.
Next, copy & paste the following commands to your R command prompt:
install.packages("ape",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("caper",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("diversitree",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("geiger",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("nlme",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("OUwie",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("phangorn",repos="https://cloud.r-project.org",quiet=TRUE)
install.packages("phytools",repos="https://cloud.r-project.org",quiet=TRUE)
The result should looks something like this:
install.packages("ape",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'ape' successfully unpacked and MD5 sums checked
install.packages("caper",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'caper' successfully unpacked and MD5 sums checked
install.packages("diversitree",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'diversitree' successfully unpacked and MD5 sums checked
install.packages("geiger",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'geiger' successfully unpacked and MD5 sums checked
install.packages("nlme",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'nlme' successfully unpacked and MD5 sums checked
install.packages("OUwie",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'OUwie' successfully unpacked and MD5 sums checked
install.packages("phangorn",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'phangorn' successfully unpacked and MD5 sums checked
install.packages("phytools",repos="https://cloud.r-project.org",quiet=TRUE)
## package 'phytools' successfully unpacked and MD5 sums checked
You can check package versions as follows:
packageVersion("ape")
## [1] '4.0'
packageVersion("caper")
## [1] '0.5.2'
packageVersion("diversitree")
## [1] '0.9.9'
packageVersion("geiger")
## [1] '2.0.6'
packageVersion("nlme")
## [1] '3.1.128'
packageVersion("OUwie")
## [1] '1.50'
packageVersion("phangorn")
## [1] '2.1.1'
packageVersion("phytools")
## [1] '0.5.64'
Your package versions should match (or be more recent - that is, have higher values) than the package versions listed above.
Written by Liam J. Revell. Last updated 6 December 2016.