Using R Markdown in Introductory Statistics Ben Baumer 1 1 Smith - - PowerPoint PPT Presentation

using r markdown in introductory statistics
SMART_READER_LITE
LIVE PREVIEW

Using R Markdown in Introductory Statistics Ben Baumer 1 1 Smith - - PowerPoint PPT Presentation

Using R Markdown in Introductory Statistics Ben Baumer 1 1 Smith College Northampton, MA USCOTS 2013 Cary, NY May 17th, 2013 R Markdown Student Workflow in Intro Stats Computation is essential Ideal Tool: stat package of your choice R


slide-1
SLIDE 1

Using R Markdown in Introductory Statistics

Ben Baumer1

1 Smith College

Northampton, MA

USCOTS 2013 Cary, NY May 17th, 2013

slide-2
SLIDE 2

R Markdown

Student Workflow in Intro Stats

Computation is essential

◮ Ideal Tool: stat package of your choice ◮ R with mosaic

Written analysis is imperative

◮ Ideal Tool: word processor of your choice ◮ Word? GoogleDocs? LibreOffice? L

AT

EX?

How to combine the two? COPY - AND - PASTE!

Baumer (Smith) R Markdown USCOTS 2013 2 / 6

slide-3
SLIDE 3

R Markdown

Student Workflow in Intro Stats

Computation is essential

◮ Ideal Tool: stat package of your choice ◮ R with mosaic

Written analysis is imperative

◮ Ideal Tool: word processor of your choice ◮ Word? GoogleDocs? LibreOffice? L

AT

EX?

How to combine the two? COPY - AND - PASTE!

Baumer (Smith) R Markdown USCOTS 2013 2 / 6

slide-4
SLIDE 4

R Markdown

Student Workflow in Intro Stats

Computation is essential

◮ Ideal Tool: stat package of your choice ◮ R with mosaic

Written analysis is imperative

◮ Ideal Tool: word processor of your choice ◮ Word? GoogleDocs? LibreOffice? L

AT

EX?

How to combine the two? COPY - AND - PASTE!

Baumer (Smith) R Markdown USCOTS 2013 2 / 6

slide-5
SLIDE 5

R Markdown

Student Workflow in Intro Stats

Computation is essential

◮ Ideal Tool: stat package of your choice ◮ R with mosaic

Written analysis is imperative

◮ Ideal Tool: word processor of your choice ◮ Word? GoogleDocs? LibreOffice? L

AT

EX?

How to combine the two? COPY - AND - PASTE!

Baumer (Smith) R Markdown USCOTS 2013 2 / 6

slide-6
SLIDE 6

R Markdown

Why is that bad?

Not reproducible

◮ Difficult or impossible to follow ◮ Easy to forget how to retrace steps

Not logical

◮ Separates analysis from computation ◮ Little or no connection between data and analysis

Not necessarily honest

◮ Allows fudging ◮ Permits selective reporting Baumer (Smith) R Markdown USCOTS 2013 3 / 6

slide-7
SLIDE 7

R Markdown

Why is that bad?

Not reproducible

◮ Difficult or impossible to follow ◮ Easy to forget how to retrace steps

Not logical

◮ Separates analysis from computation ◮ Little or no connection between data and analysis

Not necessarily honest

◮ Allows fudging ◮ Permits selective reporting Baumer (Smith) R Markdown USCOTS 2013 3 / 6

slide-8
SLIDE 8

R Markdown

Why is that bad?

Not reproducible

◮ Difficult or impossible to follow ◮ Easy to forget how to retrace steps

Not logical

◮ Separates analysis from computation ◮ Little or no connection between data and analysis

Not necessarily honest

◮ Allows fudging ◮ Permits selective reporting Baumer (Smith) R Markdown USCOTS 2013 3 / 6

slide-9
SLIDE 9

R Markdown

R Markdown

Simple, free, open source, easy-to-learn markup syntax Text & R code ⇒ HTML

◮ R commands alongside the output from that command ◮ Plots embedded into a single file

Supports some L

AT

EX One file, one workflow Implementation: RStudio with knitr

Baumer (Smith) R Markdown USCOTS 2013 4 / 6

slide-10
SLIDE 10

R Markdown

At Smith

Fall 2012

◮ MTH 245: Intro Prob. & Stats (5 credits, 42 students) ◮ MTH 247: Regression (33 students)

Spring 2013

◮ MTH 241: Intro Prob. & Stats (4 credits, 3 × 25 students)

Fall 2013

◮ MTH 292: Data Science (4 credits, 22 students?) ◮ Python hooks?

(almost) All homeworks and projects completed in Markdown Building institutional knowledge

