Introduction

About Me

  • U.S. Air Force - Operations Research Analyst
  • Air Force Institute of Technology - Assistant Professor
  • University of Cincinnati - Adjunct Assistant Professor
  • Website: bradleyboehmke.github.io
  • Twitter: @bradleyboehmke
  • Code: GitHub

Short Course Information

Instructor

  • Me

Time & Location

  • Time: 1:15 - 4:15
  • Location: Lindner 608

Website

What are we doing?

  • R Programming literacy
  • Data visualization

Requirements

  • Computer
  • R
  • IDE (i.e. RStudio)
  • Internet (not absolute)

Short Course Description & Objectives

Provides an intensive, hands-on introduction to the R programming language. Prepares students with the fundamental programming skills required to start your journey to becoming a modern day data analyst.


Objectives

Upon successfully completing this course, students will:

  • Be up and running with R
  • Understand the different types of data R can work with
  • Understand the different structures in which R holds data
  • Be able to import data into R
  • Perform basic data wrangling activities with R
  • Compute basic descriptive statistics with R
  • Visualize their data with base R and ggplot graphics

Short Course Schedule & Material

Today

  • Getting started with R
  • Importing data into R
  • Understanding data structures
  • Understanding data types






Tomorrow

  • Shaping and transforming your data
  • Base R graphics
  • ggplot graphics library
  • case studies






All required classroom material can be downloaded from the course website:

http://uc-r.github.io/r_bootcamp

Analytics & Programming

Why Program?

Why Program?

Flexibility

  • Frees us from point-n-click analysis software
  • Allows us to customize our analyses
  • Allows us to build analytic applications

Slows us down

  • Forces us to think about our analytic processes

Speeds the analysis up

  • Many statistical programming languages now leverage C++ and Java to speed up computation time

Reproducibility

  • Provides reproducibility that spreadsheet analysis cannot
  • Literate statistical programming is on the rise

Why R?

Why R?

Built for Analytics!

Why R?

Built for Analytics!



  • .csv, .txt, .xls, etc. files
  • web scraping
  • databases: MySQL, Oracle, PostgreSQL, etc.
  • SPSS, Stat, SAS

Why R?

Built for Analytics!



  • easy to create "tidy" data
  • works well with numerics, characters, dates, missing values
  • robust regex capabilities

Why R?

Built for Analytics!



  • joining disparate data sets
  • selecting, filtering, summarizing
  • great "pipe-line" process

Why R?

Built for Analytics!



  • R is known for its visualization capabilities
  • ggplot
  • interactive plotting - easily leverage D3.js libraries

Why R?

Built for Analytics!



  • built for statistical analyses
  • thousands of libraries provide many statistical capabilities
  • easy to build your own algorithms

Why R?

Built for Analytics!



  • RMarkdown (produce slides, HTML web pages, pdf)
  • Shiny
  • Reproducibility (communicate to your future self!)

Why R?

Great Community!

Why R?

Create Cool Stuff!

Getting Started

















“Programming is like kicking yourself in the face, sooner or later your nose will bleed.”

  • Kyle Woodbury

Installation

  1. Go to https://cran.r-project.org/
  2. Click "Download R for Mac/Windows"
  3. Download the appropriate file:
    • Windows users click Base, and download the installer for the latest R version
    • Mac users select the file R-3.X.X.pkg that aligns with your OS version
  4. Follow the instructions of the installer.

  1. Go to RStudio for desktop https://www.rstudio.com/products/rstudio/download/
  2. Select the install file for your OS
  3. Follow the instructions of the installer.

Note: There are other R IDE's available: Emacs, Microsoft R Open, Notepad++, etc.

Understanding the Console