Data Manipulation with R
Part of the Use R! series
The R language provides a rich environment for working with data, especially data to be used for statistical modeling or graphics.
Coupled with the large variety of easily available packages, it allows access to both well-established and experimental statistical techniques.
However techniques that might make sense in other languages are often very ine?cient in R, but, due to R's ?- ibility, it is often possible to implement these techniques in R.
Generally, the problem with such techniques is that they do not scale properly; that is, as the problem size grows, the methods slow down at a rate that might be unexpected.
The goal of this book is to present a wide variety of data - nipulation techniques implemented in R to take advantage of the way that R works,ratherthandirectlyresemblingmethodsusedinotherlanguages.
Since this requires a basic notion of how R stores data, the ?rst chapter of the book is devoted to the fundamentals of data in R.
The material in this chapter is a prerequisite for understanding the ideas introduced in later chapters.
Since one of the ?rst tasks in any project involving data and R is getting the data into R in a way that it will be usable, Chapter 2 covers reading data from a variety of sources (text ?les, spreadsheets, ?les from other programs, etc. ), as well as saving R objects both in native form and in formats that other programs will be able to work with.