Aargh! I have to teach R (Experiences in the teaching of R)

25
© 2010 2016 eoda GmbH I have to teach R Experiences in the teaching of R eRum 2016 Martin Schneider Data Scientist

Transcript of Aargh! I have to teach R (Experiences in the teaching of R)

Page 1: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider

I have to teach RExperiences in the teaching of R

eRum 2016Martin SchneiderData Scientist

Page 2: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

About eoda

Interdisciplinary Team Statisticians | Engineers | Economists | Sociologist | …

Based in Kassel - Germany

Data Science Consulting, Training, Support, Software and Analytic Services with a focus on R

Page 3: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Teaching R since

2013

Motivation and Qualification

Number of courses

0025

Course Participants

0125I

Page 4: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Motivation and Qualification

Teaching R since

2010

Number of courses

0150

Course Participants

1000WE

Page 5: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?

BusinessAcademics

Wide differing Background

Page 6: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?

Business

Wide differing Priorities

We want to do everything perfect, everyprerequisite for analysis has to be met.

Academics

Page 7: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?

BusinessAcademics

Wide differing Priorities

How much money can we save? We want to see results

Page 8: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?

? Excel

Wide differing preknowledge in Analytic Tools

Page 9: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?Wide differing Statistical Background

NONECOOL

NONE

Page 10: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?Wide differing Statistical Background

A LOT COOL

A LOT

Page 11: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?Wide differing Statistical Background

SOME

Dangeroushalf knowledge

SOME

Page 12: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?Wide differing Personal Goals

I want to start withstatistical analysis

I‘m already using SPSS but I heard a lot of R so I

wanted to take a look

Page 13: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

For who?

BusinessAcademics

Wide differing Personal Goals?

I want to start withstatistical analysis

I‘m already using SPSS but I heard a lot of R so I

wanted to take a lookI‘m already using Excel andeverything is working fine

but my boss said…

Page 14: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Package updates

Recurring Problems

Page 15: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Recurring Problems

diverse classes

Page 16: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Recurring Problems

In R there are usually lots of different ways

to solve a problem

We did this already this way, whyare we doing it another way?

Page 17: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Recurring Problems

Steep learning curve

What does this Error Message mean? I‘m having problems

solving this exercise.

This is in SPSS much easier

I will neverunder-stand R

Page 18: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Recurring Problems

Technical hurdles

I´m missing the permissionto install packages

I have to use externalsoftware

Page 19: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Writing codein front

Excersises

Usual Course

Small Part of Presentation

Presentation

Page 20: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Usual Course

Writing code in front

cars <- read.csv(file = "Data/carsMO.csv", stringsAsFactors = FALSE)

select(cars, Manufacturer, Modell, contains("sales", ignore.case = TRUE))select(cars, Manufacturer, Modell, Sales:Sales_grouped)

mutate(cars, weight_to_hp = HP/Weight) %>%filter(weight_to_hp > mean(weight_to_hp, na.rm = TRUE)) %>%arrange(desc(weight_to_hp))%>%select(Modell, weight_to_hp)

abs_loss_data <- cars %>%mutate(absolute_loss = Purchase_price - Resaleprice) %>%arrange(desc(absolute_loss)) %>%select(Modell, contains("price"), absolute_loss) %>%filter(!is.na(absolute_loss))

Slowdownwhen writing

code

Page 21: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Usual Course

Excercises

Don‘t make itto difficult

Now that you know, what a list isplease load this dataset, apply a cluster analysis on it and create

an appealing report

Page 22: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Usual Course

Excercises

Don‘t make itto easy

Now that you know how toextract the first element from a list, please extract the second

Page 23: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Example Data

Iris

NYC Taxi Data

MT Cars

Usual Course

Page 24: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

Wishfull Thinkingworkshop element attached to the course

smaller chunks of training sessions

Page 25: Aargh! I have to teach R (Experiences in the teaching of R)

© 2010 – 2016 eoda GmbHMartin Schneider www.eoda.de

@eodaGmbH

@eodaGmbH eodaGmbH

blog.eoda.de

eoda GmbHUniversitätsplatz 12

34127 Kassel - Germany

www.eoda.de/[email protected]

+49 561 202724-40

The Data Science Specialists.