R Cookbook
Publisher: O'Reilly Media
Final Release Date: March 2011
Pages: 438

With more than 200 practical recipes, this book helps you perform data analysis with R quickly and efficiently. The R language provides everything you need to do statistical work, but its structure can be difficult to master. This collection of concise, task-oriented recipes makes you productive with R immediately, with solutions ranging from basic tasks to input and output, general statistics, graphics, and linear regression.

Each recipe addresses a specific problem, with a discussion that explains the solution and offers insight into how it works. If you’re a beginner, R Cookbook will help get you started. If you’re an experienced data programmer, it will jog your memory and expand your horizons. You’ll get the job done faster and learn more about R in the process.

  • Create vectors, handle variables, and perform other basic functions
  • Input and output data
  • Tackle data structures such as matrices, lists, factors, and data frames
  • Work with probability, probability distributions, and random variables
  • Calculate statistics and confidence intervals, and perform statistical tests
  • Create a variety of graphic displays
  • Build statistical models with linear regressions and analysis of variance (ANOVA)
  • Explore advanced statistical techniques, such as finding clusters in your data

"Wonderfully readable, R Cookbook serves not only as a solutions manual of sorts, but as a truly enjoyable way to explore the R language—one practical example at a time."—Jeffrey Ryan, software consultant and R package author

Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
O'Reilly MediaR Cookbook
 
3.9

(based on 8 reviews)

Ratings Distribution

  • 5 Stars

     

    (4)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (1)

88%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (7)
  • Helpful examples (6)
  • Concise (4)
  • Well-written (4)

