Learn R

Nehil Jain

What we will cover?

  1. Github
  2. Data Importing
  3. Data Cleaning and Munging
  4. Data Vizualisation
  5. Code Style Guide
  6. Resources

Github

Lets get github setup

Data Importing

  • Data Types in R
  • Readr
  • Data.Table
  • Caveats
  • Prevent copying data

Lets do it

Data Analysis

  • plyr #later
  • dplyr
  • Tbl_df
  • 5 verbs

    • slice
    • filter
    • select
    • arrange
    • desc
    • mutate
    • summarise
  • Grouped Operations

Data Analysis

Lets Do it

Visualisation

  • ggplot2
  • ggvis
  • exploratory
  • Grammar of Graphics
    • ggplot #data
    • aes #mapping
    • geom #Visual Geometry
    • scales and coordinates
  • ggplot Cheatsheet

Visualisation

Lets Do it

Code Style

  • Creating code vs maintaining code
  • Be kind to your future self. Write readable and consistent code
  • Hadley Wickam's Style Guide (http://adv-r.had.co.nz/Style.html)
  • Naming is complex. Also beware of collisions

Resources

  • Datacamp
  • Coursera
  • R-bloggers
  • Rdocumentation.org
  • Stackoverflow