27 November 2016
RLet's set one up for this course: File > New Project
New or Existing DirectoryFile > New File > R ScriptIntroduction.Rgetwd()
# symbolConsole or send from the Script WindowEnter the following in the Script Window
# Create an example 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()
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 TabSession 2 - Loading data into R