R User for >10 years
Co-ordinator, Bioinformatics Hub
Level 4, Santos Petroleum Engineering Building
20 July 2016
R User for >10 years
Co-ordinator, Bioinformatics Hub
Level 4, Santos Petroleum Engineering Building
Also Today:
Later This Week:
Please join the #radelaide-2016 channel
Excel is notorious for converting values from one thing to another inappropriately.
Gene names are often converted to dates (e.g. SEPT9)
Genotypes can be converted into numeric values (e.g. the homozygote "1/1")
In R we generally work with plain text files.
With power comes great responsibility - Uncle Ben
With this extra capability, we need to understand a little about:
That's tomorrow's content
Today we will start with:
RStudio thenFile > New File > R ScriptIntroduction.R# symbolConsole or send from the Script WindowEnter the following in the Script Window
# Create our first R object x <- 5
Console by either:
Ctrl + EnterRun button at the top rightWe can view the contents of the object x by:
Console, orScript Window & sending it to the Consolex print(x)
Where have we created the object x?
x in our R WorkspaceGlobal EnvironmentEnvironment is like your desktop.RData objectsave.image()
x) and then assign a value to it using the <- symbol.# Using the reverse assignment operator 5 -> x
Environment Tab is the History Tab
ConsoleScript Window and executeIn the bottom right are a series of tabs
Files: This shows your current working directoryPlots: Every time you make a graph it appears herePackages: NEVER CLICK OR UN-CLICK ANYTHING HEREHelp: We'll explore this laterHelp > Cheatsheets > RStudio IDE Cheat Sheet
Page 2 has lots of hints:
Ctrl + 1 places focus on the Script WindowCtrl + 2 places focus on the ConsoleCtrl + 3 places focus on the Help TabGit and SVN version controlLet's set one up for this course: File > New Project
New or Existing Directory