Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Latest commit

 

History

History
163 lines (84 loc) · 2.3 KB

OUTLINE.md

File metadata and controls

163 lines (84 loc) · 2.3 KB

Gapminder R lesson

01-Rstudio-intro

Learning objectives:

  • To gain familiarity with the various panes in the RStudio IDE
  • To gain familiarity with the buttons, short cuts and options in the Rstudio IDE
  • To understand variables and how to assign to them
  • To be able to manage your workspace in an interactive R session
  • To be able to use mathematical and comparison operations
  • To be able to call functions

Section headings:

  • Introduction to RStudio

    • includes layout info -- screenshot?
  • Work flow within Rstudio

    • 2 workflows.
  • Introduction to R

  • Using R as a calculator

  • Mathematical functions

  • Comparing things

  • Variables and assignment

  • Managing your environment

02-project-intro

  • Introduction

  • A possible solution

  • Best practices for project organisation

  • Treat data as read only

  • Data Cleaning

  • Treat generated output as disposable

  • Separate function definition and application

  • Save the data in the data directory

  • Version Control

03-seeking-help

  • Reading Help files

  • Special Operators

  • Getting help on packages

  • When you kind of remember the function

  • When you have no idea where to begin

  • When your code doesn't work: seeking help from your peers

  • Other ports of call

04-data-structures-part1.md

  • Data Types

  • Data Structures

  • Vectors

  • Matrices

  • Factors

  • Lists

05-data-structures-part2

  • Data frames

  • Reading in data

  • Using dataframes: the gapminder dataset

06-data-subsetting

  • Accessing elements using their indices

  • Skipping and removing elements

  • Subsetting by name

  • Subsetting through other logical operations

  • Handling special values

  • Factor subsetting

  • Matrix subsetting

  • List subsetting

  • Data frames

07-functions

  • Defining a function

  • Combining functions

08-plot-ggplot2

  • Layers

  • Transformations and statistics

  • Multi-panel figures

  • Modifying text

09-vectorization

10-control-flow

  • conditional logic

  • control flow

11-writing-data

  • Saving plots

  • Writing data

12-plyr

13-wrap-up

  • Best practices for writing nice code

  • Make code readable

  • Documentation: tell us what and why, not how

  • Keep your code modular

  • Break down problem into bite size pieces

  • Know that your code is doing the right thing

  • Don't repeat yourself

  • Remember to be stylish