5

Working with Numbers

Variables are quantitative when they quantify a measurement of something. Numbers are the representation of those measurements, which will most likely vary for each observation and start to create variation patterns that can tell us you a lot about a subject.

In this chapter, we will work with numbers, learning how to handle them in vectors, matrices, or data frames, since there are differences in terms of dimensions and functions available for each data type.

Once we have that covered, it is then time to see how to do math operations in RStudio, not only using basic functions but also creating custom functions, which we will apply to numbers, making our set of tools more powerful so we can deal with many kinds of problems. ...

Get Data Wrangling with R 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.