[R-sig-teaching] help for beginner

Robert Baer rbaer at atsu.edu
Wed Nov 28 20:07:32 CET 2012


On 11/18/2012 8:09 PM, Nguyen Chanh Tu wrote:
> Dear all,
> I am going to teach Probability and Statistics for engineering students. I
> probably use the book "Probability and Statistics for engineeriing and the
> sciences" by J. L. Devore. And I am going to use R for the course.
> This is the first time for me to try to use R. (Before I just use Excel).
> Could you please be so kind to help me for anything concerning to a
> beginner, especially:
> 1) Which packages should I install with the standard  R?
> 2) Can I find some where demo files of teaching or  script files concerning
> to the course.
> 3) If there is any help already had in the forum about these starting
> steps, please point out to me such that I can read more.
> 4) Is there anyone using the same textbook or similar one of mine such that
> we can exchange teaching experients on the course.
>
> Thank you very much in advances. Looking forward to hearing from you.
> Sincerely,
> Nguyen
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-teaching at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
I have used R to teach biomedical science students for several years, 
and although not without some frustrations, students catch on fairly 
quickly.  I don't have experience with engineering students, so their 
needs may differ.

My approach is to spend a couple of class periods at the beginning 
making sure that the students can enter a data set in one of several 
ways, for example, using read.table(), scan(), and using the c() with 
assignment.  We spend time with the concept of a vector and a dataframe 
and the difference in how a one column dataframe and a vector are 
printed at the command prompt.  We talk about how to move back and forth 
between vectors and dataframes.  We talk about how to change one value 
in a mistyped vector value and how to change one value in a dataframe 
column and row.  I do this despite the fact that virtually all the REAL 
datasets we use are available electronically because it puts the student 
in control of sometimes "assumed" ideas of R users.  I also provide 
students with a two-sided cheat-sheet of the most common commands that I 
think we will use.  I invite them to help me keep it current.  I 
regularly devote class time to doing live demonstrations on "sample 
problems" similar to those I want them to be able to use R for.  My 
students have computers and can work along when we do this.  Time spent 
in these endeavors seems far more important than it would using an Excel 
interface.

We also talk about the difference between the so-called "long" and 
"wide" formats of dataframes and introduce them to working with factors 
and the very strange (to the newcomer) as.numeric(as.character(factvar)) 
construction.  I am frequently surprised at how much more difficult 
these ideas of data layout are than the statistics or R commands 
themselves are for the students. Yet, this skill-set is highly 
transferable across programs they might encounter in the future.  I 
unashamedly look at the help files for commands we are using (I do this 
during class) even when we are not doing anything too tricky.  This role 
models the most basic R support for the students, right from the start.

Someone already mentioned R Commander which I only introduce to the 
students when we get to ANOVA and linear regression.  By then they have 
a couple of weeks getting used to the feel of a command line interface.  
Most of my students rarely look back from here, but for engineering 
students R is often a useful free substitute for Matlab capabilities, 
and so the more fundamental skills you can convey to the students, the 
better off they will be (in my opinion).

Another very nice GUI interface for R is Deducer, particularly when used 
in conjunction with JGR.  If all you want to do is to teach "basic 
probability and statistics", this might be another way to go.

Rob Baer

-- 
__________________
Robert W. Baer, Ph.D.
Professor of Physiology
Kirksille College of Osteopathic Medicine
A. T. Still University of Health Sciences
Kirksville, MO 63501 USA



More information about the R-sig-teaching mailing list