Dr. Ben Weinstein
  • Research
  • Publications
    • Data
  • DeepMeerkat
  • MotionMeerkat
  • Computer Vision Ecology
  • R Course
  • Blog

Introduction to R and Statistical Computing Course

Instructor: Ben Weinstein

Location: Life Sciences 038, Stony Brook University. 

Time: Beginning Jan 27th, Mon 2- 4pm & Weds., 9-11 AM – lasting three weeks.

Size: 40 Students – first come first serve, open to all. 

Aim: Introduce incoming biometry students to statistical coding and plotting using R. It will focus on peer learning, hands on examples, and active problem solving. The overall goal is to demystify R and arm students with the skills needed to succeed in Biometry and as researchers. I urge both novice and intermediate R users to attend. 

Approach: The course format will focus on specific concepts and skills using markdown slides (links below). A worksheet, along with answers, is provided to reinforce the tools. Before each class, please review the Intro to R youtube series (embedded below), reviewing the video sections labeled in red. 


Picture
Introduction to R - What is it?  
Slides and Worksheet (Answers)
  • Introduction to R and Rstudio
  • Basic Math
  • Vectors
  • Intro to R: 1.1 to 1.3; please skim Hadley Wickham's Introduction

This is a hands on course. Before you come to class, please install R and Rstudio on your laptop.

Picture
Probability and Distributions
Slides and Worksheet (Answers)
  • Drawing from Distributions
  • Univariate Plots
  • Intro to R: 1.4 to 1.5


Picture
Data Manipulation
Slides and Worksheet (Answers)
  • Dataframes
  • Logical Statements
  • Subsetting
  • Intro to R: 2.1 - 2.2
  • For more on subsetting: http://adv-r.had.co.nz/Subsetting.html


Picture
Loops and Flow Statements
Slides and Worksheet (Answers)
  • For Loops - Basic Math
  • For Loops - Vectors
  • If, next, break flow statements
  • Intro to R: 2.3 - 2.6; optional: 3.2, 4.6 


Picture
Data Exploration and Plotting
Slides and Worksheet (Answers)
  • Importing Data - Traits.csv needed for this lesson available here.
  • Descriptive Summary Statistics
  • Introduction to ggplot2; see additional slides
  • There are many intro to ggplot guides; here, here, and video here


Picture
Beyond Biometry
Slides and Worksheet (Answers)
  • User Defined Functions
  • Best practices
  • Github and version control, and why it is critical for modern science*
  • Intro to R: 4.1 - 4.2; 
* If you would like to follow along in class, please complete steps 1-5 and download git for your computer. It's worth it.

    Course Feedback

Submit
* To navigate to the desired video, click on the playlist dropdown menu in the top left corner. 

Acknowledgements

Thanks to Karthik Ram and Software Carpentry for all their hard work and leadership in teaching R. The original repo and my forked files can be found on github. Special thanks to Sarah Supp for her help on connecting with this group. Also thanks to Dan Rabosky, whose R seminar at Berkeley provided additional components for this work. Thanks to google developers for the Intro to R youtube videos!
Powered by Create your own unique website with customizable templates.