Skip to main content
  • Book
  • © 2008

Data Manipulation with R

Authors:

  • Provides guidance on getting data into R from text files, web pages, spreadsheets, databases and other sources.
  • Demonstrates techniques that use core features of the R language, and are scalable and efficient.
  • Covers many built in functions along with selected packages from CRAN.
  • Includes supplementary material: sn.pub/extras

Part of the book series: Use R! (USE R)

Buy it now

Buying options

eBook USD 69.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (9 chapters)

  1. Front Matter

    Pages i-ix
  2. Data in R

    Pages 1-11
  3. R and Databases

    Pages 43-56
  4. Dates

    Pages 57-66
  5. Factors

    Pages 67-74
  6. Subscripting

    Pages 75-85
  7. Data Aggregation

    Pages 101-130
  8. Reshaping Data

    Pages 131-147
  9. Back Matter

    Pages 149-152

About this book

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.

Reviews

From the reviews:

"This comprehensive, compact and concise book provides all R users with a reference and guide to the mundane but terribly important topic of data manipulation in R. … This is a book that should be read and kept close at hand by everyone who uses R regularly."(Douglas M. Bates, International Statistical Reviews, Vol. 76 (2), 2008)

"Presents a wide array of methods applicable for reading statistical data into the R program and efficiently manipulating that data." (Journal of Economic Literature, Vol. 46, no. 3, September 2008)

"R is a programming language particularly suitable for statistical computing and data analysis. … Using a variety of examples based on data sets included with R, along with easily stimulated data sets, the book is recommended to anyone using R who wishes to advance from simple examples to practical real-life data manipulation solutions." (Christina Diakaki, Zentralblatt MATH, Vol. 1154, 2009)

"The book contains much good information regarding the unique way in which R manipulates data objects. lt provides a complement to the many books illustrating statistical applications of R. It is clear that the author is very familiar with R. and the explanations and illustrations are generally helpful. Personally, I found the chapters on reading and writing data and on data aggregation most helpful, because these topics are essential in exploring data." (Jim Albert, The American Statistician, May 2009, Vol. 63, no. 2)

“Readers of this book will receive a focused treatment of data manipulation … . This book has lots of examples which are helpful. … provides more depth to understand the data structure/objects within R and how to better take advantage of this structure. … I found this book very helpful to my understanding of the structure and will be using it as a reference tool in my work.” (Roger M. Sauter, Technometrics, Vol. 52 (3), August,2010)

Authors and Affiliations

  • University of Califonia, Berkeley, Berkeley, USA

    Phil Spector

Bibliographic Information

Buy it now

Buying options

eBook USD 69.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access