Less Volume, More Creativity

R Pruim

JMM 2016

A note about these slides

The support for documentation creation in RStudio is great.

Getting Oriented to RStudio

Access to RStudio Sever

Panes and Tabs

The Console – ephemeral, interactive commands

R is case sensitive

Arrows and Tab

If all else fails, try ESC

Caclulation and Assignment

product <- 5 * 3 * 27
product
## [1] 405
sqrt(100)
## [1] 10
log10(product)
## [1] 2.607455

Environment Tab

RStudio Environment Tab

History Tab

RStudio History Tab

Packages Tab

RStudio History Tab

Help!

RStudio provides several ways to get help

RStudio History Tab

Less Volume, More Creativity

Less Volume, More Creativity

Mike McCarthy

Head coach, Green Bay Packers (NFL Football)

  • Packers subscribe to “draft and develop”
  • Among the youngest teams in the league every year
  • Coaching staff constantly teaching young players

Mike McCarthy

Head coach, Green Bay Packers (NFL Football)

  • Packers subscribe to “draft and develop”
  • Among the youngest teams in the league every year
  • Coaching staff constantly teaching young players

Joe from Fitchburg, WI:

Do you have a favorite Mike McCarthy quote?

Mike McCarthy

Head coach, Green Bay Packers (NFL Football)

  • Packers subscribe to “draft and develop”
  • Among the youngest teams in the league every year
  • Coaching staff constantly teaching young players

Joe from Fitchburg, WI:

Do you have a favorite Mike McCarthy quote? Mine is “statistics are for losers”.

Mike McCarthy

Head coach, Green Bay Packers (NFL Football)

  • Packers subscribe to “draft and develop”
  • Among the youngest teams in the league every year
  • Coaching staff constantly teaching young players

Joe from Fitchburg, WI:

Do you have a favorite Mike McCarthy quote? Mine is “statistics are for losers”.

Vic Ketchman (packers.com):

“Less volume, more creativity.”

Source: Ask Vic @ packers.com

More Mike McCarthy Quotes

You’ve got to watch that you don’t do too much. We have a philosophy on our coaching staff about less volume, more creativity.

A lot of times you end up putting in a lot more volume, because you are teaching fundamentals and you are teaching concepts that you need to put in, but you may not necessarily use because they are building blocks for other concepts and variations that will come off of that … In the offseason you have a chance to take a step back and tailor it more specifically towards your team and towards your players."

More Mike McCarthy Quotes

Q. (for McCarthy) How many offensive and defensive plays might you have coming into a game on average?

A. That’s an excellent question because years ago when I first got into the NFL we had 150 passes in our game plan. I’ve put a sign on all of the coordinators’ doors - less volume, more creativity. We function with more concepts with less volume. We’re more around 50 (passes) into a game plan.

Source: http://www.jsonline.com/packerinsider/106968233.html (Nov 10, 2010)

The Minimal R Exercise

List every R command used throughout a course

Organize by syntactic similarity and by purpose

Scratch everything you could have done without

Replace dissimilar tools with more similar tools

Aim for a set of commands that is

Result: Minimal R for Intro Stats

Less Volume, More Creativity

It is not enough to use R, it must be used efficiently and elegantly.

The mosaic package attempts to be part of one solution.

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

— Antoine de Saint-Exupery (writer, poet, pioneering aviator)

Make sure the mosaic package is loaded

require(mosaic)  


Note: R purists might prefer

library(mosaic)

but require() is easier for novices to remember.

The Most Important Template

 

goal ( yyy ~ xxx , data = mydata )

 

The Most Important Template

 

goal (  y  ~  x  , data = mydata )

The Most Important Template

 

goal (  y  ~  x  , data = mydata , …)

 

Other versions:

# simpler version
goal( ~ x, data = mydata )          
# fancier version
goal( y ~ x | z , data = mydata )   
# unified version
goal( formula , data = mydata )     

2 Questions

 

goal (  y  ~  x  , data = mydata )

 

What do you want R to do? (goal)

 

What must R know to do that?

2 Questions

 

goal (  y  ~  x  , data = mydata )

 

What do you want R to do? (goal)

What must R know to do that?

How do we make this plot?

How do we make this plot?

What is the Goal?

What does R need to know?

How do we make this plot?

What is the Goal?

What does R need to know?

How do we tell R to make this plot?