Splus tutorial
- The material linked to this page was previously used for the
Statistics 200 lab course, last taught by Brendan Murphy and John
Hartigan in Spring 1998.
The labs were created by Brendan Murphy and David Pollard.
- The labs were based on an old version of Splus. Nevertheless,
most of the calculations still work with current versions of Splus (and R).
- Directions related to specific directories on the Statlab machines are probably no longer accurate.
Topics to be covered
Click on the grey arrow following the class number to view the
corresponding handout for the lab session.
The first five weeks
will provide an introduction to S-Plus.
Getting into and out of S-Plus. Help! Saving your work.
Incorporating
S-Plus output in reports. Introduction to lists, vectors, matrices,
functions,
and graphics. An illustrative example.
Reading data from other sources; data from WWW sites (such
as
StatLib at Carnegie-Mellon
University,
and the U.S. Census
Bureau). Data frames. Evaluation frames. Libraries. Search
lists.
Fancier graphics: beyond the defaults. Multiple plots per
page,
split screens, "graphics frames".
Matrices, arrays, and factors.
More about functions. Default arguments, variable numbers
of
arguments,
return values. Idiot-proofing. Looping and conditional
computations.
End of introduction to Splus
Data structures. Regression and model fitting. Manipulation
of
lm objects.
Low-level graphics. Construction of customized plots.
Fancy pictures: Trellis
graphics.
Classes and methods.
Multivariate plotting.
Libraries and dynamic graphics.
Special projects.
References:
-
Probably the most convenient reference for you will be the help system
built into Splus.
-
Richard A. Becker, John M. Chambers, and Allan R. Wilks (1988) The
New
S Language: A programming environment for data analysis and
graphics.
Wadsworth. [Slightly dated. Just for reference.]
-
W. N. Venables and B. D. Ripley (1997) Modern Applied Statistics
with
S-Plus. (Second edition) Springer-Verlag.
-
Phil Spector (1994) An Introduction to S and S-Plus.
Duxbury. [Much
gentler introduction than Venables&Ripley. No coverage of more
recent
developments. Very little material specific to Windows version.]
-
There is a very active S-news group, where many questions are asked
and
answered about Splus. Statlib maintains a searchable
archive of the discussions that have taken place. Often this site
is
the best source for particularly puzzling problems with Splus. The
list
of frequently asked
questions
is a good place to look for starters.
-
Yale FAQ: a collection
of explanations to Frequently Asked Questions in
Stat
200.