`S Programming' by W.N. Venables & B.D. Ripley ============================================== Errata and comments for the third printing (January 2004). 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. 26 (footnote 18). R has a method for as.matrix() to make a full matrix from the results of dist. 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. 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. 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. 181 `R modes' for other editors have been produced: see Software->Other on CRAN. 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. 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. 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. 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.