This tutorial is part of a series designed to accompany a course using The Analysis of Biological Data. The rest of the tutorials can be found here.



For these tutorials, you will need two programs on your computer, R and RStudio. Both of these are free programs, available to download without charge from the web.


Loading R on your computer

A list of sites where R can be downloaded is maintained at https://cran.r-project.org/mirrors.html —choose the site geographically nearest you. For Vancouver, for the best choice is here. From the top box, click on the link that matches your type of computer.

Macs – If you have a Mac, you will likely first need to install XQuartz from https://www.xquartz.org. After it downloads, click on the .dmg file that appears in your downloads folder, and then form the folder that opens, click on the XQuartz.pkg file. Follow the installation instructions in the new window that opens.

To load R, choose the MacOS link from the CRAN website above. From the resulting page (called “R for Mac OS X”) choose the .pkg file that matches your version of the operating system – usually this is the first one. Download that package, click on the .pkg file once it has downloaded fully, and follow instructions on the screen.

Windows – After choosing Windows from the CRAN page, click on the first link for labeled “base”. Then click on the large top link “Download R 3.X.X for Windows”. Run the .exe file that downloads.


Loading RStudio onto your computer

Go to the download page for RStudio and choose the “DOWNLOAD” button under the left column for RStudio Desktop FREE. Then from the list of Installers, choose one that matches your operating system.

Mac – Open the .dmg file that downloads, and in the resulting window slide the RStudio icon into the Applications icon.

Windows – Run the .exe installer file that downloads.


Getting set up to use these labs

A zip file that contains all the data sets, R scripts, and some other features can be downloaded in a folder called ABDLabs. When you download this file and de-compress it, it should open a folder called ABDLabs. Inside this folder is one file and two folders. The folder Data contains all the data sets that you will need to complete these tutorials. The folder called LearningTheTools has an R script for each week, containing all the commands described in that week’s instructions. You’ll learn how to use these in Tutorial 1.


Starting a new session in R.

There is a file in the ABDLabs folder called ABDLabs.Rproj. You can double click on this file to start R and Rstudio automatically. If you start your session in R from this file, it will automatically load some packages of extra functionality that you will need for some tasks, and it will automatically tell R to look inside the ABDLabs folder for files like the data sets. Starting for this file will make your life a little easier.