Learning Base R
Learning Base R
Learning Base R
Lawrence M. Leemis
Lightning Source, LaVergne, 2016.
ISBN 978-0-9829174-8-0. 263 pp. USD 29.99 (P).
http://www.math.wm.edu/~leemis/
Many institutions require some level of technology instruction for their students, the nature
of which will vary of course by subject area. For students in STEM fields this likely means an
introduction to some high-level programming language and certain basic coding techniques
(if, for, while loops, writing functions, etc.). For most STEM fields, an exposure to statistics
is also a major requirement. Combining the two in an introductory data analysis or statistics
course using R is a reasonable approach. Learning Base R would serve as an excellent ancillary
text for such a course; indeed it should be considered for the same purpose with a linear
algebra course as well. Leemis’ text is a very straightforward tutorial that is designed for use
in (computer) laboratory settings. The level is such that even (first year) students with no
computing experience beyond gaming and social media should find it accessible. It is easily
the most accessible text in this sense of which I am aware. Its use as an introduction for
STEM field students to scientific programming with R is well worth considering.
Leemis acknowledges the origins of R as a statistics platform, but presents R for the most
part as a general scientific programming language. The book is divided into 28 short chapters
in black and white. They take typically 15 minutes to work through, though some of the later
chapters are quite a bit longer. The intention is that the reader reproduce the commands
shown in the chapter and then play around a bit with them to get a handle on what they are
actually doing. Exercises at the end of each chapter are straightforward questions involving
use of the chapter commands and techniques. The exposition in each chapter ends with a list
of the new commands used, as well as other related commands (e.g., having discussed t.test
in Chapter 26, he lists wilcox.test, chisq.test and several others).
The book starts out with the very basics, downloading R and elementary calculator operations.
He follows with chapters on the idea and basic manipulation of objects, vectors, matrices and
arrays. Each of these chapters is quite brief at between 5 to 8 pages. A full period lab should
be able to cover two or more of these chapters. Alternatively, these short chapters could be
incorporated as a small part of daily presentations – the book is quite flexible in how it could
be used in a course. Curiously a discussion of the principal data structure in R – Data Frames
– is put off until Chapter 16.
2 Learning Base R
test (with a listing of several other standard test commands); an introduction to linear mod-
eling using lm; and a very nice and comprehensive discussion of formula syntax. The linear
algebra chapter includes everything necessary for the first undergraduate course in the subject.
Recall that a much earlier chapter introduced matrices; here we find R methods for elementary
operations, inverses, determinants, eigenvalues and vectors, and matrix decompositions.
The final chapter, as befitting a text on base R, introduces the reader to packages. Both base
and the installation of contributed packages are discussed, as well as navigation of the help
files associated with each package. Oddly (to me at least) he picks a few commands from
here and there and spends several pages using them. I would have preferred a few sentences
on each of (what he considers to be) the important packages and what they contain. He does
refer the reader to CRAN task views, an important resource, but some information on MASS,
hmisc, mosaic, lattice, ggplot2 and others would seem to be in order for those new to R.
As the author points out, there is no natural progression through topics presented here.
He has made reasonable choices, but others might differ. To a large extent chapters are
standalone, and could easily be omitted or rearranged. Certainly R finds its main use in the
field of statistics, but Leemis succeeds in showing its applicability in other fields (especially
linear algebra), at least at introductory levels. The text is well written, clear and concise.
The editing is extraordinary (I found but one typo on a very close read).
Leemis’ text provides an excellent introduction to R, especially suitable for those learning
their first high-level programming language. The book provides not just an introduction to
R, but to general scientific programming. For those interested in getting to know R on their
own it is a very gentle introduction. As a laboratory manual, short course, or ancillary course
text it would excel.
Reviewer:
James E. Helmreich
Marist College
Department of Mathematics
3399 North Road
Poughkeepsie, NY 12514, United States of America
E-mail: [email protected]
URL: http://foxweb.marist.edu/users/james.helmreich/