Information for Instructors

An R and S-PLUS Companion to Applied Regression

John Fox


Distributing Course Materials for R

The car library contains all of the data sets referenced in the book, along with other data sets used in my Applied Regression, Linear Models, and Related Methods (Sage, 1997). The R and S-PLUS Companion is intended to be usable with other modern regression texts as well, however, and you may wish to make available to your students data sets from another book or other source. There are (at least) two ways to proceed:
  1. Provide your students with ascii data files to be read via the read.table function, or with data sets from some other program (such as SPSS) to be imported into R (see Chapter 2 of the text). The data files could be made available on the Internet, or distributed on a floppy disk or CD-ROM. The virtue of this approach is that your students learn to read data from external sources.
  2. Using the tools available in R (for Windows systems, see the information put together by Brian Ripley and maintained by Duncan Murdoch), build and distribute an R package for your students. The advantages of this approach are that the data sets are conveniently available to the students, along with standard help information, and that you can also distribute course-specific functions. The disadvantage is that you have to take the time to write and build an R package.
Prior to version 2.0.0 of R, it was also possible to put together a simple R Windows package of data and functions without using the package-building tools. As far as I'm aware that's no longer a practical possibility.

Exercises

I've taught a course on S (with an emphasis on R) at the Inter-University Consortium for Political and Social Research (ICSPR) Summer Program and at several other places. Course materials, including exercises (and answers), for the most recent version of the course are available on my web site.

Last modified: 3 September 2007 by John Fox < jfox@mcmaster.ca >