You are here

The R Student Companion

Brian Dennis
Publisher: 
Chapman & Hall/CRC
Publication Date: 
2016
Number of Pages: 
339
Format: 
Paperback
Price: 
44.95
ISBN: 
9781439875407
Category: 
Manual
[Reviewed by
Jason M. Graham
, on
08/10/2016
]

Beginning in the 1980s, commercially developed calculators with graphing and programmable capabilities have been available to students and others for aid in solving various mathematical problems. In parallel, many mathematics software packages were developed for use by both students and professionals in mathematics, science and related fields. Examples of such software are the popular MATLAB for numerical computing with some symbolic capability and Mathematica for symbolic mathematical manipulation with some numerical capability. Both MATLAB and Mathematica as well as a variety of other mathematical software packages have in addition the ability to produce high quality graphics for plotting functions, etc. One can also write and execute programs using for-loops and other standard computer science techniques in MATLAB and Mathematica. Other popular tools of this kind are Maple, Mathcad, and statistical software such as SPSS and SAS. The accessibility of sophisticated calculators and mathematical software has revolutionized both teaching and problem solving in mathematics, science, and engineering. Of course dramatic advances in both hardware and software continue to occur that makes mathematical software ever better.

But there is another revolution in mathematics related computing that is well in motion. This is the development, improvement, and increasing ubiquity of freely available and powerful open access mathematical computing tools. Some important examples of this are Octave, Sage, Julia, Python with its packages such as NumPy, SciPy and SymPy; and R. The fact that all of these are free is impressive enough. What is more, they all have a widespread, diverse, and most of all, very dedicated community supporting them in order to insure a high quality product available to anyone anywhere at no financial cost. This is certainly the case with R.

Originally developed for statistical analyses and graphics, R is among the most popular and most powerful of the open source tools for mathematical computing. Together with an amazing number of user developed add-on packages and a variety of very well developed integrated development environments, R is as powerful and useful as any commercial mathematics or statistics software package. However, a newcomer to R, and in particular a student, may find it a bit intimidating to use. Brian Dennis’s The R Student Companion is meant to address this issue. And it does this successfully, especially for students with little background or experience in advanced mathematics or computer programming. A senior in high school or a first-year college student could easily pick up this book and immediately start doing interesting things with R.

What do you get out of Dennis’s book? You learn how to install R and add-on packages. You learn the basic syntax and discover how to make plots and do basic computations using R. A reader of this book will learn how to do some essential programming in R, and also see it applied to solve interesting example of real scientific problems. Indeed, The R Student Companion makes picking up R quick and easy.

Some of the nicest features of The R Student Companion are the end of chapter summaries and exercises, the available R code, and of course the already mentioned real world applications. I would strongly recommend for any student entering college intending to study a science-oriented field to learn R. If you want a resource to help, then The R Student Companion is certainly recommended.


Jason M. Graham is an assistant professor in the department of mathematics at the University of Scranton, Scranton, Pennsylvania. His current professional interests are in teaching applied mathematics and mathematical biology, and collaborating with biologists specializing in the collective behavior of groups of organisms.

Introduction: Getting Started with R
R Tutorial
Vectors
Graphs
Real-World Example
Final Remarks
Computational Challenges
References

R Scripts
Creating and Saving an R Script
Running an R Script
Finding Errors in an R Script
Sharpening Up Your Scripts with Comments
Real-World Example
Final Remarks
Computational Challenges
Reference

Functions
Creating New Functions in R
More about User-Defined R Functions
Real-World Example
Final Remarks
Computational Challenges
Afternotes (Short Remarks on Topics for Further Study)
References

Basic Graphs
Real-World Example
Graphs of One Variable
Graphs of Two Variables
Final Remarks
Computational Challenges
Afternotes

Data Input and Output
Data Frames in R
Final Remarks
Computational Challenges
Afternotes

Loops
Writing a "For-Loop"
Checking the Loop
OK, Mr. Fibonacci…So What?
Real-World Example
Final Remarks
Computational Challenges
References

Logic and Control
Logical Comparison Operators and Logical Vectors
Boolean Operations
Missing Data
More about Indexes
Conditional Statements
Real-World Example
Final Remarks
Computational Challenges
Afternotes
Reference

Quadratic Functions
Real-World Example
Final Remarks
Computational Challenges
References

Trigonometric Functions
Right Triangles
Trigonometric Functions
Right Triangles, Circles, and Radians
Properties of Trigonometric Functions
Polar Coordinates
Triangulation of Distances
Real-World Examples
Final Remarks
Computational Challenges
Afternotes

Exponential and Logarithmic Functions
Achieving Real Power
The Special Number e
The Number e in Applications
The Exponential Function
Exponential Growth
Logarithmic Functions
Logarithmic Scales
Real-World Examples
Final Remarks
Computational and Algebraic Challenges
References

Matrix Arithmetic
Another Way to Multiply Vectors
Matrix Multiplication
Matrix Addition and Subtraction
Reading a Data File into a Matrix
Real-World Example
Final Remarks
Computational Challenges
Afterwords
References

Systems of Linear Equations
Matrix Representation
Matrix Inverse
Inverse Matrices and System Solutions in R
Real-World Examples
Final Remarks
Computational Challenges
Afternotes
References

Advanced Graphs
Two-Dimensional Plots
Options for Styles of Symbols, Lines, Axes
Other Customizations
Multiple Panels
Three-Dimensional Plots
Color
Final Remarks
Computational Challenges
Reference

Probability and Simulation
Random Variables
Probability
Probability Distributions of Counts
Probability Distributions of Measurements
Real-World Example
Computational Challenges
Afternotes
References

Fitting Models to Data
Fitting a Quadratic Model
Multiple Predictor Variables
Nonlinear Statistical Models
Final Remarks
Computational Challenges
Afternotes
References

Conclusion—It Doesn’t Take a Rocket Scientist
Real Solar System Example
The Problem
The Concept
Changes in Velocities
Move the Earth
Getting Organized
Outline of R Script for Calculating the Trajectory of Earth
The R Script
Computational Challenges
Afternotes

Appendix A: Installing R
Appendix B: Getting Help
Appendix C: Common R Expressions
Index