O'Reilly logo

R For Dummies, 2nd Edition by Joris Meys, Andrie de Vries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13

Manipulating and Processing Data

In This Chapter

arrow Creating subsets of data

arrow Adding calculated fields

arrow Merging data from different sources

arrow Sorting data

arrow Meeting more members of the apply family

arrow Getting your data into shape

Now it’s time to put together all the tools you've seen in earlier chapters. You know how to get data into R, you know how to work with lists and data frames, and you know how to write functions. Combined, these tools form the basic toolkit to be able to do data manipulation and processing in R.

In this chapter, you use some tricks and design idioms for working with data. This includes methods for selecting and ordering data, such as working with lookup tables. You also use some techniques for reshaping data — for example, changing the shape of data from wide format to long format.

Deciding on the Most Appropriate Data Structure

The first decision you have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required