Chapter 4
Getting Started with Arithmetic
In This Chapter
Using R as a fancy calculator
Constructing and working with vectors
Vectorizing your calculations
Statistics isn’t called applied mathematics just for the fun of it. Every statistical analysis involves a lot of calculations, and calculation is what R is designed for — the work that it does best.
R goes far beyond employing the classic arithmetic operators. It also contains sets of operators and functions that work on complete vectors at the same time. If you’ve read Chapter 3, you’ve gotten a first glimpse into the power of vectorized functions. In this chapter, you discover the full power of vectorization, using it to speed up calculations and perform complex tasks with very little code.
Working with Numbers, Infinity, and Missing Values
In many low-level computer ...
Get R For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.