O'Reilly logo

R Recipes: A Problem-Solution Approach by Larry A. Pace

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 3

image

Data Structures

As a refresher, the basic data structures in R are vectors, matrices, lists, and data frames. Remember R does not recognize a scalar quantity, instead treating that quantity as a vector of length 1. In Chapter 3, you will learn what you need to know about working with the various data structures in R.

Recipe 3-1. How to Work with Vectors

Problem

Vectors were introduced in Chapter 1, and were described as the fundamental data type in R. In Recipe 3-1, you will learn more about working with vectors, adding and deleting elements, and subsetting vectors. You will also learn more about how vectors relate to other data types ...

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