Dear Emacs, please make this -*-Text-*- mode! ************************************************** * * * 1.4 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.4.0 USER-VISIBLE CHANGES [This is a new section to highlight changes in behaviour, which may be given in more detail in the following sections. Many bug fixes are also user-visible changes.] o The default save format has been changed, so saved workspaces and objects cannot (by default) be read in earlier versions of R. o The number of bins selected by default in a histogram uses the correct version of Sturges' formula and will usually be one larger. o data.frame() no longer converts logical arguments to factors (following S4 rather than S3). o read.table() has new arguments `nrows' and `colClasses'. If the latter is NA (the default), conversion is attempted to logical, integer, numeric or complex, not just to numeric. o model.matrix() treats logical variables as a factors with levels c(FALSE, TRUE) (rather than 0-1 valued numerical variables). This makes R compatible with all S versions. o Transparency is now supported on most graphics devices. This means that using par("bg"), for example in legend(), will by default give a transparent rather than opaque background. o [dpqr]gamma now has third argument `rate' for S-compatibility (and for compatibility with exponentials). Calls which use positional matching may need to be altered. o The meaning of spar = 0 in smooth.spline() has changed. o substring() and substring()<- do nothing silently on a character vector of length 0, rather than generating an error. This is consistent with other functions and with S. o For compatibility with S4, any arithmetic operation using a zero-length vector has a zero-length result. (This was already true for logical operations, which were compatible with S4 rather than S3.) o undoc() and codoc() have been moved to the new package `tools'. o The name of the site profile now defaults to `R_HOME/etc/Rprofile.site'. o The startup process for setting environment variables now first searches for a site environment file (given by the environment variable `R_ENVIRON' if set or `R_HOME/etc/Renviron.site' if not), *and* then for a user `.Renviron' file in the current or the user's home directory. o Former stars(*, colors = v) must now be stars(*, col.segments = v). o The default methods for La.svd and La.eigen have changed and so there may be sign changes in singular/eigen vectors, including in cancor, cmdscale, factanal, princomp and varimax. NEW FEATURES o Transparency is now supported on most graphics devices. Internally colors include an alpha channel for opacity, but at present there is only visible support for transparent/opaque. The new color "transparent" (or NA or "NA") is transparent, and is the default background color for most devices. Those devices (postscript, XFig, PDF, Windows metafile and printer) that previously treated bg = "white" as transparent now have "transparent" as the default and will actually print "white". (NB: you may have bg = "white" saved in .Postscript.options in your workspace.) o A package `methods' has been added, containing formal classes and methods ("S4" methods), implementing the description in the book "Programming with Data". See "?Methods" and the references there for more information. - In support of this, the "@" operator has been added to the grammar. - Method dispatch for formal methods (the standardGeneric function), is now a primitive. Aside from efficiency issues, this allows S3-style generics to also have formal methods (not really recommended in the long run, but it should at least work). The C-level dispatch is now implemented for primitives that use either DispatchGroup or DispatchOrEval internally. - A version of the function "plot" in the methods package has arguments "x" and "y", to allow methods for either or both. See "?setMethod" for examples of such methods. - The methods package now uses C-level code (from within DispatchOrEval) to dispatch any methods defined for primitive functions. As with S3-style methods, methods can only be defined if the first argument satisfies is.object(x) (not strictly required for formal methods, but imposed for now for simplicity and efficiency). o Changes to the tcltk package: - New interface for accessing Tcl variables, effectively making the R representations lexically scoped. The old form is being deprecated. - Callbacks can now be expressions, with slightly unorthodox semantics. In particular this allows bindings to contain "break" expressions (this is necessary to bind code to e.g. Alt-x without having the key combination also insert an "x" in a text widget.) - A bunch of file handling and dialog functions (previously only available via tkcmd) have been added o The "?" operator is now an actual function. It can be used (as always) as a unary operator (?plot) and the grammar now allows it as a binary operator, planned to allow differentiating documentation on the same name but different type (class?matrix, for example). So far, no such documentation exists. o New methods AIC.default() and logLik.glm(), also fixing AIC(). o axis.POSIXct() allows the label date/times to be specified via the new `at' argument. o arrows() now allows length = 0 (and draws no arrowheads). o Modifications to the access functions for more consistency with S: arguments `name', `pos' and `where' are more flexible in assign(), exists(), get(), ls(), objects(), remove() and rm(). o Three new primitive functions have been added to base: dataClass(), objWithClass(), and as.environment(). The first two are support routines for class() and class<-() in package methods. The third replaces pos.to.env() in the functions get(), exists(), and friends. o barplot() now respects an inline `cex.axis' argument and has a separate `cex.names' argument so names and the numeric axis labels can be scaled separately. Also, graphics parameters intended for axis() such as `las' can now be used. o Shading by lines added to functions barplot(), hist(), legend(), piechart(), polygon() and rect(). o bxp() has a show.names argument allowing labels on a single boxplot; it and hence boxplot() now makes use of pch, cex, and bg for outlier points(). bxp() and boxplot() also have an argument `outline' to suppress outlier drawing {S-PLUS compatibly}. o New capabilities() options "GNOME" and "IEEE754". o New function casefold(), a wrapper for tolower/toupper provided for compatibility with S-PLUS. o contour() is now generic. o cor.test() in package ctest now also gives an asymptotic confidence interval for the Pearson product moment correlation coefficient. o data(), demo() and library() now also return the information about available data sets, demos or packages. Similarly, help.search() returns its results. o density() allows `bw' or `width' to specify a rule to choose the bandwidth, and rules "nrd0" (the previous default), "nrd", "ucv", "bcv", "SJ-ste" and "SJ-dpi" are supplied (based on functions in package MASS). o df.residual() now has a default method, used for classes "lm" and "glm". o New argument `cacheOK' to download.file() to request cache flushing. All methods for download.file() do tilde-expansion on the path name. The internal download.file() etc now allow URLs of the form ftp://user@foo.bar/ and ftp://user:pass@foo.bar/ o duplicated() and unique() are now generic functions with methods for data frames (as well as atomic vectors). o factanal() and princomp() use napredict() on their scores, so na.action = na.exclude is supported. o Function getNativeSymbolInfo() returns details about a native routine, potentially including its address, the library in which it is located, the interface by which it can be called and the number of parameters. o Functions such as help() which perform library or package index searches now use NULL as default for their `lib.loc' argument so that missingness can be propagated more easily. The default corresponds to all currently known libraries as before. o Added function file.rename(). o hist.default() allows `breaks' to specify a rule to choose the number of classes, and rules "Sturges" (the previous default), "Scott" and "FD" (Freedman-Diaconis) are supplied (based on package MASS). o Function identical(), a fast and reliable way to test for exact equality of two objects. o New generic function is.na<-(), from S4. This is by default equivalent to x[value] <- NA but may differ, e.g. for factors where "NA" is a level. o is.xxx reached through do_is are now generic. o La.eigen() and La.svd() have new default methods to use later (and often much faster) LAPACK routines. The difference is most noticeable on systems with optimized BLAS libraries. o length() is now generic. o New function .libPaths() for getting or setting the paths to the library trees R knows about. This is still stored in .lib.loc, which however should no longer be accessed directly. o Using lm/glm/... with `data' a matrix rather than a data frame now gives a specific error message. o loess(), lqs(), nls() and ppr() use the standard NA-handling and so support na.action = na.exclude. o mahalanobis() now has a `tol' argument to be passed to solve(). o mean() has `data frame' method applying mean column-by-column. When applied to non-numeric data mean() now returns NA rather than a confusing error message (for compatibility with S4). Logicals are still coerced to numeric. o The formula interface to mosaicplot() now allows a contingency table as data argument. o new.env() is now internal and allows you to set hashing. Also, parent.env() and parent.env<-() are included to provide direct access to setting and retrieving environments. o Function nsl() to look up IP addresses of hosts: intended as a way to test for internet connectivity. o Ops(), cbind(), diff() and na.omit() methods for time series objects moved from package ts to package base. o New option `download.file.method' can be used to set the default method for download.file() and functions which use it such as update.packages(). o order() and sort.list() now implement na.last = FALSE, NA. o Started work on new package management system: packageStatus() and friends. o page() has a new `method' argument allowing `method = print'. o png(), jpeg() and bmp() devices now have a `bg' argument to set the background color: useful to set "transparent" on png(). o Changes to the postscript() device: - The symbol font can now be set on a postscript() device, and support has been added for using Computer Modern type-1 fonts (including for symbols). (Contributed by Brian D'Urso.) - There is now support for URW font families: this will give access to more characters and more appropriate metrics on PostScript devices using URW fonts (such as ghostscript). - %%IncludeResource comments have been added to the output. (Contributed by Brian D'Urso.) o predict.ppr() now predicts on `newdata' containing NAs. o princomp() now has a formula interface. o readChar() now returns what is available if fewer characters than requested are on the file. o readline() allows up to 256 chars for the prompt. o read.table(), scan() and count.fields() have a new argument `comment.char', default `#', that can be used to start comments on a line. o New function reg.finalizer() to provide R interface to finalization. o reshape() extends reshapeLong, reshapeWide, which are deprecated. o rle() now returns a classed object, has a print method and an inverse. o Changes to save() and friends: - save() now takes an envir argument for specifying where items to be saved are to be found. - A new default format for saved workspaces has been introduced. This format provides support for some new internal data types, produces smaller save files when saving code, and provides a basis for a more flexible serialization mechanism. - Modified `save' internals to improve performance when saving large collections of code. - save() and save.image() now take a `version' argument to specify the workspace file-format version to use. The version used from R 0.99.0 to 1.3.1 is version 1. The new default format is version 2. load() can read a version 2 saved workspace if it is compressed. - save() and save.image() now take a `compress' argument to specify that the saved image should be written using the zlib compression facilities. - save.image() now takes an argument `ascii'. - save.image() now takes an argument `safe'. If TRUE, the default, a temporary file is used for creating the saved workspace. The temporary file is renamed if the save succeeds. This preserves an existing workspace if the save fails, but at the cost of using extra disk space during the save. - save.image() default arguments can be specified in the `save.image.defaults' option. These specifications are used when save.image() is called from q() or GUI analogs. o scan() allows unlimited (by R) lengths of input lines, instead of a limit of 8190 chars. o smooth.spline() has a new `control.spar' argument and returns `lambda' besides `spar'. spar <= 0 is now valid and allows to go more closely towards interpolation (lambda -> 0) than before. This also fixes smooth.spline() behavior for "df ~= n - 2". Better error messages in several situations. Note that spar = 0 is no longer the default and no longer entails cross-validation. o stars() has been enhanced; new `mar' argument uses smaller mar(gins) by default; further `nrow and `ncol' as S-PLUS, `frame.plot', `flip.labels', `lty' and explicit `main', `sub', `xlab' and `ylab'. Note that `colors' has been replaced by `col.segments' and there's a new `col.stars'. stars() now returns the locations invisibly. o step() is now closer to stepAIC() and so handles a wider range of objects (but stepAIC [in MASS] is still more powerful). o symbols() now has automatic xlab and ylab and a main argument which eliminates an incorrect warning. It better checks wrongly scaled arguments. o Sys.setlocale() now issues a warning if it fails. o An enhanced function type.convert() is now a documented function, rather than just internal to read.table(). o warning() allows multiple arguments, following S4's style. o New function with() for evaluating expressions in environments constructed from data. o Unix x11() devices can now have a canvas color set, which can help to distinguish plotting "white" from plotting "transparent". o On Unix, X11(), png() and jpeg() now give informative warnings if they fail to open the device. o The startup processing now interprets escapes in the values of environment variables set in R_HOME/etc/Renviron in a similar way to most shells. o The operator "=" is now allowed as an assignment operator in the grammar, for consistency with other languages, including recent versions of S-Plus. Assignments with "=" are basically allowed only at top-level and in braced or parenthesized expressions, to make famous errors such as "if(x=0) 1 else 2" illegal in the grammar. (There is a plan to gradually eliminate the underscore as an assignment in future versions of R.) o Finalizers can be registered to be run on system exit for both reachable and unreachable objects. o integer addition, subtraction, and multiplication now return NA's on overflow and issue a warning. o Printing factors with both level "NA" and missing values uses `' for the missing values to distinguish them. o Added an experimental interface for locking environments and individual bindings. Also added support for "active bindings" that link a variable to a function (useful for example for linking an R variable to an internal C global). o GNOME interface now has separate colours for input and output text (like the windows GUI). These can be modified via the properties dialogue. o Output from the GNOME console is block buffered for increased speed o The GNOME console inherits standard emacs-style keyboard shortcuts from the GtkText widget for cursor motion, editing and selection. These have been modified to allow for the prompt at the beginning of the command line. o One can register R functions and C routines to be called at the end of the successful evaluation of each top-level expression, for example to perform auto-saves, update displays, etc. See addTaskCallback() and taskCallbackManager(). See http://developer.r-project.org/TaskHandlers.pdf. DEPRECATED & DEFUNCT o .Alias has been removed from all R sources and deprecated. o reshapeLong(), reshapeWide() are deprecated in favour of reshape(). o Previously deprecated functions read.table.url(), scan.url(), source.url(), httpclient() and parse.dcf() are defunct. Method "socket" for download.file() no longer exists. DOCUMENTATION CHANGES o `Writing R Extensions' has a new chapter on generic/method functions. UTILITIES o New package `tools' for package development and administration tools, containing the QA tools checkFF(), codoc() and undoc() previously in package base, as well as the following new ones: - checkAssignFuns() for checking whether the final argument of assignment functions in a package is named `value'. - checkDocArgs() for checking whether all arguments shown in \usage of Rd files are documented in the corresponding \arguments. - checkMethods() for checking whether all methods defined in a package have all arguments of their generic. - checkTnF() for finding expressions containing the symbols `T' and `F'. o R CMD Rd2dvi has more convenient defaults for its output file. o R CMD check now also fully checks the Depends field in the package DESCRIPTION file. It also tests for syntax errors in the R code, whether all methods in the code have all arguments of the corresponding generic, for arguments shown in \usage but not documented in \arguments, and whether assignment functions have their final argument named `value'. C-LEVEL FACILITIES o arraySubscript and vectorSubscript are now available to package users. All "array-like" packages can use a standard method for calculating subscripts. o The C routine type2symbol, similar to type2str, returns a symbol corresponding to the type supplied as an argument. o The macro SHLIB_EXT now includes `.', e.g. ".so" or ".dll", since the Mac uses "Lib" without a `.'. o New Fortran entry points rwarn() and rexit() for warnings and error exits from compiled Fortran code. o A new serialization mechanism is available that can be used to serialize R objects to connections or to strings. This mechanism is used for the version 2 save format. For now, only an internal C interface is available. o R_tryEval() added for evaluating expressions from C code with errors handled but guaranteed to return to the calling C routine. This is used in embedding R in other applications and languages. o Support for attach()'ing user-defined tables of variables is available and accessed via the RObjectTables package currently at http://www.omegahat.org/RObjectTables. BUG FIXES o Fixed share/perl/massage-examples.pl to detect instances of par() at the very start of a line. o Fixed Pearson residuals for glms with non-canonical link.(PR#1123). Fixed them again for weights (PR#1175). o Fixed an inconsistency in the evaluation context for on.exit expressions between explicit calls to `return' and falling off the end returns. o The code in model.matrix.default() handling contrasts was assuming a response was present, and so without a response was failing to record the contrasts for the first variable if it was a factor. o diffinv() could get the time base wrong in some cases. o file.append() was opening all files in text mode: mattered on Windows and classic Macintosh. (PR#1085) o f[] <- g now works for factor f. o substr<-() was misbehaving if the replacement was too short. o The version of `packages.html' generated when building R or installing packages had an incorrect link to the style sheet. The version used by help.start() was correct. (PR#1090) o rowsum() now gives character (not factor codes) as rownames. (PR#1092) o plot.POSIX[cl]t now respect the `xaxt' parameter. o It is now possible to predict from an intercept-only model: previously model.matrix.default() objected to a 0-column model frame. o c.POSIXct was not setting the right classes in 1.3.x. o cor(*, use = "all.obs") <= 1 is now guaranteed which ensures that sqrt(1 - r^2) is always ok in cor.test(). (PR#1099) o anova.glm() had a missing drop=FALSE and so failed for some intercept-less models. o predict.arima0() now accepts vector as well as matrix `newxreg' arguments. o cbind(d,f) now works for 0-column dataframes. This fixes PR#1102. o plot(ts(0:99), log = "y") now works o method "gnudoit" of bug.report() was incorrectly documented as "gnuclient" (PR#1108) o saving with ascii=TRUE mangled backslashes. (PR#1115) o frac(,) {and others} now adds a gap appropriately. (PR#1101) o logLik.lm() now uses the correct "df" (nlme legacy code). o closeAllConnections() works again, and closes all sink() diversions. o sink(type="message") works again. o sink.number was (accidentally) returning the result invisibly. o as.POSIXct("NA") (or ..lt) now work; hence, merge(*, all=TRUE) now works with dataframes containing POSIXt date columns. o integer(2^30+1) and similar ones do not segfault anymore but duly report allocation errors. o seq(0, 0, 1) now works (PR#1133). o reshapeWide() got it wrong if the "i" factor was not sorted (the function is now deprecated since reshape() is there, but the bug still needed fixing...) o PR#757 was fixed incorrectly, causing improper subsetting of pch etc. in plot.formula(). o library() no longer removes environments of functions that are not defined in the top-level package scope. Also, packages loaded by require() when sourcing package code are now visible in the remaining source evaluations. o names(d) <- v now works (again) for "dist" objects d. (PR#1129) o Workarounds for problems with incompletely specified date-times in strptime() which were seen only on glibc-based systems (PR#1155). o promax() was returning the wrong rotation matrix. (PR#1146) o The [pqr]signrank and [pqr]wilcox functions failed to check that memory has been allocated (PR#1149), and had (often large) memory leaks if interrupted. They now can be interrupted on Windows and MacOS and don't leak memory. o range(numeric(0)) is now c(NA, NA) not NA. o round(x, digits) for digits <= 0 always gives an integral answer. Previously it might not due to rounding errors in fround. (PR#1138/9) o Several memory leaks on interrupting functions have been circumvented. Functions lqs() and mve() can now be interrupted on Windows and MacOS. o image() was finding incorrect breakpoints from irregularly-spaced midpoints. (PR#1160) o Use fuzz in the 2-sample Kolmogorov-Smirnov test in package ctest to avoid rounding errors (PR#1004, follow-up). o Use exact Hodges-Lehmann estimators for the Wilcoxon tests in package ctest (PR#1150). o Arithmetic which coerced types could lose the class information, for example `table - real' had a class attribute but was not treated as a classed object. o Internal ftp client could crash R under error conditions such as failing to parse the URL. o Internal clipping code for circles could attempt to allocate a vector of length -1 (related to PR#1174) o The hash function used internally in match(), unique() and duplicated() was very inefficient for integers stored as numeric, on little-endian chips. It was failing to hash the imaginary part of complex numbers. o fifo() no longer tries to truncate on opening in modes including "w". (Caused the fifo example to fail on HP-UX.) o Output over 1024 characters was discarded from the GNOME console. o rug() now correctly warns about clipped values also for logarithmic axes and has a `quiet' argument for suppressing these (PR#1188). o model.matrix.default was not handling correctly contrasts.arg which did not supply a full set of contrasts (PR#1187). o The `width' argument of density() was only compatible with S for a Gaussian kernel: now it is compatible in all cases. o The rbinom() C code had a transcription error from the original Fortran which led to a small deviation from the intended distribution. (PR#1190) o pt(t, , ncp=0) was wrong if t was +/-Inf. o Subsetting grouping factors gave incorrect degrees of freedom for some tests in package ctests. (PR#1124) o writeBin() had a memory leak. o qbeta(0.25, 0.143891, 0.05) was (incorrectly) 3e-308. (PR#1201) o Fixed alignment problem in ppr.f on Irix. (PR#1002, 1026) o glm() failed on null binomial models. (PR#1216) o La.svd() with nu = 0 or nv = 0 could fail as the matrix passed to DGESVD was not of dimension at least one (it was a vector). o Rownames in xcoef and ycoef of cancor() were wrong if x or y was rank-deficient. o lqs() could give warnings if there was an exact fit. (PR#1184) o aov() didn't find free-floating variables for Error() terms when called from inside another function o write.table() failed if asked to quote a numerical matrix with no row names. (PR#1219) o rlnorm( *, *, sd=0) now returns the mean, rnbinom(*, *, prob=1) gives 0, (PR#1218). ************************************************** * * * 1.3 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.3.1 NEW FEATURES o massage-examples is now a Perl script and about 50x faster. o On Unix(-alike) systems the default pager is now determined during configuration, and is `less' if available, otherwise `more' (and not `more -s' as previously). o configure now tests for strptime functions that fail on inputs before 1970 (found on Irix). It no longer checks for the SCSL and SGIMATH libraries on Irix. o New formula interface to cor.test() in package ctest. o "NA" is now a valid color name (as NA has been a valid integer color). o pairs() function has a new `gap' argument for adjusting the spacing between panels. o R CMD check has a new test for unbalanced braces in Rd files. o readBin() has a new argument `signed' to simplify reading unsigned 8- and 16-bit integers. o New capabilities() option "cledit". o Modified restore code to give clearer error messages in some cases. BUG FIXES o Fixed placement of mtext() output (including tick labels) when text is perpendicular to axis AND axis is logged (PR#997 and PR#865). o rect() and arrows() now respond to setting of par(xpd) o abline() now responds to the setting of par(xpd), including via the "..." argument (PR#750). o Using cat() to a gzfile() connection no longer compresses poorly (at the expense of some latency). o The `exact' p-values for the two-sided two-sample Kolmogorov-Smirnov test in 1.3.0 were for the wrong tail. o In the HTML conversion of .Rd files, \link[foo]{bar} was ignoring [foo] outside \code{} statements. o lm.influence(), plot.lm(), influence.measures() and the related diagnostic measures now handle lm() fits with na.action=na.exclude. o Eliminated segmentation fault in while loops without braces in their bodies. o barplot did not accept NA heights unless ylim was specified. o predict.lm() failed with single-column model matrix (PR#1018). o legend() now also works with 100s of entries (thanks to M. Schlather). o A long-standing bug leading to inaccuracy in polyroot() has been fixed (PR#751) o A very old bug with eval() not handling a numeric `envir' argument according to specifications has been fixed. [This in particular broke ported S-PLUS code that used eval(..., sys.parent())]. Also, eval() now checks that a numeric `envir' has length one to prevent accidental passing of matrices instead of data frames. o The C code underlying nlm(f, *) now also works correctly when f(x) returns +Inf {nlm() itself *did* work!}. o pdfcolor.tex is now included in doc/manual, as pdftex seems no longer to include it. o Fixed protect bug in save() code that might have been responsible for occasionally saving corrupted workspaces. o capabilities("X11") now reports if X11 is available in this session, thereby giving the correct answer if --gui=none was specified. o Rd files with ,, inside \code{} were treating this as a ligature in LaTeX: now corrected in Rdconv. o dlopen on Compaq Tru64 was finding the wrong entry points: worked-around by using different names in the modules. o plot.mts() allows a type argument again (broken in 1.3.0: PR#1010). o scan() has a limit of 8190 on the length of char strings, and now warns if it is exceeded (when the string has always been truncated). o par adj now accepts values of integer mode (such as text(adj=0:1)). o horizontal adj values outside the range [0, 1] are now supported on devices with canHAdj==1 (Windows devices, xfig). o xtabs() without a response was ignoring drop.unused.levels=TRUE. o readLines(ok=FALSE) was not generating an error when it should. o princomp(covmat=) has been broken. o Many documentation clean-ups: formerly undocumented arguments, use of T/F rather than TRUE/FALSE. o df[] <- foo now works for data frames (PR#1047). o nargs() was documented incorrectly. o Using seq.POSIXt(by="2 weeks") was stepping by single weeks (PR#1046). o dummy.coef.lm was not handling complex terms like z:I(x). It now either does or warns and gives NAs (PR#1048). o predict.mlm() was broken (PR#1049). o ksmooth (in package modreg) was using points to the left of the kernel under some circumstances (PR#1050). o attr(x, "class") <- character(0) was segfaulting. Similar problem with "comment" attribute also fixed. o loadings() results from PCA (as well as from factor analysis) are now printed by print.loadings. o Using chol() on an non-positive-definite matrix gave an misleading error message (PR#1061). o as.character() on a language object was truncating to about 70 characters: the internal limit (from the deparse code) is now the maximum possible 500. o X11() device was failing to re-initialize correctly after all devices were shut down, so the colortype could not be changed and some systems showed protocol errors. (PR#1065) o Converting Inf and NaN values by as.character() and reading by scan() was supported by strtod on some platforms and not others: these are now handled by R itself. (PR#1072) o hclust(dist(1)) doesn't loop infinitely but signal an error. o cutree() can now cut outside heights and does not return garbage for h >= max(tree$heights) anymore. (PR#1067) o interaction(...,drop=F) returned an object looking like a factor, but with storage mode "double", confusing model.matrix.default (PR#1003) o splineDesign(*, ord=) and others give better error messages for wrong `ord' (and have slightly improved documentation). CHANGES IN R VERSION 1.3.0 NEW FEATURES o Changes to connections: - New function url() to read from URLs. file() will also accept URL specifications, as will all the functions which use it. - file connections can now be opened for both reading and writing. - Anonymous file connections (via file()) are now supported. - New function gzfile() to read from / write to compressed files. - New function fifo() for connections to / from fifos (on Unix). - Text input from file, pipe, fifo, gzfile and url connections can be read with a user-specified encoding. - New functions readChar() and writeChar() to read character strings with known lengths and no terminators, and to write user-specified lengths from strings. - sink() now has a stack of output connections, following S4. - sink() can also be applied to the message stream, to capture error messages to a connection. Use carefully! - seek() has a new `origin' argument. - New function truncate() to truncate a connection open for writing at the current position. - Socket connections via function socketConnection(). - The `blocking' argument for file, fifo and socket connections is now operational. o Changes to date/time classes and functions: - Date/time objects now all inherit from class "POSIXt". - New function difftime() and corresponding class for date/time differences, and a round() method. - Subtraction and logical comparison of objects from different date/time classes is now supported. NB: the format for the difference of two objects of the same date/time class has changed, but only for objects generated by this version, not those generated by earlier ones. - Methods for cut(), seq(), round() and trunc() for date/time classes. - Convenience generic functions weekdays(), months(), quarters() and julian() with methods for "POSIXt" objects. o Coercion from real to integer now gives NA for out-of-range values, rather than the most extreme integer of the same sign. o The Ansari-Bradley, Bartlett, Fligner-Killeen, Friedman, Kruskal-Wallis, Mood, Quade, t, and Wilcoxon tests as well as var.test() in package ctest now have formula interfaces. o Matrix multiplication functions %*% and crossprod() now use a level-3 BLAS routine dgemm. When R is linked with the ATLAS or other enhanced BLAS libraries this can be substantially faster than the previous code. o New functions La.eigen() and La.svd() for eigenvector and singular value decompositions, based on LAPACK. These are preferred to eigen() and svd() for new projects and can make use of enhanced BLAS routines such as ATLAS. They are used in cancor(), cmdscale(), factanal() and princomp() and this may lead to sign reversals in some of the output of those functions. o Provided the Fortran compiler can handle COMPLEX*16, the following routines now handle complex arguments, based on LAPACK code. qr, qr.coef, qr.solve, qr.qy, qr.qty, solve.default, svd, La.svd. o aperm() uses strides in the internal C code and so is substantially faster (by Jonathan Rougier). o The four bessel[IJKY](x,nu) functions are now defined for nu < 0. o [dpqr]nbinom also accept an alternative parametrization via the mean and the dispersion parameter (thanks to Ben Bolker). o Generalised "birthday paradox" functions [pq]birthday. o boxplot() and bxp() have a new argument `at' o New function capabilities() to report optional capabilities such as jpeg, png, tcltk, gzfile and url support. o New function checkFF() for checking foreign function calls. o New function col2rgb() for color conversion of names, hex, or integer. o coplot() has a new argument `bar.bg' (color of conditioning bars), gives nicer plots when the conditioners are factors, and allows factors for x and y (treated almost as if unclass()ed) using new argument `axlabels'. [original ideas by Thomas Baummann] o `hessian' argument added to deriv() and its methods. A new function deriv3() provides identical capabilities to deriv() except that `hessian' is TRUE by default. deriv(*, *, func = TRUE) for convenience. o New dev.interactive() function, useful for setting defaults for par(ask=*) in multifigure plots. o dist() in package mva can now handle missing values, and zeroes in the Canberra distance. o The default method for download.file() (and functions which use it such as update.packages()) is now "internal", and uses code compiled into R. o eigen() tests for symmetry with a numerical tolerance. o New function formatDL() for formatting description lists. o New argument `nsmall' to format.default(), for S-PLUS compatibility (and used in various packages). o ?/help() now advertises help.search() if it fails to find a topic. o image() is now a generic function. o New function integrate() with S-compatible call. o New function is.unsorted() the C version of which also speeds up .Internal(sort()) for sorted input. o is.loaded() accepts an argument PACKAGE to search within a specific DLL/shared library. o Exact p-values are available for the two-sided two-sample Kolmogorov-Smirnov test. o lm() now passes `...' to the low level functions for regression fitting. o Generic functions logLik() and AIC() moved from packages nls and nlme to base, as well as their *.lm methods. o New components in .Machine give the sizes of long, long long and long double C types (or 0 if they do not exist). o merge.data.frame() has new arguments, `all[.xy]' and `suffixes', for S compatibility. o model.frame() now calls na.action with the terms attribute set on the data frame (needed to distiguish the response, for example). o New generic functions naresid(), napredict() and naprint() (formerly in packages survival5 and MASS, also used in rpart). Also na.exclude(), a variant on na.omit() that is handled differently by naresid() and napredict(). The default, lm and glm methods for fitted, residuals, predict and weights make use of these. o New function oneway.test() in package ctest for testing for equal means in a one-way layout, assuming normality but not necessarily equal variances. o options(error) accepts a function, as an alternative to an expression. (The Blue Book only allows a function; current S-PLUS a function or an expression.) o outer() has a speed-up in the default case of a matrix outer product (by Jonathan Rougier). o package.skeleton() helps with creating new packages. o New pdf() graphics driver. o persp() is now a generic function. o plot.acf() makes better use of white space for `nser > 2', has new optional arguments and uses a much better layout when more than one page of plots is produced. o plot.mts() has a new argument `panel' providing the same functionality as in coplot(). o postscript() allows user-specified encoding, with encoding files supplied for Windows, Mac, Unicode and various others, and with an appropriate platform-specific default. o print.htest() can now handle test names that are longer than one line. o prompt() improved for data sets, particularly non-dataframes. o qqnorm() is now a generic function. o read.fwf() has a new argument `n' for specifying the number of records (lines) read in. o read.table() now uses a single pass through the dataset. o rep() now handles lists (as generic vectors). o scan() has a new argument `multi.line' for S compatibility, but the default remains the opposite of S (records can cross line boundaries by default). o sort(x) now produces an error when x is not atomic instead of just returning x. o split() now allows splitting on a list of factors in which case their interaction defines the grouping. o stl() has more optional arguments for fine tuning, a summary() and an improved plot() method. o New function strwrap() for formatting character strings into paragraphs. o New replacement functions substr<-() and substring<-(). o Dataset swiss now has row names. o Arguments `pkg' and `lib' of system.file() have been renamed to `package' and `lib.loc', respectively, to be consistent with related functions. The old names are deprecated. Argument `package' must now specify a single package. o The Wilcoxon and Ansari-Bradley tests now return point estimators of the location or scale parameter of interest along with confidence intervals for these. o New function write.dcf() for writing data in Debian Control File format. parse.dcf() has been replaced by (much faster) internal read.dcf(). o Contingency tables created by xtabs() or table() now have a summary() method. o Functions httpclient(), read.table.url(), scan.url() and source.url() are now deprecated, and hence method="socket' in download.file() is. Use url connections instead: in particular URLs can be specified for read.table(), scan() and source(). o Formerly deprecated function getenv() is now defunct. o Support for package-specific demo scripts (R code). demo() now has new arguments to specify the location of demos and to allow for running base demos as part of `make check'. o If not explicitly given a library tree to install to or remove from, respectively, R CMD INSTALL and R CMD REMOVE now operate on the first directory given in `R_LIBS' if this is set and non-null, and the default library otherwise. o R CMD INSTALL and package.description() fix some common problems of DESCRIPTION files (blank lines, ...) o The INSTALL command for package installation allows a `--save' option. Using it causes a binary image of the package contents to be created at install time and loaded when the package is attached. This saves time, but also uses a more standard way of source-ing the package. Packages that do more than just assign object definitions may need to install with `--save'. Putting a file `install.R' in the package directory makes `--save' the default behavior. If that file is not empty, its contents should be R commands executed at the end of loading the image. There is also a new command line option `--configure-vals' for passing variables to the configure script of a package. o R CMD check now also checks the keyword entries against the list of standard keywords, for code/documentation mismatches (this can be turned off by the command line option `--no-codoc'), and for sufficient file permissions (Unix only). There is a new check for the correct usage of library.dynam. It also has a new command line option `--use-gct' to use `gctorture(TRUE)' when running R code. o R CMD Rd2dvi has better support for producing reference manuals for packages and package bundles. o configure now tests for the versions of jpeg (>= 6b), libpng (>= 1.0.5) and zlib (>= 1.1.3). It no longer checks for the CXML/DXML BLAS libraries on Alphas. o Perl scripts now use Cwd::cwd() in place of Cwd::getcwd(), as cwd() can be much faster. o R::Dcf.pm can now also handle files with more than one record and checks (a little bit) for continuation lines without leading whitespace. o New manual `R Installation and Administration' with fuller details on the installation process: file `INSTALL' is now a brief introduction referencing that manual. o New keyword `internal' which can be used to hide objects that are not part of the API from indices like the alphabetical lists in the HTML help system. o Under Unix, shlib modules for add-on packages are now linked against R as a shared library (`libR') if this exists. (This allows for improved embedding of R into other applications.) o New mechanism for explicitly registering native routines in a DLL/shared library accessible via .C(), .Call(), .Fortran() and .External(). This is potentially more robust than the existing dynamic lookup, since it checks the number of arguments, type of the routine. o New mechanism allowing registration of C routines for converting R objects to C pointers in .C() calls. Useful for references to data in other languages and libraries (e.g. C and hdf5). o The internal ftp/http access code maintains the event loop, so you can download whilst running tcltk or Rggobi, say. It can be hooked into package XML too. BUG FIXES o boxplot.stats() now returns the correct `n' component in the case of NAs. This also affects `conf', the notch length (PR#967). o the "coef = 0" fix (PR#917) to boxplot.stats() broke boxplot.stats(do.out = FALSE). o curve(* , add = FALSE) now works correctly again if used when par("xlog") is true. o Printing a dataframe with a column called "row.names" or "check.names" omitted the column. o data.frame(a=1, b=2)[1, -(1:2)] now works, giving an empty data frame. as.matrix(df), deparse(), dput() and str() now work for empty data frames. o dbeta() could return zero erroneously on some platforms where roundoff makes e.g. 1.3 - 1 > (1.3 + 1) - 2 (Solaris and HP-UX were affected). (PR#970) o pointer protection in deriv() (PR#953) o expand.data.frame() didn't interpret its subset= argument in the data frame. (PR#979 et al., fix from Greg Warnes) o format() on character arrays was losing the dimensions. o hist.default() was ignoring its `probability' argument for equi-spaced breaks. o Occasionally insane results of is.nan(NULL), is.na(NULL) (PR#952) o ks.test() in package ctest now had the one-sided alternatives in the one-sample case reversed (PR#934). o ls.str() and lsf.str() now work better with pos > 1, and are correctly documented (PR#899). o plot(1:2, xaxs = "i") now gives both "1.0" and "2.0" x-axis labels. o promax() was not using its `m' argument (m=4 was always used). o qr.X() was ignoring pivoting (which happens only in rank-deficient cases). o sign of Pearson residuals was wrong for reciprocal link (PR#862) o The algorithm for determining starting estimates in the SSfpl self-starting model in the nls package was changed following a suggestion by Phillipe Grosjean o svd(x)$v was not a matrix when x had only 1 row (PR#963). o symnum(x) behaves more reasonably for zero length or non-numeric x. o The implementation of sys.function() did not work when the current function was already a function (e.g., a closure). o tapply() had "..." argument after simplify=, which made it incompatible with S when passing additional unnamed arguments to FUN. o use formula environments in xy.coords() (PR#932) o Unused entry points in `src/appl/fortran.c' and `Fortran.h' have been removed. o Unused directory `src/f2clib' and header `src/include/R_ext/f2c.h' have been removed. o The documentation and parts of the parse/deparse mechanism indicated that there was an operator `%'. Corrected (PR#925). o Fixed some cases where the deparser gave code that threw a syntax error when parsed. o Using a pushback with more than two lines at a time could crash. o Eliminate or warn on use of .Last.value in help examples, since .Last.value is only set from top-level expressions (and was incorrectly documented). o asInteger was ignoring integer overflow (PR#929 and others). o approxfun(*, ties = ) could return garbage when there were ties; ties = "ordered" was incorrect--also for approx()-- when there was a tie at the very right. ************************************************** * * * 1.2 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.2.3 NEW FEATURES o Support for configuration and building the Unix version of R under Mac OS X. (The `classic' Macintosh port is `Carbonized' and also runs under that OS.) o dotchart() and stripchart() become the preferred names for dotplot() and stripplot(), respectively. The old names are now deprecated. o Functions in package ctest now consistently use +/-Inf rather than NA for one-sided confidence intervals. BUG FIXES o `Writing R Extensions' incorrectly described an entry point `fmod' which was not included in the R binary on most systems. The entry point has been removed, to avoid any confusion with the standard C entry point of the same name. o Printing of kernels in package ts was unreliable: the internal representation was correct. o A problem with "..." in substitutions has been fixed (PR#860). o Various strangeness with match.call() and "..." has been fixed (PR#813). o sys.function() could return an unevaluated promise, messing up formals() and match.arg() (PR#872) o Deparsing or dumping attributes with non-standard names was not quoting the name (PR#871). o We now use match.fun() in tapply() so that it won't get trapped by non-functions masking FUN. o The `nmax' argument in scan(what=list(...), nmax=300) was counting blank lines, although they were said to be ignored. This affected using read.table on files with blank lines in 1.2.2, and using `n' with `what' a list. o as.numeric(), as.integer(), as.complex() returned zero on completely blank strings. Now they return NA. (PR#870) o Overflow in deparse() in terms(formula) with very long left-hand side fixed. (PR#873) o lowess(c(1:3, 7:5)) now should give the same on different platforms, since now in the C code (int)(f*n + 1e-7) is used. o curve(*, add = TRUE) now works properly with active log scales. o rt() could give different results on different platforms as the order of evaluation of calls to random numbers was not fully defined. This affected the Mac port. o ppr() inside nested calls sometimes failed to find objects due to a typo in the eval call in ppr.formula. o qchisq(0.025, 31, ncp=1, lower.tail=FALSE) now works. (PR#875) o dchisq with integer x, df and ncp sometimes gave incorrect results on i686 Linux. o Cancelling a quit caused quit() not to ask next time it was called. o Some complicated operations with "..." didn't work. o Missingness was not correctly propagated in some cases. o eigen() segfaulted on 0-dimensional matrices. o nls( ~ rhs, ..) now works (formula with empty left hand side). o The fuzz added in hist() for 1.2.2 broke the logic testing for equidistant breakpoints. o Calls to replacement functions ("f<-") lost argument names (PR#888). o is.na() and is.nan() gave random results on lists containing zero-length objects. o cor(), cov() and var() gave a result on a zero-length argument (now an error). cov(x, NULL) and cor(x, NULL) are now errors if x is a vector. (PR#883). o ?smooth.spline now properly describes `spar' which is *not* lambda. smooth.spline(1:20, spar = 50) gives an error instead of silent nonsense. print.smooth.spline() now makes use of a digits argument. o Confidence intervals for wilcox.test() had the samples reversed in the two-sided case (PR#895), and sometimes got continuity correction wrong (PR#896). o Using out-of-range font values in text() on a postscript() device on Windows could crash. .ps.prolog was incorrectly named in some of the documentation. (PR#914) o Warning messages of > 8191 chars could crash R (PR#902), as could errors. Now they are truncated to 8191 chars on machines which have vsnprintf (almost all). o range() now works properly for date-time objects. o contour() could loop infinitely (PR#897). o R-lang manual had precedence of %% wrong (PR#879). o try() constructs lost protection of R_alloc'ed memory (PR#877). o Documented that as.numeric() dispatches to as.double.foo methods (PR#918.1). o httpclient() (and the "socket" method of download.file) skipped ^V rather than ^Z in input (if drop.ctrl.z = TRUE, the default). o boxplot(*, range = 0) and boxplot.stats(*, coef = 0) now don't return outliers anymore (PR#917). o segmentation fault with tmp[[1,]] (PR#904) o incorrect "..." handling in plot.factor (PR#830) CHANGES IN R VERSION 1.2.2 NEW FEATURES o The Macintosh port becomes a full member of the R family and its sources are incorporated as from this release. See `src/macintosh/INSTALL' for how that port is built. o The API header files and export files `R.exp' are released under LGPL rather than GPL to allow dynamically loaded code to be distributed under licences other than GPL. o postscript() and xfig() devices now make use of genuine Adobe afm files, and warn if characters are used in string width or height calculations that are not in the afm files. o Configure now uses a much expanded search list for finding a FORTRAN 77 compiler, and no longer disallows wrapper scripts for this compiler. o New Rd markup \method{GENERIC}{CLASS} for indicating the usage of methods. o print.ftable() and write.ftable() now have a `digits' argument. o undoc() has a new `lib.loc' argument, and its first argument is now called `package'. BUG FIXES o The behaviour of polygon() with NA coordinate values is now documented. o polygon() now correctly recycles the values of border and lty. Thanks to Denis White. o readBin() and writeBin() were not always making good use of long types (such as long double) when available. o The C function fprec was not handling very small denormalized numbers correctly. This affected the way they were printed on Windows, for example. o legend() now draws points after lines allowing "empty dots on lines" thanks to Ben Bolker. o Setting row/column names preserves the names of the dimnames (PR#809). o Using help() after help.start() on Unix was failing to find the linked help files if more than one package was loaded (as now happens by default). o scan now sets the maximal sizes internally when `what' is a list from `nmax' and failing that `nlines'. This uses memory much more efficiently if `nmax' is specified. read.table() makes use of this. o The FORTRAN code used is now much closer to ANSI compliance. o cov.rob() gives a useful error message on nearly-degenerate matrices. o summary() on a data frame was computing results to a precision based on options("digits") (default 4), not its `digits' argument. Now results are computed to full precision but formatted using `digits'. o summary(m, digits=*) also properly works for matrices. o When returning parameters from .C/.Fortran, the OBJECT field was not copied even though class attributes were (PR#834). o There was a spurious warning from the X11 driver on 100 dpi displays (PR#840, fix from Tom Vogels). o scan() was reading all-blank numeric fields as zero. Should be read as NA, and are now. o dnbinom(*, size, *) now works again for size < 1 (PR#842). o dgeom(*, p = 0) and pgeom(*, p = 0) don't give NaN anymore. o smooth.spline() allows zero weights again. o aperm() fix for list arg; aperm(*, resize=FALSE) now works with dimnames (by dropping them). o The xfig() driver was not closing unclosed polygons as the R driver expected (but did not document). o spec.ar() now handles order 1 correctly. o Add fuzz to prevent anomalies with hist(). o print.matrix() checks length of rowlab, collab (PR#850) o add1.glm() was using the wrong weights for binomial glms in cbind(successes, failures) ~ lhs form, since 1.2.0. o Eliminate packing of the `structRstart' structure, which was probably non-ISO C and caused some compilers problems (PR#852). o all.vars() no longer returns empty `names' (PR#829). o dotplot() passes `cex' down to the mtext() calls used for the labels (PR#816). o The pictex() driver was drawing polylines incorrectly (PR#845). o In the event of a fatal X11 error (this can be generated under FVWM by selecting Destroy), the input handler would loop, leaving the "please save work and shut down R" advice useless. There should now be an opportunity for a relatively graceful exit. o polyroot() misbehaved if all coefficients except that of the highest degree term were zero (partial fix for PR#751) o spline(method="natural") was extrapolating incorrectly (both to the left and to the right, for different reasons). (PR#653) o Line clipping was incorrect for log-plots. (PR#839) o Add explicit test for rank-deficient residuals to summary.manova(). o The help search databases did not contain the data from the platform-specific help files. o parse.dcf() and hence package.contents() now work with a warning for empty contents' files. o which.min() and which.max() now properly work for 0-length and NA-only arguments. CHANGES IN R VERSION 1.2.1 NEW FEATURES o New functions factanal(), varimax(), promax() and examples in package mva. o New functions readBin() and writeBin() to transfer binary data to and from connections. o merge() is partially moved to C to reduce its memory usage. o library(help = PKG) now displays the contents of the package's DESCRIPTION file in addition to its INDEX. o Sd2Rd can handle S4-style documentation too: see `Writing R Extensions'. o prompt() now also works with a character argument (useful for producing many *.Rd files in a loop). o The Unix front-end shell script now ignores a value for R_HOME found in the environment. o Connections functions such as file() now accept a description of length > 1, with a warning. o All text-mode connections now accept input with LF, CR or CRLF line endings. This means that readLines() can be used on DOS files and source() on Mac files, for example. Also, CRLF-terminated files can be used as stdin on Unix, and files with last lines without an EOL mark can be used as stdin and source()-ed on Unix and Windows. o DESCRIPTION file has a new recommended `Maintainer:' field. o stars() now uses a larger "cex" for the labels, and cex and lwd are now arguments. Further, the argument names (xlim, ylim, axes) are now consistent with other plot functions. The key symbol is not clipped anymore into the plot region by default. o Date-time quantities are now printed with the timezone, if known. o R CMD build now ignores all files specified (via Perl regexps) in file `.Rbuildignore' in the top-level source directory of a package. o Horizontal boxplots are possible with horizontal = TRUE. o all.equal() on lists now compares them as generic vectors, that is they are equal if have identical names attributes and all components are equal. o Invalid lines in .Renviron now give warnings when R is started. o Argument `na.last' implemented for rank(). BUG FIXES o There have been many small improvements/corrections in the documentation. In particular: The help pages for lm and glm now describe the fitted objects. is.vector() is now correctly documented: complex vectors and lists return TRUE. o The default sortedXyData constructor in the nls package now handles missing values in the response. o On startup, file .RData is now restored *after* the site and user profiles are loaded (if at all). This is as previously documented. o as.POSIXlt (and *ct) operating on a character string only extracted the date (and not the time) in some cases. o as.POSIXct() on character objects was ignoring `tz'. o codoc(ignore.generic.functions = TRUE) works again. o Explicitly close files opened by sink() for OSes (such as Windows) that benefit from it. o Prevent closing the sink connection (which would be a silly thing to do). o showConnections(all = TRUE) was sometimes counting connections incorrectly, and so not showing some closed ones. o ts(1:10, start= c(1999,6), end = c(2000,3), frequency = 12) now prints both years (as it should). o Monthly multivariate time series now print proper month names in all cases. o print.stl(), print.princomp() and print.prcomp() now pass on `digits =' etc. o prompt() now produces a \usage{} line for data frames and other datasets, as documented in `Writing R Extensions'. o glm() now returns correct linear predictor and fitted values for zero-weight cases. o scan(strip.white=TRUE) and readline() could give incorrect answers when an input field was empty or blank. o dchisq() now behaves better for large values of its ncp parameter. o besselJ(*, nu) is now ok for nu < 1; fix improves accuracy of other values by a few bits as well. o The convergence criterion in the Fortran SVD code has been changed to circumvent spurious convergence errors when comparing extended-precision quantities on ix86 Linux (and some compilers and options). o Rdindex now handles multi-line \title{}'s correctly. o Add weights.glm() so that plot.lm() gets the correct weights from glm objects (the ones that go with deviance residuals not the working residuals). o Printing a language object (e.g. a formula) in a list was clobbering the buffer holding the tag labels which then were lost in subsequent lines of printout (PR#746). o aic in family() objects is now computed more precisely using dxxxx(log=TRUE). For binomial fits the value was wrong for models specified via proportions and weights (PR#796). Avoid NaN values in aic where n = 0 occurs. o Using non-integer numbers of successes in a binomial glm (as formerly in demo(lm.glm)) now gives a warning, as the theory and in particular the AIC value is not applicable. o demo(is.things) works again {is.ALL() doesn't call methods anymore}. o persp(*, nticks = nn) now works (better) for too small nn. persp(*, main = t1, sub= t2) now work (as always documented). o Printing of attributes of a list element no longer precedes `attr' by the tag (PR#715). o It is no longer possible to use df[foo] to select non-existent columns in df and so create an invalid object of class "data.frame" (PR#698). o edit.data.frame() was trying to set row.names on a list, which is no longer allowed. o In the \link[pkg]{topic}, `pkg' was not being used if `topic' was found in a package in .lib.loc. Now `pkg' is always used. o plot() with small relative ranges gave an error, which e.g. broke library(ts); plot(stl(ts(rep(1:7, 15), freq = 7), s.win = "per")) o Using scan() with a 0-length `what' argument now gives an error message rather than a segfault. o Loading .Random.seed could extremely rarely and with some generators reject a value as NA_INTEGER when it was valid. o save(..., ascii=TRUE) created broken files when saving strings containing special characters (ASCII code > 127). o mean(c(1,NA,NA,NA)[-1], trim = .1, na.rm = TRUE) doesn't give an error anymore. o As the supplied afm files are not properly in the ISOLatin1 encoding, the font metric for "-" was wrong since 0.63 on a postscript/xfig device, and randomly wrong in 1.2.0. It will now be correct (but the files remain incorrect: C45 is "minus" not "hyphen" and there are missing slots). Metrics for the duplicated characters (acute, dieresis, macron, space) in ISOLatin1 encoding are now correct for both occurrences: previously only one was present. o The data-time functions try harder to guess the DST setting when the OS does not know, as some OSes were printing times in DST if this was marked as unknown. o Setting par(pty=) after par(pin=) or par(plt=) was having no effect until the margins were set. o Nested \describe sections in .Rd files have (again) nested indentation when converted to text. o Concatenation of C strings by ## is no longer used, to avoid spurious warnings from some recent versions of gcc. o dev.copy2eps() allows a `paper' argument to be passed to postscript(). o file.show() handles the case of zero files better. o formula.lm uses object$formula if it exists, in preference to object$terms. o strsplit() is corrected for an empty split pattern. o kronecker() now does a better job when creating dimnames. o Better handling of input dimnames in fourfoldplot(). CHANGES IN R VERSION 1.2.0 NEW FEATURES o There is a new memory management system using a generational garbage collector. This improves performance, sometimes marginally but sometimes by double or more. The workspace is no longer statically sized and both the vector heap and the number of nodes can grow as needed. (They can shrink again, but never below the initially allocated sizes.) See ?Memory for a longer description, including the new command-line options to manage the settings. o values of `--min-nsize' up to 50M (2Gb on 64-bit Solaris) are allowed. o A (preliminary) version of S4-like connections has been added, and most functions which take a "file" argument can now work with a connection as well as a file name. For more details, see the chapter on Connections in the R Data Import/Export manual. o New command-line option `--no-restore-history' implied by `--vanilla'. o Command-line option `--no-restore' is now `--no-restore-data' and `--no-restore' implies `--no-restore-*' (currently `data' and `history'). o The more recent GNU regex from grep-2.4.2 is used. This uses locale-based ordering for ranges on platforms with strcoll. o The print routines now escape " (as \") in a character string only when it is printed as a quoted string. This makes print(, quote=FALSE) and cat() consistent. o The standard methods for add1() and drop1() now attempt to cope with missing values by using a subset of the data that is `cleaned' by na.action for the maximal model under consideration. o anova() for 3 or more lm objects now behaves compatibly with S and anova.glmlist(). The old behaviour is still available by calling anovalist.lm() directly. o anova() for multiple lm and glm objects no longer truncates the formula printed. There is much more extensive documentation for anova() methods. o New method as.data.frame.table() for converting the array-based representation of a contingency table to a data frame containing the classifying factors and the corresponding counts. o New function assocplot() for producing Cohen-Friendly association plots. o autoload() accepts lib.loc and other arguments to library() o bxp() has new argument `frame.plot', as plot.default(). o contour() now has `axes' and `frame.plot' args. o contrasts(, FALSE) now always returns an identity matrix, to make model.matrix compatible with S. This affects models such as lm(y ~ o - 1) where o is an ordered factor. o `where' command added to debug(). o demo(dynload) (which used the superseded call_R interface) has been removed. o Class "dendrogram" in package mva providing general support for tree-like structures (plotting, cutting, ...). o dev.copy2eps() and dev2bitmap() preserve the aspect ratio of the copied device if just one of `width' and `height' is specified. o dump() has new argument append, argument `fileout' has been renamed to `file' (for consistency with all other functions). o edit.default() now checks for an unset `editor' argument, and terminates with an error if the editor cannot be run. o The `mode' argument of exists() and get() is interpreted as mode(x) rather than typeof(x), following S. o New functions file.access() and file.info() for information on files on the user's file systems. o New convenience function file.copy(). o file.show() allows `pager' argument to be an R function, and consequently, the `pager' option can be an R function. o Formatting (and printing) of data.frames with complex objects is improved. toString was added as a new function. o format() has a new argument `justify' controlling the justification of character strings (and factors). o Formula objects now have an environment and code manipulating them needs to take care to preserve it or set an appropriate environment. o New function fourfoldplot() for producing fourfold displays of 2 by 2 by k contingency tables. o gc() now reports the space allocated, not the space free, since the total space is now variable. o New primitive gc.time() to report on time spent in garbage collection. o hclust() takes new argument `members' allowing dissimilarity matrices both for singletons (as until now) and clusters. o help() has an additional `pager' argument which may be passed to file.show() {useful for ESS fans}. o There is now an R `Hershey' list object for Hershey vector font computations and documentation. o hist() now returns a "histogram" object and calls the new function plot.histogram() for plotting. It now also allows character labels. o if(*) now gives a more intelligible error message when "*" cannot be coerced to logical. o inherits() is now an internal function and compatible with S. o New function lag.plot() in package ts. o legend() has a new argument pt.bg. o The commands history can be loaded with loadhistory(), saved with savehistory() and displayed with history(), under Windows and under Unix using the readline or GNOME interfaces. o mad() has new (logical) arguments "low" and "high" (the first giving S compatibility). o New function manova() and summary method. o Function mantelhaen.test() in package ctest now can deal with general I x J x K tables. In addition, in the 2 x 2 x K case, it can also perform an exact conditional test of independence, and gives confidence intervals for the common odds ratio. o model.frame() now uses the environment of its formula argument, rather than the parent environment, to evaluate variables not found in the data argument. See help(formula). o mosaicplot() can now also create extended mosaic plots, which visualize the residuals from a log-linear model using color and outline. o New utility function n2mfrow(). o nlm(check.analyticals = TRUE) now warns if the supplied gradient and/or hessian are of the wrong length. o New function object.size() to give approximate memory allocation. o optim() now checks the length of an analytical gradient at each evaluation. o The L-BFGS-B method of optim() now support tracing, at several levels of detail. o options(check.bounds = TRUE) makes each vector extension by sub-assignment ("x[.] <- .") produce a warning. o options(width) now admits to a limit (previously 200, now 10000) and gives a more informative message if out of range (as it does now for digits and expressions). o Function path.expand() to do tilde-expansion on file paths. This provides an interface to R_ExpandFileName, which is now a documented entry point. o .Platform has new component "endian", useful for binary file manipulations. o plot.function() and curve() now take xlim as default for (from,to) if the former is specified. o plot.hclust() allows arguments main, sub, etc, and has non-empty defaults for these. o plot.ts(x,y) now allows to suppress labels and lines; it is better documented. o The postscript() driver now allows a user-specified family so, for example, one can use the same fonts in diagrams as in running text. o The postscript() driver allows its prolog to be changed (by an expert) via object .ps.prolog. o prop.table() and margin.table() now work with an empty `margin'. o Formerly deprecated function provide() is now defunct. o New functions read.delim() and read.delim2() to make it easier to read delimited files as Windows programs tend to create (usually TAB separated). o New readLines() function to read a file line-by-line. o New functions reshapeLong() and reshapeWide() emulating Stata's reshape command. These are still labeled experimental and might be improved (or removed) in later versions. o row.names() and row.names<-() are now generic functions which call rownames() as their default method and have methods for class "data.frame". o New function Rprof() for profiling R expressions under Unix. Configure with `--enable-R-profiling' (on by default) to make this operational. o save(, oldstyle=TRUE) has been withdrawn. o scan() and read.table() have a new argument `fill' which can be set TRUE to allow reading files with unequal number of fields per line. (Programs like Excel have a habit of creating such files when exporting.) o scan() and read.table() have a new argument `blank.lines.skip' to allow blank lines to be read. o scan() now reads empty character fields as "" not "NA" unless "" is included in na.strings. o smooth() in package eda has a better default (3RS3R instead of 3RSR) and more arguments, e.g. `twiceit' for some S compatibility and `kind = "3R"' for running medians of 3. o strsplit() has a new argument `extended' controlling whether to use extended (the default) or basic regular expressions for splitting. o Sys.getenv() becomes the preferred name for getenv(), which is now deprecated. o New functions Sys.getlocale() and Sys.setlocale() to query and set aspects of the locale of the R process, and Sys.localeconv() to find the default decimal point, etc. o New function Sys.info() for platform, host and user information. o New function Sys.putenv() to set environment variables. o New function Sys.sleep() to suspend execution for a while. o Date-time support functions with classes "POSIXct" and "POSIXlt" to represent dates/times (resolution 1 second) in the POSIX formats. Functions include Sys.time(), as.POSIXct(), strftime(), strptime(), and methods for format, plot, c, .... There are conversion functions for objects from packages `date' and `chron'; unlike those packages these support functions know about time zones (if the OS does). o tcltk package now has tkpager() which is designed to be used by file.show() and shows help pages etc. in separate text widgets. o tcltk is now more careful about removing the objects representing widgets in the R workspace when the windows are destroyed (e.g. using window manager controls) o tcltk package has had several canvas functions implemented. o tcltk now wraps callbacks to R in a try() construct - the nonlocal return from R's error handling could bring the Tk system into a strange state. o New demos for tcltk: tkfaq, tkfilefind, tkcanvas. o termplot() now has an `ask' argument. o terms() creates objects which now inherit from class "formula", so for example as.formula(terms.object) needs to be replaced by formula(terms.object). o traceback() is now printed un-quoted and labelled by the frame number. o New argument `recursive' to unlink(). The default behaviour on Unix is now that of rm -f, not rm -rf. unlink() is now compatible across platforms. o New functions write.ftable() and read.ftable() for writing out and reading in flat contingency tables. o write.table() now quotes factor columns if quote=TRUE, and has a new argument `qmethod' to control the escaping of embedded quotes in character or factor columns. o New function xtabs() providing a formula interface to cross tabulation. o The R Data Import/Export Manual (`R-data.texi') has been added. o The set of valid R names is now described (at last) in R-intro. o The R Language Manual (`R-lang.texi') is now included and built in the same way as the other manuals. o The R manuals (R-intro, R-exts, ...) are converted to HTML format (if the necessary texinfo tools are available) and linked into the top HTML help page. o The header file `R.h' and those included from it are now usable with C++ code. o New header file `R_ext/Boolean.h': Rboolean type with TRUE and FALSE enum constants. o New header file `Rgraphics.h' to allow addons to use graphics structures. o Recommended include file `Rmath.h' replaces `R_ext/Mathlib.h'. o Bessel, beta and gamma functions are now documented as part of the API. Undocumented entry points are no longer in the header files, and some are no longer visible. o Calloc & Realloc failures now give size information. o DESCRIPTION file in installed packages has a new `Built:' field giving build information (R version, platform, date). o Much improved support for C++ code in add-on packages under Unix. New configure/build variables SHLIB_CXXLD and SHLIB_CXXLDFLAGS for specifying the command and flags needed for building shared libraries containing objects from a C++ compiler. Configure tries to get these right in typical cases (GNU tools and/or common platforms). C++ source suffixes `.cpp' and `.C' are now recognized in addition to `.cc'. o Configure/build variables MAINLD and MAINLDFLAGS are renamed to MAIN_LD and MAIN_LDFLAGS for consistency with other MAIN_* vars, similarly for SHLIBLD and SHLIBLDFLAGS. o Configure/build variable FLIBS now only contains the Fortran 77 intrinsic and run-time libraries needed for linking a Fortran 77 program or shared library (as determined by configure). BLAS library detection was extended, with results saved to the Make variable BLAS_LIBS which is also available to add-on packages. o R CMD build and check have been completely re-written in Perl. In addition to running examples, check now also checks the directory structure and control files, makes a temporary installation and runs LaTeX on the help pages. Build has been reduced to cleaning, rewriting indices and creating tar files. The same files of Perl code are now also used under Windows. o Add-ons for utilities like Perl or LaTeX have now a central place in $R_HOME/share. Migration of existing files might take a while, though. o Preliminary support for building R as a shared library (`libR') under Unix. Use configure with option `--enable-R-shlib' or do `make libR' in directory `src/main' to create the shared library. There is also a linker front-end `R CMD LINK' which is useful for creating executable programs linked against the R shared library. BUG FIXES o New "[.AsIs" function fixing PR#665. o Effectively zero-length arrows() are omitted (rather than getting a system- and device-dependent arbitrary angle). o barplot() passes "..." down to plot.window as documented. o bxp(*) now obeys axes, xaxt, yaxt & ylim arguments (again?). o contour(.., labcex = 0.6, .. , vfont = c("sans serif", "plain"), ..) now behaves as it has been documented, PR#740. o D(.) is now more correctly documented, has second argument "name" instead of "namevec" (S compatibility), and gives a warning when name has not length 1. o dbinom() and dpois() now use a the accurate algorithm of C.Loader; e.g., 1 - 2*sum(dbinom(0:999, 1999, 1/2)) is now zero instead of 1e-12. o dbeta(), df(), dt(), dnbinom(), dgeom(), dgamma(), now all use the more accurate algorithms of dbinom() and dpois(); More limits are computed correctly, e.g. dgeom(Inf,*), or dnbinom(*,*,p=0), and integer argument coercion is more consistent. o dbeta(x, a,b) was giving NaN and Inf for large a and b. o The math functions now (again!) return NaN (not NA) when the warning message says so (e.g. gamma(-1)). o Paper sizes for "a4" and "legal" were interchanged in dev.print(). o Improved logic in the re-scaling of plots in dev.print(). o dev.print() and dev.copy2eps() now evaluate arguments as needed, so e.g. dev.print(file="junk.ps", horizontal=F) will work (previously =FALSE was needed). o Now dweibull(0,1) == dexp(0) == 1 for consistency. o Changing column modes from factor/character to numeric in edit.data.frame() (and fix() on data frames) is now allowed. o gctorture() did return a value although documented not to, that of gcinfo. It now returns the previous setting of gctorture. o glm() now follows lm() in dropping unused factor levels when fitting. o hist() now labels y-axis Density rather than Relative Frequency if freq=FALSE. The `intensities' component of the result is now deprecated and `density' should be used instead. o hsv() truncation bug fixed (hopefully correctly this time...) o library.dynam() no longer fails if the library appears more than once in lib.loc. o lm.fit & lm.wfit (and hence lm) now give understandable error messages when there are 0 non-NA cases. o match() does not always use "as.character()" anymore, fixes PR#741. o Trimmed mean() and median() are no longer attempted for complex data. o median() of empty vector is now NA. o model.matrix() can now handle NAs in factors. o model.matrix() now uses ":" not "." in labelling interaction terms, as terms() and the prototype do (PR#701). o old.packages() now sorts version strings correctly by splitting at "." and "-". o optim() has several new precautions against bugs, one of which was an infinite loop in the L-BFGS-B method if the derivatives were inaccurate (or if numerical derivatives were used and the problem was badly scaled). o pairs() now obeys an "cex = " argument, and so does panel.smooth(). o pf() had a bug in the code handling large noncentrality parameters, going all the way back to the original Appl.Stat. algorithm (PR#752). This affected pbeta() as well. o phantom(expr) in plotmath was used to calculate the bounding boxes, but the space was not actually used in typesetting the expression (PR#622). o Problem with subsetting and "..." arguments in plot.formula() (PR#757) o plot.lm() has a better default for its `ask' argument. o plot.new() does *NOT* allow an argument (`ask') anymore. This has not been working (since ~ R 0.49), is low-level and hence should not break anything. o plot.stl() now uses correct time labels for tickmarks of x-axes. o pnorm() is somewhat more accurate (SIXTEN=16; PR#699) and `infinitesimally faster' in some cases, thanks to James M. Rath. o Failure to open a postscript() device now gives diagnostic warnings. o Zero the widths of undefined chars in postscript(). o Make font metrics local to the device in postscript(), so that simultaneous instances of postscript/xfig/bitmap can use different values for `family'. o postscript() no longer uses the initclip operator, which was against the EPSF specifications and broke inclusion of graphics in some documents. o In postscript(), cleaned up the internals to fix some cases where it was unclear whether a variable was meant to set or track device status. o In some cases, emitted postscript violated the PS Document Structuring Conventions since some settings were carried over from one page to the next. (Caused breakage when turning antialiasing on/off in "gv" for instance.) o The DocumentMedia comment in postscript() output was wrong, and the font DSC comments have been changed to the preferred style for DSC 3.0. o pretty(x <- c(2.8,3))[1] - x[1] is now 0; in general, p <- pretty(x) now again fulfills p[1] <= x[] <= p[length(p)]. o print.dist() {mva} now passes "..." to print.default. o print.noquote("ABC") now works. o prompt(fn) uses fn's "source" attribute if it has one. o In prop.test(), the conf.int. now contains the estimate, even when that is 0 or 1 (PR#714). o qnorm(0) and qnorm(1) now give -/+ Inf (again!). o qt(*, log = TRUE) has a somewhat extended working range. o Specifying col.names in read.table() now overrides any header line in the data file. o Bug caused rpois() to generate biased variables in some cases. o scale(scale=TRUE) gave all NAs in any columns containing NAs. o eda's smooth() now computes Tukey's endrule properly. o smooth.spline()'s GCV method now uses a more accurate formula when there are repeated x points. o stars() fix (for 0/NA columns) PR#739. o data(state)'s state.abb has been corrected to use official 2-letter abbrevations. o strsplit() had two memory leaks. o tcltk interface now has better string quoting and no longer breaks on strings with unbalanced braces o tcltk callbacks used to include a "%..." argument on the call if the callback function had a "..." argument. This is no longer the case. o t.test() allows an input vector of length 2. o Method dispatch in primitive functions such as `c' only occurred if they were called by that name, and in particular not if used in lapply or called as .Primitive("c"). It now always occurs. o Method dispatching now forces evaluation of promises, so autoloading works with methods. o c(0.099999994, 0.2) prints as 0.1 0.2 not 0.10 0.20 after correcting the precision calculations. o Internal function fprec was overflowing for numbers around 1e-305. o [internal] .C("strsignif",*) doesn't use fixed size strings anymore (possible overflow). o ff[i] <- r now works for formula (and potentially other non-standard) objects ff. o Errors in argument matching could cause crashes if error handler was used. o NULL == ... now gives logical(0) instead of an error. This fixes a bug with e.g. apply(X,2,median, na.rm = TRUE) and all(NULL == NULL) is now TRUE. o polylines with more than 64K pieces will now work on more X servers with the x11 device. o R CMD Rd2dvi now again works with file names containing "_" or "$". o R CMD Rdconv now handles .rd as input file extension correctly in all cases. o make install could fail if there were no shared libraries to install (e.g. on vanilla Solaris). o Rd's \describe{} constructs are converted better to text output, and \items of >=22 chars now work. o Help aliases "(" and "{" now work, apart from as PDF hyperlinks. o NA || x , NA && y (etc) do not give errors anymore, but work as the "|" and "&" operators and as documented (PR#749). o Coercing lists to functions failed if argument list was empty. (PR#743). Also coercing functions to lists was wrong when the body was a single constant. ************************************************** * * * 1.1 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.1.1 NEW FEATURES o data(), example() and help() now search the loaded packages, then in their .lib.loc argument, the latter as pre-0.99.0. See their help pages for the precise details. o help() has a new argument `try.all.packages' set by the option "help.try.all.packages". If help is not found in the normal path and this is TRUE then a search is made of all packages for possible matches. o Improved detection of Tcl/Tk at configure time. One can either set configure variables TCLTK_CPPFLAGS and TCLTK_LIBS, or give the locations of the tclConfig.sh and tkConfig.sh scripts via the `--with-tcl-config' and `--with-tk-config' arguments. o prop.trend.test() - test for trend in proportions. o write.table() has new argument `dec' for setting the decimal separator (SPSS/Windows and probably others want commas in continental European locales). o Advance warning: save(, oldstyle=TRUE) will no longer be available after this release. o Symbols can now be coerced to expressions, making as.expression(quote(a)) work BUG FIXES o data() now works correctly with data-only packages. o Standalone Mathlib can now be made if builddir = srcdir (working around an undocumented autoconf `feature'). o Check for pre-1.1.0 saved object .Postscript.options in postscript(). o More stringent checks on the arguments to dataentry(). o Specifying xlab as an expression now works again. o dev2bitmap() works again. o Numerous uses of `F' and `T' replaced by `FALSE' and `TRUE'. o bxp() now extends `ylim' properly when notch=TRUE (and a notch is more extreme than other stats). Also, varwidth is okay again, see example(split). o Making manuals without making R first now works. o princomp() now works when some eigenvalues are tiny negative values (which are treated as zero). o SearchEngine.html was not installed when builddir != srcdir. o lm.{w}fit(x,y,..) now work when x has no column names. These functions no longer add and subtract n zeros when there's no offset. They are now documented somewhat. o Some HTML files used src="R.css" instead of href="R.css" causing some browsers to ignore the style sheet. `R.css' now passes the w3c CSS validator and gives the intended results with Internet Explorer. `R.css' is copied to all library directories. o The data editor no longer crashes when entries contain more than 45 characters, and works correctly if the field width is larger than the window width. o Recording plots used to ignore graphics events before the last replay. o plot(), points(), etc now give warnings and error for invalid `type' arguments. o matplot() now allows the same `type's as plot(). o dev.print() and dev.copy2eps() now work when called from a function, such as dev2bitmap(). o anova.glmlist works correctly with decreasing models and test="F" now gets the correct residual df. o Functions created (not just edited) with fix() now get environment .GlobalEnv not the body of fix. o Rdconv was ignoring OS-specific parts of the files with some Perl versions. (This did not affect installing packages.) o R CMD check did not run more than one specific test. o keyword2html omitted items when changing up a level, so the HTML search engine keyword list was missing `data' and `utilities', for example. o aov() with multiple strata was setting some spurious options. o Under UNIX, help(, htmlhelp=TRUE) uses the linked copy of the HTML file in ~/.R if help.start() has been run recently in the session, so the style sheet and hyperlinks should now be found. o dotplot's arguments `color' and `lcolor' are now interpreted correctly if they are vectors of length > 1. (It is not clear from the help that this was ever intended.) o Error messages of e.g. do.call() are now spaced properly. o summary(.matrix | .data.frame) now respects a `digits' argument. o scan() recognises quoted strings by default again. The default for the quote= argument got set wrongly when it was introduced. They are, however, turned off when using sep="\n", since you probably want unprocessed lines of text in that case. o fixed buglet where scan() would double a character following a terminating quote symbol. o kmeans was failing on vector inputs (although not documented to accept such). o fixes in predict.lm (John Maindonald) o NCOL got confused by 1D arrays, which it now reports have 1 column rather than NA. o rep(1:2,c(1,-1)) segfaulted (PR 619) o x[["a"]] <- y rejected some object types for y (e.g. expressions) which were accepted in x$a <- y (PR o data editor froze on empty data frame, and more generally on zero-length cols. o data editor did not handle factors properly in numeric-edit mode. o table() misbehaved on empty (or all-NA) data o data editor now handles empty data frames, allowing data entry to begin with dd<-edit(data.frame()) or dd<-data.frame() ; fix(dd) o plotting math expressions when specified as a LANGSXP or SYMSXP didn't work in several cases: plot(1,main=quote(a)) would segfault and there were problems with title(), text(), and mtext() as well. o optim(): no more segfault for REPORT=0; corrected error msg; .. maxit default is now okay also when "L-*-B" is chosen automatically. Using (abs|rel)tol with that method now gives a warning. o text() did not respect its `xpd' argument, the default of which is still to use par("xpd"); gave a wrong error message in one case. o polygon() had an incorrect documentation and silently disregarded "..." arguments. o predict.loess was giving incorrect results (those for the non-robust fit) in the case of a fit with family = "symmetric" and surface = "direct" and prediction with se = FALSE. The fitted values were missing for such fits. o Better rendering of ^ and ~ in latex in \code{} (and they should not appear outside code and verbatim sections). o Fixed unterminated string problem with lty (PR 584) o Fixed scoping problem with quasi() family (PR 614) CHANGES IN R VERSION 1.1.0 NEW FEATURES o There are several changes to the compile and link flags, and an attempt is made to use /usr/local/include and /usr/local/lib on all platforms. Please read config.site and INSTALL if you have set flags for previous versions. o New package tcltk, providing interface and language bindings for the Tcl/Tk graphical interface toolkit. This makes it possible to do some rather nifty things with buttons and entry fields and so forth in very few lines of code. It is still somewhat experimental so don't go churning out thousands of lines of GUI code and then blame us for changing the API later on. It does not currently work with GNOME because of event loop differences. See demo(tkttest) and demo(tkdensity). o Internally using global R_Expressions [getOption("expressions")] dramatically speeds up eval.c. o The X11 support code is now in a separate shared library, and option `--gui=none' will run R without X11 support (and so x11() and data.entry() will not be available). R BATCH sets --gui=none. o Configuring without X (e.g., `--without-x') does work (at last). configure will report if X11 support has been included. If R has been built without X11 the default GUI is "none". o GNOME support files have moved from src/gnome to src/unix/gnome and the code is now in a separate shared library. Both `--gui=GNOME' and `--gui=gnome' are allowed. The main graphics device for use with GNOME is now called gtk(); the x11() device from the X11 support can also be used. (The gnome() device remains unreliable, and is by default unavailable.) All GNOME support now installs in R_HOME/gnome to make it easier to package separately. o Command line option `-g' can now be used as short version of `--gui'. o The "keep.source" option now defaults to interactive() instead of TRUE. o Many interface enhancements to the data editor, which now uses (by default) variable-width columns and much less redrawing. See ?dataentry for a description of the current user interface. o R under Unix can be sent SIGUSR1 to quit and save or SIGUSR2 to quit and save without running .Last and on.exit expressions. o Added ability to use the graphics device driver to perform horizontal justification of strings. This is used in the x11(), windows(), postscript() and xfig() drivers and will lead to more accurate placing of centred or right-justified strings. o Formulas created with the tilde operator now contain the environment in which they were created. The environment of a formula can be accessed with the environment() function. This facility is still experimental; it is intended to help simplify writing modeling functions. o $ and $<- are now generic functions. o add1.glm() and drop1.glm() now allow test="F", which is appropriate for models with estimated dispersion. o approx() and approxfun() have an extra argument ties= to control handling of tied x values o New function as.symbol(), identical to as.name(). is.symbol and is.name() are now identical by definition; before, they were equivalent by implementation. o attach() now works for R data files. o axis() now has additional arguments. The argument "tick" turns tick drawing on and off (on by default). Additional arguments line, pos, and outer; allow more flexible placement of axes. o New device bitmap(), like dev2bitmap() but a stand-alone device. o boxplot() returns (and bxp() accepts) a list containing the summary statistics for the boxes (changed from a list of elements one for each box). o file="|cmd" is allowed (to pipe output to `cmd'), under cat() and postscript() and functions that use them (for example, write()). o New functions chartr() for general-purpose character translation in character vectors, and tolower() and toupper() for converting alphabetic characters to lower-case and upper-case, respectively. o coplot() has new option subscripts=TRUE to pass the indices to the panel function. o cor.test(method="spearman") might give slightly better P values, since it now relies on pnorm() (with proper tail) instead of alnorm. o dbinom() works for size=0 (where appropriate). o New trivial function det() for determinant computation (the example in ?qr did not seem to be sufficient). o If present in the package, a function .Last.lib will be called when a package is detached. o New function dev.copy2eps() copies the current device to an eps file, taking the size from that of the device. o dev.print() now prints if possible, and takes the size from the device being copied. o edit() or fix() applied to a numeric or character matrix now uses the data editor, if available. o edit.data.frame() edits factors in character mode by default, and will allow the row names to be edited, by default if they are not 1:nrow(name). o expand.model.frame() for adding variables to a model frame. o The handling of estimating the dispersion in glm() fits has been changed for consistency across methods. For `binomial' and `poisson' families the dispersion is always taken as one. For `quasibinomial' and `quasipoisson' families it is always estimated (by residual chisq/residual df). o Using "~" when specifying lib.loc (for example to help() or library()) is now supported. o image() has a new argument "breaks" and divides the zlim range into equal-length intervals. o install.packages() and update.packages() have a new `destdir' argument for the directory to which to download the packages. o New function interaction.plot(). o Internal cleanup of lapply()'s C code. o library(), require(), and sys.source() have a new argument ` keep.source = getOption("keep.source.pkgs") '. This defaults to false, but can be set (also for base) to true by setting the environment variable R_KEEP_PKG_SOURCE to "yes" o Par `lty' in lines() now defaults to par("lty") not "solid", for consistency with plot(). o list.files() [aka dir()]: path argument has now default = "." o locator() allows inline graphics parameters (for the plotting it does with type !="n"). o New function max.col() from MASS, thanks to V&R. o nlm() can now take additional arguments in ... to be passed to f. o par() returns elements in alphabetical order, and "ann" as a logical (not integer). o .Platform has a new component GUI specifying the GUI in use (which might be "unknown"). o plot.formula() searches for a plot method for the left-side of the formula before searching for a plot method for the right-side of the formula. o New bitmap devices png() and jpeg() on Unix/X11. (They were already available on Windows.) o postscript(print.it=TRUE) now does print the plot file. postscript(onefile=FALSE) now produces multiple separate files. o provide() is now deprecated. o New function quade.test() in package ctest for the Quade test for unreplicated blocked data. o quantile(x, probs) now propagates NA/NaN in probs. o Option for user-supplied normal random generator in RNGkind(). o read.fwf() is no longer dependent on Perl. o New arguments check.names and strip.white to read.table() and friends. o Functions recordPlot() and replayPlot() save a plot to an R variable and replay it. o residuals.lm() also allows types "partial" and "response" as residuals.glm(). o Added col option to rug(). o scale() is now generic with scale.default method. o New "call. = TRUE" argument for stop(), and new function stopifnot(.) -- to be used in "make check". o str(.) has a new optional argument "nchar.max = 128" and truncates strings longer than that. Also eliminated a few minor glitches. o The symbols() function is now implemented. o New function termplot() with similar functionality to plot.gam() in S. o The parameters to title() which specify the labels may now be specified as a list containing the parameter together with additional modifying par values (cex, col, font) which affect just that label. title() also has new line and outer arguments which provide functionality which matches that in axis(). o New functions which.min() amd which.max(). o The Wilcoxon and Ansari-Bradley tests now optionally return confidence intervals for the location or scale parameter of interest. o New argument `extend' to window() (and updated documentation). o write.table() can now write CSV files in the format Excel expects. o New device xfig() to produce XFig files. o New xyz.coords() utility function to be used for 3D highlevel plots. o R CMD build now also works for package bundles. o Rdconv allows an output file to be specified. o Initial support for C++ source code in add-on packages under Unix. o Mathlib can be built as a standalone library: see directory src/nmath/standalone. BUG FIXES o The Mathlib functions now use exactly the same values for +/-Inf, NaN and NA as the rest of R in all cases. o Improved automatic remaking. o option keep.source was not set correctly before the base package was loaded: some functions in the base package had the source kept. The memory usage should now be reduced by ca 1Mb. o The base file is no longer closed twice in case of a syntax error (caused segfault on Linux). o The X11 data editor scrolls cells and so allows more than ca 10 characters to be entered. Several interface/redraw errors have been corrected. o Using `destroy' or `close' on the X11 data editor window killed R. o Multiple `destroy' events or X11 errors killed R (PR#400). o Warnings from .Last or closing devices are printed where sensible (e.g. not on GNOME nor Windows console). o add1.glm() and drop1.glm() gave incorrect results in the "Chisq" test option when the scale was estimated. o aggregate() applied to multiple time series lost the series names. o as.hclust.twins() in package mva sets method=NA (PR#538) o ave(1:3) now works (as when is.null(list()) was TRUE years ago). o barplot(c(0.1, 0.5, 1), ylim = c(0, 1)) now works: [xy]axs="i" and exact limits now labels the limits. o by() works when embedded in a function. o The xlab and ylab in coplot() now set the x and y axis labels, as in S. Supply a second component to label the conditioning variables. o count.fields() and read.table() now have the same default quote = "\"'". o guard against segfault in dataentry(x<-1, Modes = plot), and the like. o dev.print() now checks if the current device is replayable (and not all devices were, despite the documentation). o The gtk() device (formerly x11() under GNOME) was incorrectly returning character information, so in particular `*' was wrongly centred as a plotting symbol. o is.qr() checks not only for $qr, but also for $rank & $qraux, PR#482. o library() will not leave the package on the search path if loading fails (including if .First.lib fails). o lqs(, method="S") rounded k0 on passing to C. o na.omit() now handles vectors and matrices as well as data frames. o plot.lm(*, which=4) now works thanks to Marcel Wolbers. o postscript() now uses the options "papersize" and "printcmd" rather than the values of R_PAPERSIZE in the environment and R_PRINTCMD found at build time. o postscript() now makes use of kerning information in computing string widths. o M <- 2 ; print(ppr(.., nterms = M)) now works. o ppr(, sm.method="spline") had an internal limit of 250 rows: this is now 2500 and is now checked. o predict.lm(,type="terms",se.fit=T) gives correct standard errors (thanks to John Maindonald) o print.ftable() now returns its argument. o proj.aovlist() now gives a non-zero result for strata with no fitted effects. o qnorm() is now based on AS 241 instead of AS 111, and should give precise results up to 16 digits precision. o rgeom(, prob=1) gives 0 rather than NA o rpois(*, lambda) now works when lambda > .Machine$integer.max o strheight("X") with no active device would segfault. o system() is now (partially) functional on systems without popen. o Fixed bug in undoc() - requiring new `chdir' argument for sys.source() o Fixed problem in usemethod() where CAR(call) could be non-symbol. o The x11() device no longer crashes R if a font is not found, and will warn if there is a size mismatch of more than 10%. o R CMD Rd2dvi now sorts files alphabetically. o Rdconv now reports if an invalid type is specified (rather than using latex). o Support for Rd conversion to Sd has been reinstated (it was unintentionally removed along with nroff-based conversion to text). o \deqn{} fix in R-exts.texi, PR#523. o Linpack.h now makes clear which routines are actually in R. o Entry-point "pythag" is now loaded even though it is not necessarily used in R. Where "hypot" is available pythag just calls hypot after checking for special values. o call_R will now correctly handle character vector arguments. o The alphabet links on top of HTML function indices with more than 100 entries now contain only the letters which are really first letters of at least one entry. CHANGES IN R VERSION 1.0.1 BUG FIXES o pgamma(Inf, 1, Inf) gives NaN instead of an infinite loop, PR#462. o Inline xaxt and yaxt parameters were ignored. o Setting the normal RNG was not always recorded in .Random.seed. o \link[pkg]{foo} links were wrongly translated to HTML. o Direct use of show.data() with no args was incorrect. o print.coefmat does sensible things if options show.signif.stars and show.coef.Pvalues are not set correctly. o x <- list(a=1, b=2) ; x["c"] <- 3 now (again) stretches the list rather than give a "subscript out of bounds" error. o Models with response appearing on rhs could cause segfault. o as.data.frame.matrix will now ensure the columns added have non-empty names. o Some (strange?) model formulas could cause memory corruption (thanks to John Fox for digging this up). o Matrix multiplication in cases such as 1:3 %*% t(1:2) is accepted. o Options --nsize and --vsize to R CMD check gave warning messages and only one was accepted. o The autoload()s during startup are "wrapped" such that conflicting objects don't break startup. o cor.test(*, meth="spear") {pkg ctest} now works (again) for n <= 6 o scale = 0 in biplot.princomp() now works. o The scores given by princomp(, cor = TRUE) and the rotated values given by prcomp(, scale = TRUE) are now computed from the scaled data. o barplot now works okay when length(col) < length(legend.txt), thanks to Ben Bolker, PR#494. o legend has new args `ncol' and `horiz' thanks to Ben Bolker. o kernel("dirichlet", m=10, r=1) in package ts now works. o save/restore of environments containing "..." object should work now. o qhyper should work better for large N. o qbinom(1-1e-16, n, p) , qpois() and qnbinom(*) looped for ever. o as.matrix.data.frame no longer escapes quotes in character vectors. o R would try to save the readline history at the end of non-interactive sessions, causing crashes on some systems. o Subtle roundoff problems caused arrays to be allocated short in loess.c in some cases, leading to segfaults. o Document that postscript(file="") sends the output directly to the default printer. o ts.union(, dframe=TRUE) had a long-standing typo, now works. o save(, ascii=TRUE) had problem with octal escapes in strings when there was a digit following, should work now. o matpoints() and matlines() now also have a "type =" argument with defaults "p" and "l", respectively; PR#506. o The new Perl 5.6 broke our version-detection mechanism. A better one has been inserted. o X11(colortype="gray") failed to work on 8-bit screens, and more generally when colour allocation failed X11() did not revert to monochrome correctly (and did not say it was doing so). It was not documented in the help that to change the X11 colortype one needs to close all open X11 devices. o loessf.f in modreg defined DSIGN unecessarily and this caused a conflict on AIX. o plot.lm will now work with rlm objects. o start and end behave better when the frequency is not an integer. o aggregate.ts is closer to S-PLUS's aggregate.rts. o quantile(x) now works when x contains several +/- Inf's. o guard against segfault in dataentry(0,0) (or, more realistically, when mistyping data.entry(x,y) as dataentry(x,y)) ********************************************************* * * * News of 1.0.0 and earlier is in file `ONEWS' * * * *********************************************************