Chapter 2. Creating a dataset

 

This chapter covers
  • Exploring R data structures
  • Using data entry
  • Importing data
  • Annotating datasets

 

The first step in any data analysis is the creation of a dataset containing the information to be studied, in a format that meets your needs. In R, this task involves the following:

  • Selecting a data structure to hold your data
  • Entering or importing your data into the data structure

The first part of this chapter (sections 2.12.2) describes the wealth of structures that R can use for holding data. In particular, section 2.2 describes vectors, factors, matrices, data frames, and lists. Familiarizing yourself with these structures (and the notation used to access elements within them) will help you tremendously ...

Get R in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.