`S Programming' by W.N. Venables & B.D. Ripley ============================================== Errata and comments for the second printing (May 2001). p. vi The S-PLUS address is now http://www.insightful.com/ p. 3 The developers of S-PLUS have demerged from MathSoft and are now known as the Insightful Corporation, S-PLUS versions 6.0 and 6.1 for both Unix/Linux and Windows are current, with a common code base. The fourth (2002) edition of MASS covers both S-PLUS and R, so has no `R Complements'. p. 17 The precedence in R is slightly different: & and && have a higher precedence than | and ||. p. 18 Recycling rule: see also the foot of p. 27. p.40 footnote: it seems that old S and R name the list, and new S does not: R documents what it does but neither S dialect does. p. 81 last display, add ... as in Ttest.matrix <- function(z, ...) Ttest(z[, 1], z[, 2], ...) Ttest.list <- function(z, ...) Ttest(z[[1]], z[[2]], ...) R changes ========= As R has developed, it has adopted a number of the features of S4. As from R 1.7.0 the S4 class system is available by default, although as in S-PLUS 5/6, it is not widely used. p. 8 As from R 1.7.0 all objects in R have a reported class just as in the new S engine. p. 16 (footnote 11). R no longer converts logical columns in data frames. p. 17 help(Syntax) now gives the precedence table in R, too. p. 21 identical() and is.na<- are now both in R. p. 26 (footnote 18). R has a method for as.matrix() to make a full matrix from the results of dist. p. 27 As from R 1.4.0, R has the same rule for zero-length vectors as the new S engine. p. 29 R now has colMeans, colSums, rowMeans and rowSums. p. 30 The replacement function substring<- is now also in R. p. 48 restart() has been removed from R in favour of try(). p. 59 R 1.6.0 introduced `namespaces' for the base package. From objects in a namespace the search order is slightly different: the namespace is searched before the user's workspace .GlobalEnv. This means that when searching for object from a function defined in base, it is impossible to mask the definitions of objects in the base package. As from R 1.7.0 several other packages have namespaces, and not all objects in the package are `exported', that is visible except to other objects in the package. p. 77 As from R 1.7.0, UseMethod uses the class as reported by class(), not just the class attribute. This means it dispatches to classes such as "matrix" and "numeric". However, members of the group generics, such as the binary operators, dispatch only on the class attribute, for efficiency. p. 79 In the definition of Ttest the call to data.class is no longer needed, so this function could be just Ttest <- function(z, ...) UseMethod("Ttest") p. 99 R also has a version of the S4 formal class system available in its package `methods' (from 1.4.0), and from 1.7.0 this is loaded by default. There are some small differences (for example, class "named" is not used). p. 127 As from R 1.2.0, objects are _not_ moved during garbage collection. p. 131 It is important not to mix calls to malloc/free and Calloc/Free. These may use different memory allocators (and on the Windows port they do in R >= 1.2.0). p. 136 R now has rwarn and rexit to be called from Fortran, equivalent to warning() and stop() respectively. p. 145 PROTECTed objects are no longer moved in memory. p. 166 footnote 5. integrate() in R 1.3.0 and later is compatible with S-PLUS's. p. 181 `R modes' for other editors have been produced: see Software->Other on CRAN. p. 182 Table 8.1: R now has debugger(). p. 183 Post-mortem debugging is available in R nowadays. p. 185 options(error=dump.frames) works as from R 1.3.0. p. 200 It is often easiest to let `R CMD build mypkg' build the indices, possibly editing them afterwards. p. 201 It is often easiest to use Rcmd INSTALL and Rcmd build to install and bundle-up packages, respectively. p. 245 globalvar.h is no longer used. p. 249 Both RGui and Rterm save the history in file .Rhistory if and only if the workspace is saved, in the same way as R under Unix. p. 250 R_NSIZE and R_VSIZE are no longer used. p. 254 R under Windows has Rcmd BATCH S-PLUS changes ============== The following are changes that have been made for S-PLUS 6.x for Unix or Windows. In the interests of efficiency these versions are often stricter, so some S3 constructions no longer work. p. 6 The set of letters allowed in syntatic names is locale-dependent as from S-PLUS 6.1. p. 30 As from 6.1, the collating sequence is that of the locale. p. 54 There is a new function sys.time() under Windows which returns a two-element vector giving the total cpu time (NA on 95/98/ME) and the elapsed time in seconds. p. 79 In the definition of Ttest replace class(x) by oldClass(x). p. 133 is now included by under Windows unless NO_NEWIO is defined, so the programmer need take no action. p. 135f The is_na mode constants like DOUBLE have been renamed to e.g. S_MODE_DOUBLE. p. 149 We believe all current versions of S-PLUS do use an ISO (aka ANSI) C compiler. p. 159 For() is implemented in S-PLUS 6.1 for Windows but very incompletely documented and fails on our example. p. 181 S-PLUS 6.x for Windows also has script windows with some formatting features. Sections 8.3 and 8.4 The way on-line help is handled has changed: see our on-line complements for S-PLUS 6 for Windows. p. 205 The preferences are in directory .prefs not _Prefs in S-PLUS 6.x for Windows. p. 213 An object explorer is also used in 6.x. p. 227 The type library is now called sp6oj.tlb. Section A.4 For the revised procedures under versions 6.x, see the on-line complements.