◮ 100+ students on campus with Markdown experience ◮ 6 Stat TAs trained and experienced with R Markdown

Collaborations poster exploring attitudes towards Markdown

◮ More on this at JSM Roundtable Baumer (Smith) R Markdown USCOTS 2013 5 / 6

slide-11
SLIDE 11

R Markdown

At Smith

Fall 2012

◮ MTH 245: Intro Prob. & Stats (5 credits, 42 students) ◮ MTH 247: Regression (33 students)

Spring 2013

◮ MTH 241: Intro Prob. & Stats (4 credits, 3 × 25 students)

Fall 2013

◮ MTH 292: Data Science (4 credits, 22 students?) ◮ Python hooks?

(almost) All homeworks and projects completed in Markdown Building institutional knowledge

◮ 100+ students on campus with Markdown experience ◮ 6 Stat TAs trained and experienced with R Markdown

Collaborations poster exploring attitudes towards Markdown

◮ More on this at JSM Roundtable Baumer (Smith) R Markdown USCOTS 2013 5 / 6

slide-12
SLIDE 12

R Markdown

At Smith

Fall 2012

◮ MTH 245: Intro Prob. & Stats (5 credits, 42 students) ◮ MTH 247: Regression (33 students)

Spring 2013

◮ MTH 241: Intro Prob. & Stats (4 credits, 3 × 25 students)

Fall 2013

◮ MTH 292: Data Science (4 credits, 22 students?) ◮ Python hooks?

(almost) All homeworks and projects completed in Markdown Building institutional knowledge

◮ 100+ students on campus with Markdown experience ◮ 6 Stat TAs trained and experienced with R Markdown

Collaborations poster exploring attitudes towards Markdown

◮ More on this at JSM Roundtable Baumer (Smith) R Markdown USCOTS 2013 5 / 6

slide-13
SLIDE 13

R Markdown

At Smith

Fall 2012

◮ MTH 245: Intro Prob. & Stats (5 credits, 42 students) ◮ MTH 247: Regression (33 students)

Spring 2013

◮ MTH 241: Intro Prob. & Stats (4 credits, 3 × 25 students)

Fall 2013

◮ MTH 292: Data Science (4 credits, 22 students?) ◮ Python hooks?

(almost) All homeworks and projects completed in Markdown Building institutional knowledge

◮ 100+ students on campus with Markdown experience ◮ 6 Stat TAs trained and experienced with R Markdown

Collaborations poster exploring attitudes towards Markdown

◮ More on this at JSM Roundtable Baumer (Smith) R Markdown USCOTS 2013 5 / 6

slide-14
SLIDE 14

R Markdown

At Smith

Fall 2012

◮ MTH 245: Intro Prob. & Stats (5 credits, 42 students) ◮ MTH 247: Regression (33 students)

Spring 2013

◮ MTH 241: Intro Prob. & Stats (4 credits, 3 × 25 students)

Fall 2013

◮ MTH 292: Data Science (4 credits, 22 students?) ◮ Python hooks?

(almost) All homeworks and projects completed in Markdown Building institutional knowledge

◮ 100+ students on campus with Markdown experience ◮ 6 Stat TAs trained and experienced with R Markdown

Collaborations poster exploring attitudes towards Markdown

◮ More on this at JSM Roundtable Baumer (Smith) R Markdown USCOTS 2013 5 / 6

slide-15
SLIDE 15

R Markdown

At Smith

Fall 2012

◮ MTH 245: Intro Prob. & Stats (5 credits, 42 students) ◮ MTH 247: Regression (33 students)

Spring 2013

◮ MTH 241: Intro Prob. & Stats (4 credits, 3 × 25 students)

Fall 2013

◮ MTH 292: Data Science (4 credits, 22 students?) ◮ Python hooks?

(almost) All homeworks and projects completed in Markdown Building institutional knowledge

◮ 100+ students on campus with Markdown experience ◮ 6 Stat TAs trained and experienced with R Markdown

Collaborations poster exploring attitudes towards Markdown

◮ More on this at JSM Roundtable Baumer (Smith) R Markdown USCOTS 2013 5 / 6

slide-16
SLIDE 16

R Markdown

Examples

Illustration (http: //www.rstudio.com/ide/docs/authoring/using_markdown) Lectures Notes (http://www.math.smith.edu/~bbaumer/mth247/ labs/logistic.html) Homework Solutions (http://www.math.smith.edu/~bbaumer/ uscots/hw4_solutions.html) Student Project (http://www.math.smith.edu/~bbaumer/ uscots/group-d-submit.html) RPubs (http://rpubs.com)

Baumer (Smith) R Markdown USCOTS 2013 6 / 6