Great Deal The R Book
I bought this book to use in a course by USGS. It is very good in that it provides samples from its website and a pretty complete text. It provides a good book to either read before or after presentations. A lot of the packages in r provide an easy way for getting answers rather the many functions Crawley writes. This provides a good learning process.
This methodology of showing functions to accomplish what can be done from a package is my only quarrel with the book when used as reference. Normally he writes function and in some but not all cases later gives the package function. It would have been nice to have the package defined earlier so that one doesn't have to flog through the section.
Overall it is an excellent book, good for the relative novice as well as the expert.
Could Do Worse - Bob - United States
I'll make this short and sweet: On the one hand, "The R Book" is a hugely encyclopedic reference to the R language. If there's something in the basic R language, it's probably in this book. On the other hand, this book is horribly organized and horribly written. It needs an editing job of epic proportions. Its disorganization and bad writing make it particularly poorly suited to the task of learning R. If you are an R user, this book probably belongs on your bookshelf somewhere. But make some room on that shelf for a few other, more helpful books, because this one is just not the place to learn R.
Look elsewhere; Not worth the high price. - David Winsemius -
I have been using R for about 5 years and for the last 2 years have I been using it regularly. This book might have helped at the early stages of learning R, but at the moment I have learned not to trust this text. I am now seeing questions on the r-help mailing list related to the disorganization that others have commented upon.
The problems start early. For Windows users he uses doubled backslashes without explaining why these are needed or the alternative. He gets the distinction between the two indexing operators wrong when he states that one does not use "[" with lists (and fails to note that dataframes are in point of fact lists.). After starting with the R concept of vectors, the author introduces functions which have list arguments before even describing either lists or the list() function. I could go on and on. Going much further on to the section on count data he compares a dataset to the theoretic Poisson distribution noting that the counts at the low and the high ranges are larger than expected, calling this "highly aggregated", whereas most statisticians would call this over-dispersed. In the next paragraph he makes the opposite statement but then says that the overly dispersed data "shows randomness". I was further bother by his frequent use of the dangerous practice of using attach and the confusing practice of naming objects using names that were also function names such as "exp" and "data". I get the sense that the R News reviewer gave up noting errors and decided instead to move quickly on to recommending "Modern Applied Statistics" by Venables and Ripley. I would also suggest Harrell's "Regression Modeling Strategies".
People sometimes complain that the R documentation in the help pages is difficult, but in my experience the R help pages are far more precise than Crawley's versions of R. I would avoid this book due to a) its disorganization, b) its misleading advice regarding R syntax, and c) its statistical errors. It probably has some value for its large number of worked examples but there are much better books available.
Rating : 4.0
Price on Aug 31, 2010 22:00:09 : $110.00
Offer Price : $50.98
Availability : Usually ships in 1-2 business days
Best Deal Today @ Amazon Check Price Now !
The R Book Overviews
The high-level language of R is recognized as one of the most powerful and flexible statistical software environments, and is rapidly becoming the standard setting for quantitative analysis, statistics and graphics. R provides free access to unrivalled coverage and cutting-edge applications, enabling the user to apply numerous statistical methods ranging from simple regression to time series or multivariate analysis.
Building on the success of the author’s bestselling Statistics: An Introduction using R, The R Book is packed with worked examples, providing an all inclusive guide to R, ideal for novice and more accomplished users alike. The book assumes no background in statistics or computing and introduces the advantages of the R environment, detailing its applications in a wide range of disciplines.
- Provides the first comprehensive reference manual for the R language, including practical guidance and full coverage of the graphics facilities.
- Introduces all the statistical models covered by R, beginning with simple classical tests such as chi-square and t-test.
- Proceeds to examine more advance methods, from regression and analysis of variance, through to generalized linear models, generalized mixed models, time series, spatial statistics, multivariate statistics and much more.
The R Book is aimed at undergraduates, postgraduates and professionals in science, engineering and medicine. It is also ideal for students and professionals in statistics, economics, geography and the social sciences.
Excerpts from Chapter 4 of The R Book
Chapter 4: Level Set Trees and Code
Learn how to make a volume plot and a barycenter plot, and calculate level set trees with the algorithm LeafsFirst, which is implemented in function ``leafsfirst''. This function takes as an argument a piecewise constant function object.
The multimodal 2D example
(Click on image to enlarge)
We consider the density shown in the 2D three-modal density, and calculate first a piecewise constant function object representing this function, and then calculate the level set tree.
N<-c(35,35) # size of the grid pcf<-sim.data(N=N,type="mulmod") # piecewise constant function lst.big<-leafsfirst(pcf) # level set treeWe may make the volume plot with the command ''plotvolu(lst)''. However, it is faster first to prune the level set tree, and then plot the reduced level set tree. Function ''treedisc'' takes as the first argument a level set tree, as the second argument the original piecewise constant function, and the 3rd argument ''ngrid'' gives the number of levels in the pruned level set tree. We try the number of levels ngrid=100.
lst<-treedisc(lst.big,pcf,ngrid=100)
Now we may make a volume plot with the function ''plotvolu''.
plotvolu(lst)
We draw barycenter plots with the function ''plotbary''.
plotbary(lst,coordi=2) # 2nd coordinate
Note: We may find the number and the location of the modes with the ''modecent'' function, which takes as argument a level set tree. Function ''locofmax'' takes as argument a piecewise constant function and calculates the location of the maximum.
modecent(lst) locofmax(pcf)The 3D tetrahedron example

(Click on image to enlarge)
We consider the 3-dimensional example. The calculation is much more time consuming this time.
N<-c(32,32,32) # the size of the grid pcf<-sim.data(N=N,type="tetra3d") # piecewise constant function lst.big<-leafsfirst(pcf) # level set tree lst<-treedisc(lst.big,pcf,ngrid=200) # pruned level set tree plotvolu(lst,modelabel=FALSE) # volume plot plotvolu(lst,cutlev=0.010,ptext=0.00045,colo=TRUE) # zooming coordi<-1 # coordinate, coordi = 1, 2, 3 plotbary(lst,coordi=coordi,ptext=0.0006) # barycenter plot
This time we have used parameter ''cutlev'' to make a zoomed volume plot. When this parameter is given, then only the part of the level set tree is shown which is above the value ''cutlev''. Typically it is better to zoom in to the volume plot by cutting the tails of the volume function away. This is achieved by the parameter ''xlim''. We may us for example the following command to make a ``vertically zoomed'' volume plot.
plotvolu(lst,xlim=c(140,220),ptext=0.00045, colo=TRUE,modelabel=FALSE)
Additional parameters which we have used are the ''modelabel'', which is used to suppress the plotting of the mode labels, ''ptext'', which lifts the mode labels with the given amount, and ''colo'', which colors the graph of the volume function to make a comparison with the barycenter plots easier.
The 4D pentahedron example
(Click on image to enlarge)
We consider the 4-dimensional example.
N<-c(16,16,16,16) pcf<-sim.data(N=N,type="penta4d") lst.big<-leafsfirst(pcf) lst<-treedisc(lst.big,pcf,ngrid=100) plotvolu(lst,modelabel=F) # volume plot plotvolu(lst,cutlev=0.0008,ptext=0.00039,colo=TRUE) # zooming coordi<-1 # coordinate, coordi = 1, 2, 3, 4 plotbary(lst,coordi=coordi,ptext=0.0003) # barycenter plot
Related Products
- Data Manipulation with R (Use R)
- Introductory Statistics with R (Statistics and Computing)
- Statistics: An Introduction using R
- A Beginner's Guide to R (Use R)
- Ecological Models and Data in R