Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
T01_GettingStarted
T02_DataTypes
T03_UsingVectors
T04_Tibbles
T05_IntroToGgplot2
T06_DataWrangling01
T07_FunctionsAndLapply
T08_HierarchicalClustering
instructions_images
.gitignore
README.md

README.md

LearnR_Tutorials_Bio

This repository is a collection of tutorials for learning R using data sets from bioinformatics, biology, and chemistry.

Download the repository

To download the tutorials in this repository, click the green bar on the right, and then click Download ZIP.

Smiley face

For Windows users, you will have to unzip/extract the files inside the ZIP file you just downloaded before moving on. To do so, go to the directory which has the ZIP file in it, right click it and click Extract all, then you can pick a folder you prefer to store the extracted files.

In what follows, we will have different instructions for different users, i.e. Windows, Scholar Cluster and ITAP Lab computers in Purdue University, please follow the instructions correspond to your machine type.

For Windows Users

Table of Contents

Download R

Back to top

You can download R from CRAN

Click Download R for Windows,

Smiley face

Since this is the first time you install R, choose the base version.

Smiley face

Then click the link to download the R installer.

Smiley face

Run the .exe file you just downloaded, and don't change the default settings. Once the installing procedure is done, R should be installed in your computer.

Download RStudio

Back to top

RStudio is probably the best IDE to work with R and it's free! The R tutorials provided in this repository will run on RStudio.

To download RStudio, go to the RStudio official site, then scroll down to the All Installers section, and download the Windows installer.

Smiley face

Again, run the .exe file you just downloaded, and don't change the default settings.

R Markdown

Back to top

Once you finished installing RStudio, open it and click the file button on the top left, then click New File, R Markdown.

Smiley face

If this is your first time working with R Markdown files, you will see a prompt like this,

Smiley face

Click "Yes" to install all the required packages so you can create and use R Markdown files.

Install packages

Back to top

To be able to run the tutorials, you need to install the package learnr. There are two easy ways to install a package in RStudio,

You can type install.packages("package name") in the console window and hit enter on your keyboard. For example, to install the learnr package,

Smiley face

Or you can install a package by clicking the Packages button on the right, then click install, and in the prompted window, type in the name of the package you want to install, then click install. For example, to install the learnr package,

Smiley face

Run a Tutorial

Back to top

To run a tutorial, open RStudio, click the file button on the top left, then click Open File. Navigate to the folder which has all the tutorials, click the tutorial folder you want to open, then click the file with extension .rmd (R Markdown file). For instance, to open the first tutorial,

Smiley face

Smiley face

Smiley face

Once you opened the R Markdown file, you RStudio should look similar to this,

Smiley face

Some tutorials require additional packages, to see the required packages for each tutorial, you can visit the corresponding GitHub page. For example, the only required packages for tutorial 1 is learnr .

Smiley face

You can install multiple packages at once. Tutorial 4 requires three additional packages: tidyverse, magrittr, and RColorBrewer. To install all of them, in your console window, type in install.packages(c('tidyverse', 'magrittr', 'RColorBrewer')).

Smiley face

Once you have installed all the required packages, you can run a tutorial by clicking the Run Dcoument button located on the top.

Smiley face

If you succeed, you should see a window like this,

Smiley face

ITAP Computers

Back to top

If you are a Purdue faculty or student, you have the access to the ITAP computers in campus. R and RStudio are already installed in the ITAP computers, so you don't have to worry about the installation part, instead we will focus on how to set up your ITAP computer so you can run the tutorials.

After this, please follow these steps under Windows section,

Scholar Cluster

Back to top

You can’t perform that action at this time.