Skip to content

Convincing other colleagues to use R in the classroom

2 messages · Grant, Robert, Randall Pruim

#
Robert's message provides a nice segue to my previously advertised post regarding the mosaic package.

Here are three things that I think are important in getting R to have wider usage:

1) Having a perceived advantage because R can do something other systems in use cannot

2) Making R look as simple/clear as possible when it is first introduced.

3) PATIENCE

I've spent several hours with a colleague in engineering this week.  He was already using R, but his R skills were weak, he lacked a strong understanding of the methods he wanted to use, and he had never seen RStudio and the extras it provides.  I think his impression of R and his future use of R will be much better for our recent interaction.  This is the "low hanging fruit" -- improving the experience for those already attracted to R.  It has side effects of making R more attractive to others as well.  It is really easy to write really bad R code that will do more harm than good at winning the hearts and minds of those not yet using R.  So any time invested in improving how others use R is time well spent if your goal is to grow the R user base.  [One immediate outcome of this is that he has abandoned the Word document he was preparing for an article submission and moved over to using knitr -- he's thrilled.  His previous method was to use cat() and trap lots of ASCII output in a file which was then copied and pasted into Word, and I don't know if he had been using any plots.  For those who don't know LaTeX and don't want to learn it, the RMarkdown tools in RStudio are a first step in this direction and really easy to use.]

Regarding (2), I think the guiding principle at the start needs to be "Less Volume, More Creativity" (from a poster hung in the war room of the Green Bay Packers by head coach Mike McCarthy).  While there are many ways to skin cats in R, newbies need to have someone teach them a systematic cat-skinning approach that generalizes to dog-skinning, mouse-skinning, etc, etc.  The mosaic package provides some utilities to make this possible in one particular way.  One of our goals was to simplify the high level view of R commands so that most things can be done with one paradigm:

	functionname( y ~ x | z, data = ..., other options )

If you are familiar with lattice graphics, you can guess that we use only lattice graphics.  We have written additional functions so that things like mean( age ~ sex, data=HELPrct ) gives the mean ages for each sex.  And, of course, linear models work in this same way.  Tables can be created using our tally() function and similar formulas.  Depending on your intended topics, you can probably teach an entire intro course without mentioning the $ operator if you want to.  Further more if you can get students to think of y ~ x | z as y depends on x (perhaps differently for each z), that is a useful thinking habit that works for graphics, numerical summaries, and linear models.

The package contains a vignette with one minimal set of R commands sufficient for an intro course and a sampler of their usage.

For more information, you might check out the slides available at 

	http://www.calvin.edu/~rpruim/talks/

several of which were used for presentations either at the Joint Mathematics Meetings last week or at a workshop I did at George Washington University in November.

---rjp
On Jan 18, 2013, at 11:27 AM, Grant, Robert wrote: