Chapter 2 Import data and check for problems

In this chapter, you will learn to:

  • Load an R dataset,
  • Import data from other formats,
  • Inspect the data to look for anomalies,
  • Save a dataset in R format.

This Chapter assumes that you have created an R Project (see Section 1.3.10) and are running the code below from within that Project. This chapter also assumes you have a folder called “Data” in your R Project folder and data files you will load() are placed in that folder.

DO: Open RStudio in your R Project by opening the associated .Rproj file or from within RStudio select File – Open Project and browse to select the .Rproj file. If you have not already done so, create a subfolder called “Data” in the same location as your R Project and place any data files referred to in this book in that subfolder.