O'Reilly logo

Data Manipulation with R - Second Edition by Jaynal Abedin, Kishor Kumar Das

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 2. Basic Data Manipulation

When preparing a dataset for statistical analysis, data processing and manipulations, such as checking, cleaning, and creating new variables, are two important tasks. In this chapter, the basics of data manipulation will be discussed with examples that will give us an idea about checking a dataset, and cleaning it, if necessary.

This chapter will deal with the following topics:

  • Acquiring data
  • Vector and matrix operations
  • Factor manipulations
  • Factors from numeric variables
  • Date processing using lubridate
  • Character and string manipulations
  • Subscripting and subsetting datasets

Acquiring data

A dataset can be stored in a computer or any other storage device, in different file formats. R provides the useful facility, to access ...

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