Cons

    Best Uses

    • Novice (6)
    • Intermediate (5)
    • Student (5)
      • Reviewer Profile:
      • Developer (5)

    Reviewed by 8 customers

    Sort by

    Displaying reviews 1-8

    Back to top

     
    4.0

    Great book for getting started with R

    By carstenj

    from Copenhagen, Denmark

    About Me Developer

    Verified Reviewer

    Pros

    • Easy to understand
    • Helpful examples

    Cons

      Best Uses

      • Intermediate
      • Novice

      Comments about O'Reilly Media R Cookbook:

      The statistical programming language R can be quite overwhelming for newcomers. There seems to be so many different ways of accomplish common tasks. Before you can start doing any kind of data analysis, you need to get data into R. In addition, once the data is available you might need to manipulate it to get it into the right form. All such basic and common tasks can be difficult in a new programming language. The R Cookbook is a wonderful resource for helping out with such issues.

      For anything besides most basic calculations, you need some data. The cookbook contains many recipes for reading data from various source files like CSV and HTML to more advanced stuff like fetching data from databases. Once you have the data in R you need to store and manipulate it in different data structures according to your needs. This is also covered. All recipes are organized in different themes making them easy to find. Please pay special attention to chapter 12 with useful tricks, which really do contain a number of quite useable tips.

      Do NOT buy this book if are looking for an introduction to statistics. The R Cookbook assumes knowledge of various basic statistic methods and algorithms and will only show you how to apply these methods and algorithms in R. If your focus is on learning various plotting techniques then the R Graphics Cookbook also from O`Reilly might be more appropriate.

      I review for the O`Reilly Reader Review Program and I want to be transparent about my reviews so you should know that I received a free copy of this eBook in exchange of my review.

       
      1.0

      Do not buy this trash

      By PaE

      from BKK

      Verified Reviewer

      Comments about O'Reilly Media R Cookbook:

      I bought this book with the hope this book can explain the function explicitly and thoroughly. This is not for you.

      For example, in page 154, attach(suburbs) .... this can't be accomplished because the author never told in the book how to get the data!!!

      I tried searching for the data that the book referred, but nothing found!!

      Compared to R graphics cookbook by Chang, This book is inferior to that book in every dimension. In R graphics cookbook, Chang starts by telling reader to install package "ggplot2 and cookbook". So, no problem for reader to catch up.

      Trust me, do not buy this trash. Everything this book mention is free on internet and easy to get data to mimic.

      (5 of 9 customers found this review helpful)

       
      2.0

      Valuable Tool

      By pcsnow

      from Seattle, WA

      About Me Developer

      Verified Reviewer

      Pros

      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

      • Examples Are Not Availabl

      Best Uses

        Comments about O'Reilly Media R Cookbook:

        I took a course in data mining and found that this book was my most valuable resource with the exception of "R in a Nutshell". I really liked the explanations and the examples. I downgraded my rating because this book unlike most O'Reilly programming books does not provide code for the examples. I wanted to run the examples 12.12 and 12.13 which describe sorting syntax. It was a pain that these examples could not be provided. It seems that some O'reilly books now are requiring purchasers of the book to also buy Safari access as well. Guess, it's just business. My usage did not focus on statistics but on manipulation of files. There are lots of other sections that treat those topics as well.

        (3 of 3 customers found this review helpful)

         
        4.0

        Useful R for Statistical Courses

        By Eder Andrés Ávila Niño

        from Paipa, Colombia

        About Me Developer

        Verified Reviewer

        Pros

        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Novice
          • Student

          Comments about O'Reilly Media R Cookbook:

          This is a book about how to use the R programming language to solve several statistical problems like combinations, probabilities, frequencies, quantiles, means, correlations, regressions and ANOVA analysis, and as a plus, time series analysis. This cookbook is perfect to students and professors looking for a computing tool that helps them to understand and teach statistical courses, respectively. That's because many times it is important to solve complex exercises that shows the several applications that a statistical topic, like the normal distribution, has in surveys, engineering, manufacturing and commerce, which implies performing several activities related to data retrieval, storage, processing, analysis and visualization.

          This cookbook explains the how-to of such activities providing a catalog of tasks to accomplish each of these, for example, how to read and write CVS files, prepare the data contained in those files, generate random samples, calculate the probability of X, test for normality, perform linear regressions and plot the histogram. Each task is described following this structure: Problem, Solution, Discussion and See Also, being the Discussion section the valuable resource of the R Cookbook, because this section explains the implications of using the given solution together with some tips and tricks. Those implications, tips and tricks makes the difference between the R Cookbook and a raw Internet search, so students and professors can learn about the rationale of a solving a statistical problem with R, not just the syntax of variables and functions.

          However, it is important to clarify that the R Cookbook is not a book for learning the essence of statistics; instead the R Cookbook is a suggested companion resource for the course main textbook. The R Cookbook will help the explanation and understanding of the core topics, exercises and applications, and simulate different problem scenarios.

          Finally and personally, I'd like to see a second edition, volume or update to include how to solve operations research problems using R, if possible. For instance, simplex method, duality, transport and network problems, and inventory and queuing systems are the most common ones in operations research.

          Note: This review is in exchange of the O'Reilly Bloggers Review Program (oreilly.com/bloggers).

          (2 of 3 customers found this review helpful)

           
          5.0

          Great Book on R

          By Joe

          from Los Angeles, CA

          About Me Educator

          Pros

          • Concise
          • Easy to understand
          • Helpful examples

          Cons

            Best Uses

            • Intermediate
            • Novice
            • Student

            Comments about O'Reilly Media R Cookbook:

            I'm in the process of porting the statistics projects I assign to my students over to R. This book has made the process almost effortless. The book is organized wisely and the explanations and code are easily understood. Separated into chapters based on the kinds of things that can be done with R, this book helps you quickly get the job done you need to do. Both input and output are clearly shown, with a brief explanation based on the statistics behind it all.

            I think it's especially useful to students who've been given a statistical analysis to do and who can use the book to figure out how to do that analysis in R. The book shares one of the reasons for using R;i.e., the ability to further explore the data by building on what we learn from previous analyses of the data. Both R and this book make it very easy to say things like, "If you split the data by gender, can you see any significant differences based on gender?"

            I'd quibble a little with his explanation of the confidence interval for the mean. On p. 197 he obtains a confidence interval and says there is a 95% probability that the mean is in that interval, which I think is not quite right. Either the mean is in there or it's not! However, if we found the confidence interval 100 times using the t.test, then the mean would be in about 95 of those intervals,which I think is saying things slightly differently.

            (3 of 3 customers found this review helpful)

             
            5.0

            A Cookbook For Data Analysis

            By shawnday

            from Dublin, Ireland

            About Me Developer, Educator

            Verified Reviewer

            Pros

            • Accurate
            • Concise
            • Easy to understand
            • Helpful examples
            • Well-written

            Cons

              Best Uses

              • Expert
              • Intermediate
              • Novice
              • Student

              Comments about O'Reilly Media R Cookbook:

              The R Cook­book by Paul Tee­tor is a solid addi­tion to the well respec­ted series. Tee­tor provides a rich col­lec­tion of use­ful examples writ­ten in the proven method and cov­er­ing everything from installing, con­fig­ur­ing and run­ning R to car­ry­ing out soph­ist­ic­ated stat­ist­ical ana­lysis tasks that demon­strate the power of R. The book is tar­geted at a wide audi­ence from R novice eager to just start play­ing in R to more exper­i­enced prac­ti­tion­ers look­ing to hone and round out their R rep­er­toire. It can be used as an intro­duct­ory train­ing source for those who like to learn by doing and extra­pol­at­ing know­ledge from examples. It also has the use­ful abil­ity of func­tion as a ref­er­ence source when plot­ting a par­tic­u­lar R exercise.
              The prob­lem — solu­tion — dis­cus­sion pat­tern works well when the prob­lem is clearly and con­cisely stated as Tee­tor does. As the book pro­gresses it does move towards more advanced stat­ist­ical manip­u­la­tion and ana­lysis, but then if you are using R in the first place then this is a fairly safe assump­tion. This is one of the more not­able cook­book series for the thor­ough­ness of the dis­cus­sion. The inclu­sion of philo­soph­ical notes, para­meter and options sec­tions when neces­sary and finally the cross-indexing via the more inform­a­tion sec­tion set this book apart as a superb ref­er­ence. In con­junc­tion with the R in a Nut­shell which was reviewed earlier, there are indis­pens­able tools for the bud­ding R enthu­si­ast and in con­junc­tion with the freely access­ible R ref­er­ence manu­als from the Found­a­tion form the optimal R lib­rary.
              My only gripe is that there is less focus in this book on the visu­al­isa­tion end of R. That is not to say that there not vis exer­cises in the book. Simply that it is heav­ier on the ana­lysis end on the lan­guage which is actu­ally well and good as this is cru­cial to the lat­ter and an area that I for one need the instruc­tion.
              This cook­book does not expect read­ers to arrive with extens­ive R know­ledge and as I men­tioned earlier is tar­geted for a broad audi­ence of R practitioners.

               
              5.0

              Paul Teetor brings R to the masses

              By PLSVN

              from Houston, TX

              Verified Reviewer

              Pros

              • Easy to understand
              • Helpful examples
              • Well-written

              Cons

                Best Uses

                • Novice
                • Student

                Comments about O'Reilly Media R Cookbook:

                Paul Teetor finally brings R to the masses! I've struggled for several months now to learn R on my own from a non-statistical background. I've struggled through several other books on R, but they never read as easily as Teetor's R Cookbook does. Coupled with O'Reilly's R in a Nutshell, if you have Teetor's R Cookbook on your bookshelf, too, R becomes a practical, useful, software tool you can become comfortable with.... even with R's steep learning curve. Teetor knocks the learning curve down to size!
                Hint: 2nd edition needs more Time Series discussion!

                (2 of 2 customers found this review helpful)

                 
                5.0

                Simple, yet powerful

                By Michal Konrad Owsiak

                from Poland

                About Me Developer

                Verified Reviewer

                Pros

                • Accurate
                • Concise
                • Easy to understand

                Cons

                  Best Uses

                  • Intermediate
                  • Novice
                  • Student

                  Comments about O'Reilly Media R Cookbook:

                  Simply put, one of the best R starters around. What you get here are recipes for most common problems you will face while working with R. This book is an extended version of 25 Recipes for Getting Started with R. However, the coverage of material is different. While 25 Recipes focus on getting started with R, R Cookbook penetrates the subject in greater details and goes beyond simple usage of R. You will find here not only how to load data, manipulate it and plot some graphic. You can find description of various statistical analysis as well.

                  This book, is not for a reading in bed just before you go to sleep. It is too pragmatic. Simple definition of the problem and just after that, simple solution – that's what you get when it comes to each issue covered within the book. This is the strength of R Cookbook. On the other hand, it's weakness. If you cant find the question within table of contents it might be hard to get the answer for what you ask about. As I like pragmatic approach, I like the book as well. For me it's just perfect. Well, maybe just too short.

                  Displaying reviews 1-8

                  Back to top

                   
                  Buy 2 Get 1 Free Free Shipping Guarantee
                  Buying Options
                  Immediate Access - Go Digital what's this?
                  Ebook: $33.99
                  Formats:  DAISY, ePub, Mobi, PDF
                  Print & Ebook: $43.99
                  Print: $39.99