Errata

All errata


Page 32: The book was built with sp version 0.9-24. From sp version 0.9-29, rownames on the input matrix of coordinates if they are present are preserved in SpatialPoints objects, and are displayed when the coordinates are printed. This changes the appearance of the tabulation of the coordinates subset in the middle of the page. Thanks to Mic Jackson for reporting the change.
Page 39: The line of code "library(maptools)" in the central code chunk is not visible and should be. Thanks to Jerry Davis for reporting the omission.
Page 43: Between mid December 2009 and the release of sp version 0.9-61 in March 2010 (sp releases 0.9-56, 0.9-57, 0.9-59, 0.9-60), a function introduced in R 2.9.1 (anyDuplicates) was used without version protection. This means that for those sp versions and R < 2.9.1, the SpatialPolygon construction code at the foot of the page (and elsewhere) did not run. Either return to sp version 0.9-52, or upgrade R to 2.9.1 or later. Thanks to Larry Winner and a participant on a course in Toulouse for reporting the problem.
Page 45: Sometime during 2010, the book code and the downloadable code diverged as a response to changes in sp. The changes had the effect of removing the previous behaviour of automatically subsetting data.frames to match Polygons objects, and the second sentence on the page should now read: "Here, we subset to the matched rows of the data frame, to ensure that one row corresponds to each Polygons object:". Thanks to Alex Bigazzi for reporting the problem.
Pages 49-52: From sp version 0.9-94 (January 2012), the class definition of SpatialGrid objects loses "coords" and "grid.index" slots.


Page 58: Changes in class definitions and image methods led to the bottom right panel of Figure 3.1 being wrongly plotted. The code in vis_mod.R has been updated to correct the problem reported by ZhiJie Zhang. Page 59: Top of page - from sp version 0.9-66, Lines objects must be give a valid ID; changed to m.sl <- SpatialLines(list(Lines(list(Line(cc)), "1"))). Page 71: The code for Figure 3.11, first panel, as published on the website was broken in the sp package 0.9-29 update, which forced colour regions for factors to have the same number of values as the number of levels in the factor. The vis_mod.R file has been changed and now runs with earlier and current sp package versions.


Page 84: URL for Grids & Datums (footnote 10) is now http://www.asprs.org/Grids-Datums.html. Page 90: footnote 17: http://web1.sph.emory.edu/users/lwaller/WGindex.htm Pages 90 and 92: The CRS in the middle of the pages has an omitted + before ellps.


Page 169: The adapt package has been replaced by the cubature package for license reasons; changes applied to online chapter code. Page 181: For mgcv version 1.5-2 only, Spatial*DataFrame objects cannot be used as values for the gam() data= argument - coerce to data.frame first. Pages 161, 162 and 172: The code lines in cbind() giving name DATASET should give name y; downloadable code updated.


Page 245: spdep now uses the deldir package rather than tripack for license reasons.


Page 297, 299: For mgcv version 1.5-2 only, Spatial*DataFrame objects cannot be used as values for the gam() data= argument - coerce to data.frame first.


Page 344: The version of the splancs package used for building the book was 2.01-24, not 2.01-23 - this affects Figure 7.10 on page 177, which cannot be reproduced with the earlier version.