June 13, 2016

RStudio

  • "RStudio is an integrated development environment (IDE) for R."
  • It helps the user use R.
  • R, in essence is just the a console that takes commands from you typing into it
  • Is NOT dropdown statistical tools (such as Stata)
  • Snapshots taken from http://ayeimanol-r.net/2013/04/21/289/

RStudio/R Console

RStudio/R Console

  • Where code is executed (where things happen)
  • You can type here for things interactively
  • Code is not saved on your disk

Script/Editor

RStudio/R Script/Rmarkdown files

  • Where files open to
  • Have R code and comments in them
  • Can highlight and press (CMD+Enter (Mac) or Ctrl+Enter (Windows)) to run the code
  • Code is saved on your disk

Workspace/Environment

Workspace/Environment

Workspace/Environment

  • Tells you what objects are in R
  • What exists in memory

History

  • Shows previous commands. Good to look at for debugging, but don't rely on it as a script. Make a script!

Other Panes

  • Files - shows the files on your computer of the directory you are working in
  • Viewer - can view data or R objects
  • Help - shows help of R commands
  • Plots - pretty pictures

Other Panes - packages

  • Packages - list of R packages that are loaded in memory
    • Packages are a set of functions written by R users
    • We write packages - some are good, some are not so good
  • Think of them as "R Extensions"
  • If they extend R, when you download R from CRAN, we (and others) refer to things as "base R"
    • We will show you how to do some things in base R, but also show you some newer (and more intuitive) ways to do things
    • You need base R, however, because when you Google for answers, they are commonly answered without any additional packages.

Hadey Wickham