The Art of R Programming

(WallPaper) #1
included a discussion of design alternatives, answering the question
“Why did we do it this way?”


  • The material is approached with a programmer’s sensibilities in mind.
    For instance, in the discussion of data frames, I not only state that a data
    frame is an R list but also point out the programming implications of
    that fact. Comparisons of R to other languages are also brought in when
    useful, for those who happen to know other languages.

  • Debugging plays a key role when programming in any language, yet it is
    not emphasized in most R books. In this book, I devote an entire chap-
    ter to debugging techniques, using the “extended example” approach
    to present fully worked-out demonstrations of how actual programs are
    debugged.

  • Today, multicore computers are common even in the home, and
    graphics processing unit (GPU) programming is waging a quiet revo-
    lution in scientific computing. An increasing number of R applications
    involve very large amounts of computation, and parallel processing has
    become a major issue for R programmers. Thus, there is a chapter on
    this topic, which again presents not just the mechanics but also extended
    examples.

  • There is a separate chapter on how to take advantage of the knowledge
    of R’s internal behavior and other facilities to speed up R code.

  • A chapter discusses the interface of R to other languages, such as C and
    Python, again with emphasis on extended examples as well as tips on
    debugging.


My Own Background


I come to the R party through a somewhat unusual route.
After writing a dissertation in abstract probability theory, I spent the
early years of my career as a statistics professor—teaching, doing research,
and consulting in statistical methodology. I was one of about a dozen pro-
fessors at the University of California, Davis who founded the Department
of Statistics at that university.
Later I moved to the Department of Computer Science at the same
institution, where I have since spent most of my career. I do research in
parallel programming, web traffic, data mining, disk system performance,
and various other areas. Much of my computer science teaching and
research involves statistics.
Thus, I have the points of view of both a “hard-core” computer scientist
and of a statistician and statistics researcher. I hope this blend enables this
book to fill a gap in the literature and enhances its value for you, the reader.

Introduction xxiii
Free download pdf