2 First Steps


2.1 Why R

We focus on R because it is good for complex stats, concise figures, and coherent organization. It is built and developed by applied statisticians for statistics, and used by many in academia and industry. For students, think about labor demand and what may be good for getting a job. Do some of your own research to best understand how much to invest.

2.3 Interfacing with R

Rstudio is easiest to get going with. (There are other GUI’s.) There are 4 panes. The top left is where you write and save code

  • Create and save a new R Script file My_First_Script.R
  • could also use a plain .txt file.

The pane below is where your code is executed. For all following examples, make sure to both execute and store your code.

Note that the coded examples generally have inputs, outputs, and comments. For example,

## This is a comment
CodeInput <- c('output looks like this')
CodeInput
## [1] "output looks like this"