Dear Emacs, please make this -*-Text-*- mode! This file covers NEWS up to the release of R-2.0.0. See 'ONEWS' for subsequent changes. ************************************************** * * * 2.0 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 2.0.0 USER-VISIBLE CHANGES o The stub packages from 1.9.x have been removed: the library() function selects the new home for their code. o `Lazy loading' of R code has been implemented, and is used for the standard and recommended packages by default. Rather than keep R objects in memory, they are kept in a database on disc and only loaded on first use. This accelerates startup (down to 40% of the time for 1.9.x) and reduces memory usage -- the latter is probably unimportant of itself, but reduces commensurately the time spent in garbage collection. Packages are by default installed using lazy loading if they have more than 25Kb of R code and did not use a saved image. This can be overridden by INSTALL --[no-]lazy or via a field in the DESCRIPTION file. Note that as with --save, any other packages which are required must be already installed. As the lazy-loading databases will be consulted often, R will be slower if run from a slow network-mounted disc. o All the datasets formerly in packages 'base' and 'stats' have been moved to a new package 'datasets'. data() does the appropriate substitution, with a warning. However, calls to data() are not normally needed as the data objects are visible in the 'datasets' package. Packages can be installed to make their data objects visible via R CMD INSTALL --lazy-data or via a field in the DESCRIPTION file. o Package 'graphics' has been split into 'grDevices' (the graphics devices shared between base and grid graphics) and 'graphics' (base graphics). Each of the 'graphics' and 'grid' packages load 'grDevices' when they are attached. Note that ps.options() has been moved to grDevices and user hooks may need to be updated. o The semantics of data() have changed (and were incorrectly documented in recent releases) and the function has been moved to package 'utils'. Please read the help page carefully if you use the 'package' or 'lib.loc' arguments. data() now lists datasets, and not just names which data() accepts. o Dataset 'phones' has been renamed to 'WorldPhones'. o Datasets 'sunspot.month' and 'sunspot.year' are available separately but not via data(sunspot) (which was used by package lattice to retrieve a dataset 'sunspot'). o Packages must have been re-installed for this version, and library() will enforce this. o Package names must now be given exactly in library() and require(), regardless of whether the underlying file system is case-sensitive or not. So 'library(mass)' will not work, even on Windows. o R no longer accepts associative use of relational operators. That is, 3 < 2 < 1 (which used to evalute as TRUE!) now causes a syntax error. If this breaks existing code, just add parentheses -- or braces in the case of plotmath. o The R parser now allows multiline strings, without escaping the newlines with backslashes (the old method still works). Patch by Mark Bravington. NEW FEATURES o There is a new atomic vector type, class "raw". See ?raw for full details including the operators and utility functions provided. o The default barplot() method by default uses a gamma-corrected grey palette (rather than the heat color palette) for coloring its output when given a matrix. o The 'formula' method for boxplot() has a 'na.action' argument, defaulting to NULL. This is mainly useful if the response is a matrix when the previous default of 'na.omit' would omit entire rows. (Related to PR#6846.) boxplot() and bxp() now obey global 'par' settings and also allow the specification of graphical options in more detail, compatibly with S-PLUS (fulfilling wishlist entry PR#6832) thanks to contributions from Arni Magnusson. For consistency, 'boxwex' is not an explicit argument anymore. o chull() has been moved to package graphics (as it uses xy.coords). o There is now a coef() method for summaries of "nls" objects. o compareVersion(), packageDescription() and read.00Index() have been moved to package 'utils'. o convolve(), fft(), mvfft() and nextn() have been moved to package stats. o coplot() now makes use of cex.lab and font.lab par() settings. o cumsum/prod/max/min() now preserve names. o data(), .path.packages() and .find.packages() now interpret package = NULL to mean all loaded packages. o data.frame() and its replacement methods remove the names from vector columns. Using I() will ensure that names are preserved. o data.frame(check.names = TRUE) (the default) enforces unique names, as S does. o .Defunct() now has 'new' and 'package' arguments like those of .Deprecated(). o The plot() method for "dendrogram" objects now respects many more nodePar and edgePar settings and for edge labeling computes the extents of the diamond more correctly. o deparse(), dput() and dump() have a new 'control' argument to control the level of detail when deparsing. dump() defaults to the most detail, the others default to less. See ?.deparseOpts for the details. They now evaluate promises by default: see ?dump for details. o dir.create() now expands '~' in filenames. o download.file() has a new progress meter (under Unix) if the length of the file is known -- it uses 50 equals signs. o dyn.load() and library.dynam() return an object describing the DLL that was loaded. For packages with namespaces, the DLL objects are stored in a list within the namespace. o New function eapply() - apply for environments. The supplied function is applied to each element of the environment; the order of application is not specified. o edit() and fix() use the object name in the window caption on some platforms (e.g. Windows). o Function file.edit() function added: like file.show(), but allows editing. o Function file.info() can return file sizes > 2G if the underlying OS supports such. o fisher.test(*, conf.int=FALSE) allows the confidence interval computation to be skipped. o formula() methods for classes "lm" and "glm" used the expanded formula (with '.' expanded) from the terms component. o The `formula' method for ftable() now looks for variables in the environment of the formula before the usual search path. o A new function getDLLRegisteredRoutines() returns information about the routines available from a DLL that were explicitly registered with R's dynamic loading facilities. o A new function getLoadedDLLs() returns information about the DLLs that are currently loaded within this session. o The package element returned by getNativeSymbolInfo() contains reference to both the internal object used to resolve symbols with the DLL, and the internal DllInfo structure used to represent the DLL within R. o help() now returns information about available documentation for a given topic, and notifies about multiple matches. It has a separate print() method. If the latex help files were not installed, help() will offer to create a latex file on-the-fly from the installed .Rd file. o heatmap() has a new argument 'reorderfun'. o Most versions of install.packages() have an new optional argument 'dependencies = TRUE' which will not only fetch the packages but also their uninstalled dependencies and their dependencies .... The Unix version of install.packages() attempts to install packages in an order that reflects their dependencies. (This is not needed for binary installs as used under Windows.) o interaction() has new argument 'sep'. o interaction.plot() allows 'type = "b"' and doesn't give spurious warnings when passed a matplot()-only argument such as 'main'. o is.integer() and is.numeric() always return FALSE for a factor. (Previously they were true and false respectively for well-formed factors, but it is possible to create factors with non-integer codes by underhand means.) o New functions is.leaf(), dendrapply() and a labels() method for dendrogram objects. o legend() has an argument 'pt.lwd' and setting 'density' now works because 'angle' now defaults to 45 (mostly contributed by Uwe Ligges). o library() now checks the version dependence (if any) of required packages mentioned in the Depends: field of the DESCRIPTION file. o load() now detects and gives a warning (rather than an error) for empty input, and tries to detect (but not correct) files which have had LF replaced by CR. o ls.str() and lsf.str() now return an object of class "ls_str" which has a print method. o make.names() has a new argument allow_, which if false allows its behaviour in R 1.8.1 to be reproduced. o The 'formula' method for mosaicplot() has a 'na.action' argument defaulting to 'na.omit'. o model.frame() now warns if it is given data = newdata and it creates a model frame with a different number of rows from that implied by the size of 'newdata'. Time series attributes are never copied to variables in the model frame unless na.action = NULL. (This was always the intention, but they sometimes were as the result of an earlier bug fix.) o There is a new 'padj' argument to mtext() and axis(). Code patch provided by Uwe Ligges (fixes PR#1659 and PR#7188). o Function package.dependencies() has been moved to package 'tools'. o The 'formula' method for pairs() has a 'na.action' argument, defaulting to 'na.pass', rather than the value of getOption("na.action"). o There are five new par() settings: 'family' can be used to specify a font family for graphics text. This is a device-independent family specification which gets mapped by the graphics device to a device-specific font specification (see, for example, postscriptFonts()). Currently, only PostScript, PDF, X11, Quartz, and Windows respond to this setting. 'lend', 'ljoin', and 'lmitre' control the cap style and join style for drawing lines (only noticeable on thick lines or borders). Currently, only PostScript, PDF, X11, and Quartz respond to these settings. 'lheight' is a multiplier used in determining the vertical spacing of multi-line text. All of these settings are currently only available via par() (i.e., not in-line as arguments to plot(), lines(), ...) o PCRE (as used by grep etc) has been updated to version 5.0. o A 'version' argument has been added to pdf() device. If this is set to "1.4", the device will support transparent colours. o plot.xy(), the workhorse function of points(), lines() and plot.default() now has 'lwd' as explicit argument instead of implicitly in '...', and now recycles lwd where it makes sense, i.e. for line-based plot symbols. o The png() and jpeg() devices (and the bmp() device under Windows) now allow a nominal resolution to be recorded in the file. o New functions to control mapping from device-independent graphics font family to device-specific family: postscriptFont() and postscriptFonts() (for both postscript() and pdf()); X11Font() and X11Fonts(); windowsFont() and windowsFonts(); quartzFont() and quartzFonts(). o power (x^y) has optimised code for y == 2. o prcomp() is now generic, with a formula method (based on an idea of Jari Oksanen). prcomp() now has a simple predict() method. o printCoefmat() has a new logical argument 'signif.legend'. o quantile() has the option of several methods described in Hyndman & Fan (1996). (Contributed by Rob Hyndman.) o rank() has two new 'ties.method's, "min" and "max". o New function read.fortran() reads Fortran-style fixed-format specifications. o read.fwf() reads multiline records, is faster for large files. o read.table() now accepts "NULL", "factor", "Date" and "POSIXct" as possible values of colClasses, and colClasses can be a named character vector. o readChar() can now read strings with embedded nuls. o The "dendrogram" method for reorder() now has a 'agglo.FUN' argument for specification of a weights agglomeration function. o New reorder() method for factors, slightly extending that in lattice. Contributed by Deepayan Sarkar. o Replaying a plot (with replayPlot() or via autoprinting) now automagically opens a device if none is open. o replayPlot() issues a warning if an attempt is made to replay a plot that was recorded using a different R version (the format for recorded plots is not guaranteed to be stable across different R versions). The Windows-menu equivalent (History...Get from variable) issues a similar warning. o reshape() can handle multiple 'id' variables. o It is now possible to specify colours with a full alpha transparency channel via the new 'alpha' argument to the rgb() and hsv() functions, or as a string of the form "#RRGGBBAA". NOTE: most devices draw nothing if a colour is not opaque, but PDF and Quartz devices will render semitransparent colours. A new argument 'alpha' to the function col2rgb() provides the ability to return the alpha component of colours (as well as the red, green, and blue components). o save() now checks that a binary connection is used. o seek() on connections now accepts and returns a double for the file position. This allows >2Gb files to be handled on a 64-bit platform (and some 32-bit platforms). o source() with 'echo = TRUE' uses the function source attribute when displaying commands as they are parsed. o setClass() and its utilities now warn if either superclasses or classes for slots are undefined. (Use setOldClass to register S3 classes for use as slots) o str(obj) now displays more reasonably the STRucture of S4 objects. It is also improved for language objects and lists with promise components. The method for class "dendrogram" has a new argument 'stem' and indicates when it's not printing all levels (as typically when e.g., 'max.level = 2'). Specifying 'max.level = 0' now allows to suppress all but the top level for hierarchical objects such as lists. This is different to previous behavior which was the default behavior of giving all levels is unchanged. The default behavior is unchanged but now specified by 'max.level = NA'. o system.time() has a new argument 'gcFirst' which, when TRUE, forces a garbage collection before timing begins. o tail() of a matrix now displays the original row numbers. o The default method for text() now coerces a factor to character and not to its internal codes. This is incompatible with S but seems what users would expect. It now also recycles (x,y) to the length of 'labels' if that is longer. This is now compatible with grid.text() and S. (See also PR#7084.) o TukeyHSD() now labels comparisons when applied to an interaction in an aov() fit. It detects non-factor terms in 'which' and drops them if sensible to do so. o There is now a replacement method for window(), to allow a range of values of time series to be replaced by specifying the start and end times (and optionally a frequency). o If writeLines() is given a connection that is not open, it now attempts to open it in mode = "wt" rather than the default mode specified when creating the connection. o The screen devices x11(), windows() and quartz() have a new argument 'bg' to set the default background colour. o Subassignments involving NAs and with a replacement value of length > 1 are now disallowed. (They were handled inconsistently in R < 2.0.0, see PR#7210.) For data frames they are disallowed altogether, even for logical matrix indices (the only case which used to work). o The way the comparison operators handle a list argument has been rationalized so a few more cases will now work -- see ?Comparison. o Indexing a vector by a character vector was slow if both the vector and index were long (say 10,000). Now hashing is used and the time should be linear in the longer of the lengths (but more memory is used). o Printing a character string with embedded nuls now prints the whole string, and non-printable characters are represented by octal escape sequences. o Objects created from a formally defined class now include the name of the corresponding package as an attribute in the object's class. This allows packages with namespaces to have private (non-exported) classes. o Changes to package 'grid': - Calculation of number of circles to draw in circleGrob now looks at length of y and r as well as length of x. - Calculation of number of rectangles to draw in rectGrob now looks at length of y, w, and h as well as length of x. - All primitives (rectangles, lines, text, ...) now handle non-finite values (NA, Inf, -Inf, NaN) for locations and sizes. Non-finite values for locations, sizes, and scales of viewports result in error messages. There is a new vignette ("nonfinite") which describes this new behaviour. - Fixed (unreported) bug in drawing circles. Now checks that radius is non-negative. - downViewport() now reports the depth it went down to find a viewport. Handy for "going back" to where you started, e.g., ... depth <- downViewport("vpname") upViewport(depth) - The "alpha" gpar() is now combined with the alpha channel of colours when creating a gcontext as follows: (internal C code) finalAlpha = gpar("alpha")*(R_ALPHA(col)/255) This means that gpar(alpha=) settings now affect internal colours so grid alpha transparency settings now are sent to graphics devices. The alpha setting is also cumulative. For example, ... grid.rect(width=0.5, height=0.5, gp=gpar(fill="blue")) # alpha = 1 pushViewport(viewport(gp=gpar(alpha=0.5))) grid.rect(height=0.25, gp=gpar(fill="red")) # alpha = 0.5 pushViewport(viewport(gp=gpar(alpha=0.5))) grid.rect(width=0.25, gp=gpar(fill="red")) # alpha = 0.25 ! - Editing a gp slot in a grob is now incremental. For example ... grid.lines(name="line") grid.edit("line", gp=gpar(col="red")) # line turns red grid.edit("line", gp=gpar(lwd=3)) # line becomes thick # AND STAYS red - The "cex" gpar is now cumulative. For example ... grid.rect(height=unit(4, "char")) # cex = 1 pushViewport(viewport(gp=gpar(cex=0.5))) grid.rect(height=unit(4, "char")) # cex = 0.5 pushViewport(viewport(gp=gpar(cex=0.5))) grid.rect(height=unit(4, "char")) # cex = 0.125 !!! - New childNames() function to list the names of children of a gTree. - The "grep" and "global" arguments have been implemented for grid.[add|edit|get|remove]Grob() functions. The "grep" argument has also been implemented for the grid.set() and setGrob(). - New function grid.grab() which creates a gTree from the current display list (i.e., the current page of output can be converted into a single gTree object with all grobs on the current page as children of the gTree and all the viewports used in drawing the current page in the childrenvp slot of the gTree). - New "lineend", "linejoin", and "linemitre" gpar()s: line end can be "round", "butt", or "square". line join can be "round", "mitre", or "bevel". line mitre can be any number larger than 1 (controls when a mitre join gets turned into a bevel join; proportional to angle between lines at join; very big number means that conversion only happens for lines that are almost parallel at join). - New grid.prompt() function for controlling whether the user is prompted before starting a new page of output. Grid no longer responds to the par(ask) setting in the "graphics" package. o The tcltk package has had the tkcmd() function renamed as tcl() since it could be used to invoke commands that had nothing to do with Tk. The old name is retained, but will be deprecated in a future release. Similarly, we now have tclopen(), tclclose(), tclread(), tclputs(), tclfile.tail(), and tclfile.dir() replacing counterparts starting with "tk", with old names retained for now. UTILITIES o R CMD check now checks for file names in a directory that differ only by case. o R CMD check now checks Rd files using R code from package tools, and gives refined diagnostics about "likely" Rd problems (stray top-level text which is silently discarded by Rdconv). o R CMD INSTALL now fails for packages with incomplete/invalid DESCRIPTION metadata, using new code from package tools which is also used by R CMD check. o list_files_with_exts (package tools) now handles zipped directories. o Package 'tools' now provides Rd_parse(), a simple top-level parser/analyzer for R documentation format. o tools::codoc() (and hence R CMD check) now checks any documentation for registered S3 methods and unexported objects in packages with namespaces. o Package 'utils' contains several new functions: - Generics toBibtex() and toLatex() for converting R objects to BibTeX and LaTeX (but almost no methods yet). - A much improved citation() function which also has a package argument. By default the citation is auto-generated from the package DESCRIPTION, the file 'inst/CITATION' can be used to override this, see help(citation) and help(citEntry). - sessionInfo() can be used to include version information about R and R packages in text or LaTeX documents. DOCUMENTATION o The DVI and PDF manuals are now all made on the paper specified by R_PAPERSIZE (default 'a4'), even the .texi manuals which were made on US letter paper in previous versions. o The reference manual now omits 'internal' help pages. o There is a new help page shown by help("Memory-limits") which documents the current design limitations on large objects. o The format of the LaTeX version of the documentation has changed. The old format is still accepted, but only the new resolves cross-references to object names containing _, for example. o HTML help pages now contain a reference to the package and version in the footer, and HTML package index pages give their name and version at the top. o All manuals in the 2.x series have new ISBN numbers. o The 'R Data Import/Export' manual has been revised and has a new chapter on `Reading Excel spreadsheets'. C-LEVEL FACILITIES o The PACKAGE argument for .C/.Call/.Fortran/.External can be omitted if the call is within code within a package with a namespace. This ensures that the native routine being called is found in the DLL of the correct version of the package if multiple versions of a package are loaded in the R session. Using a namespace and omitting the PACKAGE argument is currently the only way to ensure that the correct version is used. o The header Rmath.h contains a definition for R_VERSION_STRING which can be used to track different versions of R and libRmath. o The Makefile in src/nmath/standalone now has 'install' and 'uninstall' targets -- see the README file in that directory. o More of the header files, including Rinternals.h, Rdefines.h and Rversion.h, are now suitable for calling directly from C++. o Configure looks to a suitable option for inlining C code which made available as macro R_INLINE: see `Writing R Extensions' for further details. DEPRECATED & DEFUNCT o Direct use of R INSTALL|REMOVE|BATCH|COMPILE|SHLIB has been removed: use R CMD instead. o La.eigen(), tetragamma(), pentagamma(), package.contents() and package.description() are defunct. o The undocumented function newestVersion() is no longer exported from package utils. (Mainly because it was not completely general.) o C-level entry point ptr_R_GetX11Image has been removed, as it was replaced by R_GetX11Image at 1.7.0. o The undocumented C-level entry point R_IsNaNorNA has been removed. It was used in a couple of packages, and should be replaced by a call to the documented macro ISNAN. o The gnome/GNOME graphics device is now defunct. INSTALLATION CHANGES o Arithmetic supporting +/-Inf, NaNs and the IEC 60559 (aka IEEE 754) standard is now required -- the partial and often untested support for more limited arithmetic has been removed. The C99 macro isfinite is used in preference to finite if available (and its correct functioning is checked at configure time). Where isfinite or finite is available and works, it is used as the substitution value for R_FINITE. On some platforms this leads to a performance gain. (This applies to compiled code in packages only for isfinite.) o The dynamic libraries libR and libRlapack are now installed in R_HOME/lib rather than R_HOME/bin. o When --enable-R-shlib is specified, the R executable is now a small executable linked against libR: see the R-admin manual for further discussion. The 'extra' libraries bzip2, pcre, xdr and zlib are now compiled in a way that allows the code to be included in a shared library only if this option is specified, which might improve performance when it is not. o The main R executable is now R_HOME/exec/R not R_HOME/R.bin, to ease issues on MacOS X. (The location is needed when debugging core dumps, on other platforms.) o Configure now tests for 'inline' and alternatives, and the src/extra/bzip2 code now (potentially) uses inlining where available and not just under gcc. o The XPG4 sed is used on Solaris for forming dependencies, which should now be done correctly. o Makeinfo 4.5 or later is now required for building the HTML and Info versions of the manuals. However, binary distributions need to be made with 4.7 or later to ensure some of the links are correct. o f2c is not allowed on 64-bit platforms, as it uses longs for Fortran integers. o There are new options on how to make the PDF version of the reference manual -- see the 'R Administration and Installation Manual' section 2.2. o The concatenated Rd files in the installed 'man' directory are now compressed and the R CMD check routines can read the compressed files. o There is a new configure option --enable-linux-lfs that will build R with support for > 2Gb files on suitably recent 32-bit Linux systems. PACKAGE INSTALLATION CHANGES o The DESCRIPTION file of packages may contain a 'Imports:' field for packages whose namespaces are used but do not need to be attached. Such packages should no longer be listed in 'Depends:'. o There are new optional fields 'SaveImage', 'LazyLoad' and 'LazyData' in the DESCRIPTION file. Using 'SaveImage' is preferred to using an empty file 'install.R'. o A package can contain a file 'R/sysdata.rda' to contain system datasets to be lazy-loaded into the namespace/package environment. o The packages listed in 'Depends' are now loaded before a package is loaded (or its image is saved or it is prepared for lazy loading). This means that almost all uses of R_PROFILE.R and install.R are now unnecessary. o If installation of any package in a bundle fails, R CMD INSTALL will back out the installation of all of the bundle, not just the failed package (on both Unix and Windows). BUG FIXES o Complex superassignments were wrong when a variable with the same name existed locally, and were not documented in R-lang. o rbind.data.frame() dropped names/rownames from columns in all but the first data frame. o The dimnames<- method for data.frames was not checking the validity of the row names. o Various memory leaks reported by valgrind have been plugged. o gzcon() connections would sometimes read the crc bytes from the wrong place, possibly uninitialized memory. o Rd.sty contained a length \middle that was not needed after a revision in July 2000. It caused problems with LaTeX systems based on e-TeX which are starting to appear. o save() to a connection did not check that the connection was open for writing, nor that non-ascii saves cannot be made to a text-mode connection. o phyper() uses a new algorithm based on Morten Welinder's bug report (PR#6772). This leads to faster code for large arguments and more precise code, e.g. for phyper(59, 150,150, 60, lower=FALSE). This also fixes bug (PR#7064) about fisher.test(). o print.default(*, gap = ) now in principle accepts all non-negative values . o smooth.spline(...)$pen.crit had a typo in its computation; note this was printed in print.smooth.spline(*) but not used in other "smooth.spline" methods. o write.table() handles zero-row and zero-column inputs correctly. o debug() works on trivial functions instead of crashing. (PR#6804) o eval() could alter a data.frame/list second argument, so with(trees, Girth[1] <- NA) altered 'trees' (and any copy of 'trees' too). o cor() could corrupt memory when the standard deviation was zero. (PR#7037) o inverse.gaussian() always printed 1/mu^2 as the link function. o constrOptim() now passes ... arguments through optim to the objective function. o object.size() now has a better estimate for character vectors: it was in general too low (but only significantly so for very short character strings) but over-estimated NA and duplicated elements. o quantile() now interpolates correctly between finite and infinite values (giving +/-Inf rather than NaN). o library() now gives more informative error messages mentioning the package being loaded. o Building the reference manual no longer uses roman upright quotes in typewriter output. o model.frame() no longer builds invalid data frames if the data contains time series and rows are omitted by na.action. o write.table() did not escape quotes in column names. (PR#7171) o Range checks missing in recursive assignments using [[ ]]. (PR#7196) o packageStatus() reported partially-installed bundles as installed. o apply() failed on an array of dimension >=3 when for each iteration the function returns a named vector of length >=2. (PR#7205) o The GNOME interface was in some circumstances failing if run from a menu -- it needed to always specify that R be interactive. o depMtrxToStrings (part of pkgDepends) applied nrow() to a non-matrix and aborted on the result. o Fix some issues with nonsyntactical names in modelling code (PR#7202), relating to backquoting. There are likely more. o Support for S4 classes that extend basic classes has been fixed in several ways. as() methods and x@.Data should work better. o hist() and pretty() accept (and ignore) infinite values. (PR#7220) o It is no longer possible to call gzcon() more than once on a connection. o t.test() now detects nearly-constant input data. (PR#7225) o mle() had problems if ndeps or parscale was supplied in the control arguments for optim(). Also, the profiler is now more careful to reevaluate modified mle() calls in its parent environment. o Fix to rendering of accented superscripts and subscripts e.g., expression((b[dot(a)])). (Patch from Uwe Ligges.) o attach(*, pos=1) now gives a warning (and will give an error). o power.*test() now gives an error when 'sig.level' is outside [0,1]. (PR#7245) o Fitting a binomial glm with a matrix response lost the names of the response, which should have been transferred to the residuals and fitted values. o print.ts() could get the year wrong because rounding issue (PR#7255) ************************************************** * * * 1.9 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.9.1 Patched INSTALLATION ISSUES o Installation will now work even in Norwegian and Danish locales which sort AA at the end (for package stats4 which has AAA.R). BUG FIXES o Various memory leaks have been plugged and uses of strcpy() with overlapping src and dest corrected. o R CMD INSTALL now also works for /bin/sh's such as the one from Solaris 8 which fail when a function has the same name as a variable. o The Date method for trunc() failed. o window() failed if both start and end were outside the time range of the original series (possible if extend = TRUE). o coplot(..) doesn't give an extraneous warning anymore when called on a fresh device. o hasArg() used wrong logic to get the parent function. (sys.function() behaves differently from what is documented.) o prompt(f) now gives proper \usage{..} for f <- function(x, g = function(u) { v <- u^2 ; sin(v)/v }) { g(x) } o package.skeleton() now uses the supplied name in the DESCRIPTION file. o options(list('digits', 'scipen')) no longer seg.faults, the problem being the misuse of a list (PR#7078). o summary.Date() now has a more sensible default for 'digits'. o list.files(all.files = TRUE, recursive = TRUE) died on infinite recursion. (PR#7100) o cor(as.array(c(a=1,b=2)), cbind(1:2)) no longer seg.faults (PR#7116). cor(), cov() and var() no longer accidentally work with list() arguments as if they were unlist()ed. o as.matrix(data.frame(d=as.POSIXct("2004-07-20"))) doesn't give a wrong warning anymore. o gsub(perl=TRUE) code got the R length of return strings wrong in some circumstances (when the string was shortened). (Fixed also PR#7108) o summaryRprof() was ignoring functions whose name begins with dot, e.g. .C, .Call, .Fortran. (PR#7137) o loglin() could segfault if 'start' was of the wrong length. (PR#7123) o model.tables(type="means") could fail in a design where a projection gave all zeros. (PR#7132) o Applying attributes() to a pairlist, e.g. .Options, could segfault. o The checking of R versions incorrectly assumed 1.9.1 >= 1.50. o str(Surv(..)) failed for type = "counting" Surv objects and for promises. o approx(c(1,2),c(NA,NA),1.5,rule=2) does not segfault anymore (PR#7177), but gives an error. o nls(model = TRUE) was broken. o Subsetted assignments of the form A[i1, i2, i3] <- B stopped as soon as an NA was encountered in an index so subsequent non-NA indices were ignored. (PR#7210) o Fixed bug in handling of lwd=NA in contour(). o is.na() was returning undefined results on nested lists. CHANGES IN R VERSION 1.9.1 NEW FEATURES o as.Date() now has a method for "POSIXlt" objects. o mean() has a method for "difftime" objects and so summary() works for such objects. o legend() has a new argument 'pt.cex'. o plot.ts() has more arguments, particularly 'yax.flip'. o heatmap() has a new 'keep.dendro' argument. o The default barplot method now handles vectors and 1-d arrays (e.g., obtained by table()) the same, and uses grey instead of heat color palettes in these cases. (Also fixes PR#6776.) o nls() now looks for variables and functions in its formula in the environment of the formula before the search path, in the same way lm() etc look for variables in their formulae. INSTALLATION ISSUES o src/modules/X11/dataentry.c would not build on some XFree 4.4.0 systems. (This is a bug in their header files but we have added a workaround.) o Building with gcc/g77 3.4.0 on ix86 platforms failed to produce a working build: the critical LAPACK routines are now compiled with -ffloat-store. o Added patches to enable 64-bit builds on AIX 5.1: see the R-admin manual for details. o Added some patches to allow non-IEEE-754 installations to work reasonably well. (Infs and NAs are still not handled properly in complex arithmetic and functions such as sin(). See also Deprecated, as support for non-IEEE-754 installations is about to be removed.) o Installation will now work in Estonian (et_EE*) locales, which sort z before u. (PR#6958) DEPRECATED & DEFUNCT o Support for non-IEEE-754 arithmetic (which has been untested for some time) will be removed in the next full release. o Direct use of R INSTALL|REMOVE|BATCH|COMPILE|SHLIB is deprecated: use R CMD instead. o The gnome/GNOME graphics device is deprecated and will be removed in the next full release. BUG FIXES o pbinom(q, N, prob) is now more accurate when prob is close to 0. (PR#6757) o pcauchy(x, .., log.p) is now more accurate for large x, particularly when log.p = TRUE. (PR#6756) o pgeom(q, prob, lower.tail, log.p) is now (sometimes much) more accurate when prob is very small. (PR#6792) The code for pgeom(prob=1) assumed IEEE 754 arithmetic, and gave NaNs under gcc 3.4.0 -fPIC, for example. o makeARIMA() was not handling an ARMA(0, 0) model correctly. o as.Date() was failing on factors. (PR#6779) o min(), max() and range() were failing on "difftime" objects. o as.data.frame.list() could fail on some unusual list names. (PR#6782) o type.convert() ignored na.strings when no conversion was done. (PR#6781, not needed for its primary use in read.table.) o Fixed a clipping problem in the quartz() device. o Subsetting a factor swapped the order of the attributes, which identical() cares about. (PR#6799) o The L-BFGS-B option of optim() apparently needs part of its workspace zeroed. (PR#6720) o extractAIC.survreg() needed updating. o When using the header Rmath.h in standalone mode, the case where TRUE, FALSE are already defined is now handled correctly. o Package utils now exports several functions that are needed for writing Sweave drivers. o Comparison of two lists/expressions was giving nonsensical (and often random) answers, and is now an error. o The C-level function ncols was returning a random answer (often 0) for a 1D array. This caused model.matrix to misbehave (perhaps segfault) if a term was a 1D array. (PR#6838) o The configure script now finds the pdf viewers ggv and gpdf. o Workaround for the problems strptime on MacOS X has with dates before 1900. o 'R CMD build' works in a directory whose path contains spaces. (PR#6830 under Unix/Linux: it already worked under Windows.) Also 'R CMD check'. o mosaicplot() stops cleanly if given a table containing missing values. o install.packages() from a local CRAN was broken. o bxp() fixed for e.g., boxplot(..., border=2:4) o approx(list(x=rep(NaN,9), y=1:9), xout=NaN) does not seg.fault anymore (PR#6809). o plot(1, pch=NA) does not give an error anymore and plot(1:2, pch=c("o",NA)) only prints one symbol (PR#6876). o diffinv(matrix(3, 7,0)) now works. o plot.ts(z) for multivariate 'z' now properly draws all 'nc' xlab`s when nc > 1 and obeys 'ann=FALSE' or 'axes=FALSE'. o aggregate(.data.frame) failed if the answer would have had one row. o recordPlot() and replayPlot() failed to duplicate the display list, so further plotting altered the saved or replayed object. o Assignments of the form adf[i,j] <- value now accept a data-frame value as well as a list value. o dir.create() sometimes erroneously continued to report a directory already existed after the first instance. (PR#6892) o arima.sim() allows a null model. o which.min() & which.max()'s C code now PROTECT()'s its result. o Building standalone nmath did not support some of the DEBUG options. o mle() got confused if start value list was not in same order as arguments of likelihood function (reported by Ben Bolker) o backsolve(r, x, k) now allows k < nrow(x) - as its documentation always claimed. o update.packages("mgcv") and old.packages(*) now give a better error message; and installed.packages("mgcv") properly returns . o stats:::as.dendrogram.hclust() is documented and no longer re-sorts the two children at each node. This fixes as.dendrogram(hh) for the case where hh is a "reordered" hclust object. plot.dendrogram(x) now draws leaves 'x' more sensibly. reorder.dendrogram() now results in a dendrogram with correct "midpoint"s, and hence reordered dendrograms are plotted correctly. stats:::midcache.dendrogram() and hence the reorder() and rev() dendrogram methods do not return bloated dendrograms. o heatmap(*, labRow=., labCol=.) now also reorders the labels when specified---not only when using default labels. o Copying lattice (grid) output to another device now works again (There were intermittent problems in 1.9.0 - PR#6915, #6947/8.) o hist() uses a more robust choice of its 'diddle' factor, used to detect if an observation is on a bin boundary. (PR#6931) o jitter(x) now returns x when length(x) == 0. o Under some rare circumstances the locale-specific tables used by the perl=TRUE option to grep() etc were being corrupted and so matches were missed. o qbinom(*, prob = 0, lower.tail = FALSE) now properly gives 0. (PR#6972) o Class "octmode" needed a "[" method to preserve the class: see example(file.info) for an example. CHANGES IN R VERSION 1.9.0 USER-VISIBLE CHANGES o Underscore '_' is now allowed in syntactically valid names, and make.names() no longer changes underscores. Very old code that makes use of underscore for assignment may now give confusing error messages. o Package 'base' has been split into packages 'base', 'graphics', 'stats' and 'utils'. All four are loaded in a default installation, but the separation allows a 'lean and mean' version of R to be used for tasks such as building indices. Packages ctest, eda, modreg, mva, nls, stepfun and ts have been merged into stats, and lqs has been returned to MASS. In all cases a stub has been left that will issue a warning and ensure that the appropriate new home is loaded. All the time series datasets have been moved to package stats. Sweave has been moved to utils. Package mle has been moved to stats4 which will become the central place for statistical S4 classes and methods distributed with base R. Package mle remains as a stub. Users may notice that code in .Rprofile is run with only the new base loaded and so functions may now not be found. For example, ps.options(horizontal = TRUE) should be preceded by library(graphics) or called as graphics::ps.options or, better, set as a hook -- see ?setHook. o There has been a concerted effort to speed up the startup of an R session: it now takes about 2/3rds of the time of 1.8.1. o A warning is issued at startup in a UTF-8 locale, as currently R only supports single-byte encodings. NEW FEATURES o $, $<-, [[, [[<- can be applied to environments. Only character arguments are allowed and no partial matching is done. The semantics are basically that of get/assign to the environment with inherits=FALSE. o There are now print() and [ methods for "acf" objects. o aov() will now handle singular Error() models, with a warning. o arima() allows models with no free parameters to be fitted (to find log-likelihood and AIC values, thanks to Rob Hyndman). o array() and matrix() now allow 0-length `data' arguments for compatibility with S. o as.data.frame() now has a method for arrays. o as.matrix.data.frame() now coerces an all-logical data frame to a logical matrix. o New function assignInNamespace() parallelling fixInNamespace. o There is a new function contourLines() to produce contour lines (but not draw anything). This makes the CRAN package clines (with its clines() function) redundant. o D(), deriv(), etc now also differentiate asin(), acos(), atan(), (thanks to a contribution of Kasper Kristensen). o The `package' argument to data() is no longer allowed to be a (unquoted) name and so can be a variable name or a quoted character string. o There is a new class "Date" to represent dates (without times) plus many utility functions similar to those for date-times. See ?Date. o Deparsing (including using dump() and dput()) an integer vector now wraps it in as.integer() so it will be source()d correctly. (Related to PR#4361.) o .Deprecated() has a new argument `package' which is used in the warning message for non-base packages. o The print() method for "difftime" objects now handles arrays. o dir.create() is now an internal function (rather than a call to mkdir) on Unix as well as on Windows. There is now an option to suppress warnings from mkdir, which may or may not have been wanted. o dist() has a new method to calculate Minkowski distances. o expand.grid() returns appropriate array dimensions and dimnames in the attribute "out.attrs", and this is used by the predict() method for loess to return a suitable array. o factanal(), loess() and princomp() now explicitly check for numerical inputs; they might have silently coded factor variables in formulae. o New functions factorial(x) defined as gamma(x+1) and for S-PLUS compatibility, lfactorial(x) defined as lgamma(x+1). o findInterval(x, v) now allows +/-Inf values, and NAs in x. o formula.default() now looks for a "terms" component before a 'formula' argument in the saved call: the component will have `.' expanded and probably will have the original environment set as its environment. And what it does is now documented. o glm() arguments `etastart' and `mustart' are now evaluated via the model frame in the same way as `subset' and `weights'. o Functions grep(), regexpr(), sub() and gsub() now coerce their arguments to character, rather than give an error. The perl=TRUE argument now uses character tables prepared for the locale currently in use each time it is used, rather than those of the C locale. o New functions head() and tail() in package `utils'. (Based on a contribution by Patrick Burns.) o legend() has a new argument 'text.col'. o methods(class=) now checks for a matching generic, and so no longer returns methods for non-visible generics (and eliminates various mismatches). o A new function mget() will retrieve multiple values from an environment. o model.frame() methods, for example those for "lm" and "glm", pass relevant parts of ... onto the default method. (This has long been documented but not done.) The default method is now able to cope with model classes such as "lqs" and "ppr". o nls() and ppr() have a `model' argument to allow the model frame to be returned as part of the fitted object. o "POSIXct" objects can now have a "tzone" attribute that determines how they will be converted and printed. This means that date-time objects which have a timezone specified will generally be regarded as in their original time zone. o postscript() device output has been modified to work around rounding errors in low-precision calculations in gs >= 8.11. (PR#5285, which is not a bug in R.) It is now documented how to use other Computer Modern fonts, for example italic rather than slanted. o ppr() now fully supports categorical explanatory variables, ppr() is now interruptible at suitable places in the underlying FORTRAN code. o princomp() now warns if both `x' and `covmat' are supplied, and returns scores only if the centring used is known. o psigamma(x, deriv=0), a new function generalizes, digamma() etc. All these (psigamma, digamma, trigamma,...) now also work for x < 0. o pchisq(*, ncp > 0) and hence qchisq() now work with much higher values of ncp; it has become much more accurate in the left tail. o read.table() now allows embedded newlines in quoted fields. (PR#4555) o rep.default(0-length-vector, length.out=n) now gives a vector of length n and not length 0, for compatibility with S. If both `each' and `length.out' have been specified, it now recycles rather than fills with NAs for S compatibility. If both `times' and `length.out' have been specified, `times' is now ignored for S compatibility. (Previously padding with NAs was used.) The "POSIXct" and "POSIXlt" methods for rep() now pass ... on to the default method (as expected by PR#5818). o rgb2hsv() is new, an R interface the C API function with the same name. o User hooks can be set for onLoad, library, detach and onUnload of packages/namespaces: see ?setHook. o save() default arguments can now be set using option "save.defaults", which is also used by save.image() if option "save.image.defaults" is not present. o New function shQuote() to quote strings to be passed to OS shells. o sink() now has a split= argument to direct output to both the sink and the current output connection. o split.screen() now works for multiple devices at once. o On some OSes (including Windows and those using glibc) strptime() did not validate dates correctly, so we have added extra code to do so. However, this cannot correct scanning errors in the OS's strptime (although we have been able to work around these on Windows). Some examples are now tested for during configuration. o strsplit() now has `fixed' and `perl' arguments and split="" is optimized. o subset() now allows a `drop' argument which is passed on to the indexing method for data frames. o termplot() has an option to smooth the partial residuals. o varimax() and promax() add class "loadings" to their loadings component. o Model fits now add a "dataClasses" attribute to the terms, which can be used to check that the variables supplied for prediction are of the same type as those used for fitting. (It is currently used by predict() methods for classes "lm", "mlm", "glm" and "ppr", as well as methods in packages MASS, rpart and tree.) o New command-line argument --max-ppsize allows the size of the pointer protection stack to be set higher than the previous limit of 10000. o The fonts on an X11() device (also jpeg() and png() on Unix) can be specified by a new argument `fonts' defaulting to the value of a new option "X11fonts". o New functions in the tools package: pkgDepends, getDepList and installFoundDepends. These provide functionality for assessing dependencies and the availability of them (either locally or from on-line repositories). o The parsed contents of a NAMESPACE file are now stored at installation and if available used to speed loading the package, so packages with namespaces should be reinstalled. o Argument `asp' although not a graphics parameter is accepted in the ... of graphics functions without a warning. It now works as expected in contour(). o Package stats4 exports S4 generics for AIC() and BIC(). o The Mac OS X version now produces an R framework for easier linking of R into other programs. As a result, R.app is now relocatable. o Added experimental support for conditionals in NAMESPACE files. o Added as.list.environment to coerce environments to lists (efficiently). o New function addmargins() in the stats package to add marginal summaries to tables, e.g. row and column totals. (Based on a contribution by Bendix Carstensen.) o dendrogam edge and node labels can now be expressions (to be plotted via stats:::plotNode called from plot.dendrogram). The diamond frames around edge labels are more nicely scaled horizontally. o Methods defined in the methods package can now include default expressions for arguments. If these arguments are missing in the call, the defaults in the selected method will override a default in the generic. See ?setMethod. o Changes to package 'grid': - Renamed push/pop.viewport() to push/popViewport(). - Added upViewport(), downViewport(), and seekViewport() to allow creation and navigation of viewport tree (rather than just viewport stack). - Added id and id.lengths arguments to grid.polygon() to allow multiple polygons within single grid.polygon() call. - Added vpList(), vpStack(), vpTree(), and current.vpTree() to allow creation of viewport "bundles" that may be pushed at once (lists are pushed in parallel, stacks in series). current.vpTree() returns the current viewport tree. - Added vpPath() to allow specification of viewport path in downViewport() and seekViewport(). See ?viewports for an example of its use. NOTE: it is also possible to specify a path directly, e.g., something like "vp1::vp2", but this is only advised for interactive use (in case I decide to change the separator :: in later versions). - Added "just" argument to grid.layout() to allow justification of layout relative to parent viewport *IF* the layout is not the same size as the viewport. There's an example in help(grid.layout). - Allowed the "vp" slot in a grob to be a viewport name or a vpPath. The interpretation of these new alternatives is to call downViewport() with the name or vpPath before drawing the grob and upViewport() the appropriate amount after drawing the grob. Here's an example of the possible usage: pushViewport(viewport(w=.5, h=.5, name="A")) grid.rect() pushViewport(viewport(w=.5, h=.5, name="B")) grid.rect(gp=gpar(col="grey")) upViewport(2) grid.rect(vp="A", gp=gpar(fill="red")) grid.rect(vp=vpPath("A", "B"), gp=gpar(fill="blue")) - Added engine.display.list() function. This allows the user to tell grid NOT to use the graphics engine display list and to handle ALL redraws using its own display list (including redraws after device resizes and copies). This provides a way to avoid some of the problems with resizing a device when you have used grid.convert(), or the gridBase package, or even base functions such as legend(). There is a document discussing the use of display lists in grid on the grid web site (http://www.stat.auckland.ac.nz/~paul/grid/grid.html) - Changed the implementation of grob objects. They are no longer implemented as external references. They are now regular R objects which copy-by-value. This means that they can be saved/loaded like normal R objects. In order to retain some existing grob behaviour, the following changes were necessary: + grobs all now have a "name" slot. The grob name is used to uniquely identify a "drawn" grob (i.e., a grob on the display list). + grid.edit() and grid.pack() now take a grob name as the first argument instead of a grob. (Actually, they take a gPath - see below) + the "grobwidth" and "grobheight" units take either a grob OR a grob name (actually a gPath - see below). Only in the latter case will the unit be updated if the grob "pointed to" is modified. In addition, the following features are now possible with grobs: + grobs now save()/load() like any normal R object. + many grid.*() functions now have a *Grob() counterpart. The grid.*() version is used for its side-effect of drawing something or modifying something which has been drawn; the *Grob() version is used for its return value, which is a grob. This makes it more convenient to just work with grob objects without producing any graphical output (by using the *Grob() functions). + there is a gTree object (derived from grob), which is a grob that can have children. A gTree also has a "childrenvp" slot which is a viewport which is pushed and then "up"ed before the children are drawn; this allows the children of a gTree to place themselves somewhere in the viewports specified in the childrenvp by having a vpPath in their vp slot. + there is a gPath object, which is essentially a concatenation of grob names. This is used to specify the child of (a child of ...) a gTree. + there is a new API for creating/accessing/modifying grob objects: grid.add(), grid.remove(), grid.edit(), grid.get() (and their *Grob() counterparts can be used to add, remove, edit, or extract a grob or the child of a gTree. NOTE: the new grid.edit() API is incompatible with the previous version. - Added stringWidth(), stringHeight(), grobWidth(), and grobHeight() convenience functions (they produce "strwidth", "strheight", "grobwidth", and "grobheight" unit objects, respectively). - Allowed viewports to turn off clipping altogether. Possible settings for viewport clip arg are now: "on" = clip to the viewport (was TRUE) "inherit" = clip to whatever parent says (was FALSE) "off" = turn off clipping Still accept logical values (and NA maps to "off") UTILITIES o R CMD check now runs the (Rd) examples with default RNGkind (uniform & normal) and set.seed(1). example(*, setRNG = TRUE) does the same. o undoc() in package `tools' has a new default of `use.values = NULL' which produces a warning whenever the default values of function arguments differ between documentation and code. Note that this affects "R CMD check" as well. o Testing examples via massage-examples.pl (as used by R CMD check) now restores the search path after every help file. o checkS3methods() in package 'tools' now also looks for generics in the loaded namespaces/packages listed in the Depends fields of the package's DESCRIPTION file when testing an installed package. o The DESCRIPTION file of packages may contain a 'Suggests:' field for packages that are only used in examples or vignettes. o Added an option to package.dependencies() to handle the 'Suggests' levels of dependencies. o Vignette dependencies can now be checked and obtained via vignetteDepends. o Option 'repositories' to list URLs for package repositories added. o package.description() has been replaced by packageDescription(). o R CMD INSTALL/build now skip Subversion's .svn directories as well as CVS directories. C-LEVEL FACILITIES o arraySubscript and vectorSubscript take a new argument which is a function pointer that provides access to character strings (such as the names vector) rather than assuming these are passed in. o R_CheckUserInterrupt is now described in `Writing R Extensions' and there is a new equivalent subroutine rchkusr for calling from FORTRAN code. o hsv2rgb and rgb2hsv are newly in the C API. o Salloc and Srealloc are provided in S.h as wrappers for S_alloc and S_realloc, since current S versions use these forms. o The type used for vector lengths is now R_len_t rather than int, to allow for a future change. o The internal header nmath/dpq.h has slightly improved macros R_DT_val() and R_DT_Cval(), a new R_D_LExp() and improved R_DT_log() and R_DT_Clog(); this improves accuracy in several [dpq]-functions {for "extreme" arguments}. DEPRECATED & DEFUNCT o print.coefmat() is defunct, replaced by printCoefmat(). o codes() and codes<-() are defunct. o anovalist.lm (replaced in 1.2.0) is now defunct. o glm.fit.null(), lm.fit.null() and lm.wfit.null() are defunct. o print.atomic() is defunct. o The command-line arguments --nsize and --vsize are no longer recognized as synonyms for --min-nsize and --min-vsize (which replaced them in 1.2.0). o Unnecessary methods coef.{g}lm and fitted.{g}lm have been removed: they were each identical to the default method. o La.eigen() is deprecated now eigen() uses LAPACK by default. o tetragamma() and pentagamma() are deprecated, since they are equivalent to psigamma(, deriv=2) and psigamma(, deriv=3). o LTRUE/LFALSE in Rmath.h have been removed: they were deprecated in 1.2.0. o package.contents() and package.description() have been deprecated. INSTALLATION CHANGES o The defaults for configure are now --without-zlib --without-bzlib --without-pcre. The included PCRE sources have been updated to version 4.5 and PCRE >= 4.0 is now required if --with-pcre is used. The included zlib sources have been updated to 1.2.1, and this is now required if --with-zlib is used. o configure no longer lists bzip2 and PCRE as `additional capabilities' as all builds of R have had them since 1.7.0. o --with-blas=goto to use K. Goto's optimized BLAS will now work. BUG FIXES o When lm.{w}fit() disregarded arguments in ... they reported the values and not the names. o lm(singular.ok = FALSE) was looking for 0 rank, not rank < p. o The substitution code for strptime in the sources no longer follows glibc in silently `correcting' invalid inputs. o The cor() function did not remove missing values in the non-Pearson case. o [l]choose() use a more accurate formula which also slightly improves p- and qhyper(); choose(n, k) now returns 0 instead of NaN for k < 0 or > n. o find(simple.words=TRUE) (the default) was still using regular expressions for e.g. "+" and "*". Also, it checked the mode only of the first object matching a regular expression found in a package. o Memory leaks in [dpq]wilcox and [dqr]signrank have been plugged. These only occurred when multiple values of m or n > 50 were used in a single call. (PR#5314, plus another potential leak.) o Non-finite input values to eigen(), La.eigen(), svd() and La.svd() are now errors: they often caused infinite looping. (PR#5406, PR#4366, PR#3723: the fix for 3723/4366 returned a vector of NAs, not a matrix, for the eigenvectors.) o stepfun(x,y) now gives an error when `x' has length 0 instead of an invalid result (that could lead to a segmentation fault). o buildVignettes() uses file.remove() instead of unlink() to remove temporary files. o methods(class = "lqs") does not produce extraneous entries anymore. o Directly calling a method that uses NextMethod() no longer produces the erroneous error message 'function is not a closure'. o chisq.test(x, simulate.p.value = TRUE) could hang in an infinite loop or segfault, as r2dtable() did, when the entries in x where large. (PR#5701) o fisher.test(x) could give a P-value of 'Inf' in similar cases which now result in an error (PR#4688). It silently truncated non-integer 'x' instead of rounding. o cutree(a, h=h) silently gave wrong results when 'a' was an agnes object; now gives an error and reminds of as.hclust(). o postscript() could crash if given a font value outside the valid range 1...5. o qchisq(1-e, .., ncp=.) did not terminate for small e. (PR#6421 (PR#875)) o contrasts() turns a logical variable into a factor. This now always has levels c("FALSE", "TRUE") even if only one (or none) of these occur in the variable. o model.frame()'s lm and glm methods had 'data' and 'na.action' arguments which they ignored and have been removed. o The defaults data=list() in lm() and glm() could never be used and have been removed. glm had na.action=na.fail, again never used. o The internal tools function for listing all internal S3 generics was omitting all the members of the S3 group generics, which also accept methods for members. o Some BLASes were returning NA %*% 0 as 0 and some as NA. Now slower but more careful code is used if NAs are present. (PR#4582) o package.skeleton() no longer generates invalid filenames for code and help files. Also, care is taken not to generate filenames that differ only by case. o pairs() now respects axis graphical parameters such as cex.main, font.main and las. o Saving images of packages with namespaces (such as mle) was not compressing the image. o When formula.default() returned a terms object, it returned a result of class c("terms", "formula") with different subsetting rules from an object of class "formula". o The standalone Rmath library did not build correctly on systems with inaccurate log1p. o Specifying asp is now respected in calls like plot(1, 10, asp=1) with zero range on both axes. o outer() called rep() with an argument the generic does not have, and discarded the class of the answer. o object.size() now returns a real (not integer) answer and so can cope with objects occupying more than 2Gb. o Lookups base:: and ::: were not confining their search to the named package/namespace. o qbinom() was returning NaN for prob = 0 or 1 or size = 0 even though the result is well-defined. (In part, PR#5900.) o par(mgp)[2] was being interpreted as relative to par(mgp)[3]. (PR#6045) o Versioned install was broken both with and without namespaces: no R code was loaded. o methods(), getS3method() and the registration of S3 methods in namespaces were broken if the S3 generic was converted into an S4 generic by setting an S4 method. o Title and copyright holder of the reference manual are now in sync with the citation() command. o The validation code for POSIXlt dates and hence seq(, by="DSTdays") now works for large mday values (not just those in -1000...1000). (PR#6212) o The print() method for data frames now copes with data frames containing arrays (other than matrices). o texi2dvi() and buildVignettes() use clean=FALSE as default because the option is not supported on some Solaris machines. For buildVignettes() this makes no difference as it uses an internal cleanup mechanism. o The biplot() method for "prcomp" was not registered nor exported. (PR#6425) o Latex conversion of .Rd files was missing newline before \end{Section} etc which occasionally gave problems, as fixed for some other \end{Foo} in 1.8.1. (PR#5645) o Work around a glibc bug to make the %Z format usable in strftime(). o The glm method for rstandard() was wrongly scaled for cases where summary(model)$dispersion != 1. o Calling princomp() with a covariance matrix (rather than a list) failed to predict scores rather than predict NA as intended. (PR#6452) o termplot() is more tolerant of variables not in the data= argument. (PR#6327) o isoreg() could segfault on monotone input sequences. (PR#6494) o Rdconv detected \link{\url{}} only very slowly. (PR#6496) o aov() with Error() term and no intercept incorrectly assigned terms to strata. (PR#6510) o ftable() incorrectly handled arguments named "x". (PR#6541) o vector(), matrix(), array() and their internal equivalents report correctly that the number of elements specified was too large (rather than reporting it as negative). o Minor copy-paste error in example(names). (PR#6594) o length<-() now works correctly on factors (and is now generic with a method for factors). o x <- 2^32; x:(x+3) no longer generates an error (but gives a result of type "double"). o pgamma(30, 100, lower=FALSE, log=TRUE) is not quite 0, now. pgamma(x, alph) now only uses a normal approximation for alph > 1e5 instead of alph > 1000. This also improves the accuracy of ppois(). o qgamma() now does one or more final Newton steps, increasing accuracy from around 2e-8 to 3e-16 in some cases. (PR#2214). It allows values p close to 1 not returning Inf, with accuracy for 'lower=FALSE', and values close to 0 not returning 0 for 'log=TRUE'. These also apply to qchisq(), e.g., qchisq(1e-13, 4, lower=FALSE) is now finite and qchisq(1e-101, 1) is positive. o gamma(-n) now gives NaN for all negative integers -n. o The Unix version of browseURL() now protects the URL from the shell, for example allowing & and $ to occur in the URL. It was incorrectly attempting to use -remote "openURL()" for unknown browsers. o extractAIC.coxph() works around an inconsistency in the $loglik output from coxph. (PR#6646) o stem() was running into integer overflows with nearly-constant inputs, and scaling badly for constant ones. (Partly PR#6645) o system() under Unix was losing the 8095th char if the output was split. (PR#6624) o plot.lm() gave incorrect results if there were zero weights. (PR#6640) o Binary operators warned for inconsistent lengths on vector op vector operations, but not on vector op matrix ones. (PR#6633 and more.) Comparison operators did not warn about inconsistent lengths for real vectors, but did for integer, logical and character vectors. o spec.pgram(x, ..., pad, fast, ...) computed the periodogram with a bias (downward) whenever 'pad > 0' (non-default) or 'fast = TRUE' (default) and nextn(n) > n where n = length(x); similarly for 'df' (approximate degrees of freedom for chisq). o dgamma(0, a) now gives Inf for a < 1 (instead of NaN), and so does dchisq(0, 2*a, ncp). o pcauchy() is now correct in the extreme tails. o file.copy() did not check that any existing `from' file had been truncated before appending the new contents. o The QC files now check that their file operations succeeded. o replicate() worked by making the supplied expression the body of an anonymous function(x), leading to a variable capture issue. Now, function(...) is used instead. o chisq.test(simulate.p.value = TRUE) was returning slightly incorrect p values, notably p = 0 when the data gave the most extreme value. o terms.formula(simplify = TRUE) was losing offset terms. Multiple offset terms were not being removed correctly if two of them appeared first or last in the formula. (PR#6656) o Rd conversion to latex did not add a new line before \end{Section} in more cases than were corrected in 1.8.1. o split.default() dropped NA levels in its internal code but returned them as NA in all components in the interpreted code for factors. (PR#6672) o points.formula() had problems if there was a subset argument and no data argument. (PR#6652) o as.dist() does a bit more checking of its first argument and now warns when applied to non-square matrices. o mle() gives a more understandable error message when its 'start' argument is not ok. o All uses of dir.create() check the return value. download.packages() checks that destdir exists and is a directory. o Methods dispatch corrects an error that failed to find methods for classes that extend sealed classes (class unions that contain basic classes, e.g.). o Sweave no longer wraps the output of code chunks with echo=false and results=tex in Schunk environments. o termplot() handles models with missing data better, especially with na.action=na.exclude. o 1:2 * 1e-100 now prints with correct number of spaces. o Negative subscripts that were out of range or NA were not handled correctly. Mixing negative and NA subscripts is now caught as an error: it was not caught on some platforms and segfaulted on others. o gzfile() connections had trouble at EOF when used on uncompressed file. o The Unix version of dataentry segfaulted if the `Copy' button was used. (PR#6605) o unlist on lists containing expressions now works (PR#5628) o D(), deriv() and deriv3() now also can deal with gamma and lgamma. o The X11 module can now be built against XFree86 4.4.0 headers (still with some warnings). o seq.POSIXt(from, to, by="DSTdays") was shorter than expected for rare times in the UK time zone. (PR#4558) o c/rbind() did not support vectors/matrices of mode "list". (PR#6702) o summary() methods for POSIX[cl]t and Date classes coerced the number of NAs to a date on printing. o KalmanSmooth would sometimes return NA values with NA inputs. (PR#6738) o fligner.test() worked correctly only if data were already sorted by group levels. (PR#6739) ************************************************** * * * 1.8 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.8.1 NEW FEATURES o There is now a "Complex" S3 group generic (a side-effect of fixing up the corresponding S4 group generic). o help("regex") now gives a description of the regular expressions used in R. o The startup message now shows the R Foundation as copyright holder, and includes the R ISBN number and a pointer to the new citation() function. o The solve() function now uses the `tol' argument for all non-complex cases. The default tolerance for LINPACK is 1e-7, as before. For LAPACK it currently is .Machine$double.eps but may be changed in later versions of R. o help.search() now defaults to agrep = FALSE when keyword= is specified, since no one wants fuzzy matching of categories. o Function texi2dvi() in package tools can be used to compile latex files from within R, provided the OS has a command texi2dvi or texify. o Objects with formal S4 classes saved in pre-1.8 versions and loaded into the current version have incompatible class attributes (no package information). A new function, fixPre1.8() in package methods, will fix the class attributes. See the help for this function. o heatmap() allows Rowv/Colv = NA, suppressing the corresponding dendrogram. o An "antifeature": Tcl 8.0 is now officially unsupported. In 1.8.0 it just didn't work. This very old version lacks several features that are needed for the new version of the tcltk package. R will still build the tcltk package against Tcl 8.0 but the resulting package will not load. BUG FIXES o symnum(x) now behaves as documented when length(x) == 0 and uses lower.triangular = FALSE for logical arrays. o c() now has a method for "noquote" objects and hence works as expected. o split(1:10, c(1,2)) no longer gives a spurious warning. o The "Complex" S4 group generic now works. o abbreviate() doesn't get into infinite loops on input that differs only by leading/trailing space o Added check for user interrupt in Rvprintf to allow printing to be interrupted. o Fixed bug that would cause segfault on protect stack overflow. o crossprod() on matrices with zero extents would return an uninitialized matrix (rather than one filled with zeros). o DF[[i,j]] for a data frame used row j and col i, not as intended row i and col j. o Even more user errors in recursive indexing of lists are now caught. (PR#4486) o cor(, use = "pairwise") gave wrong result in 1.8.0 (only). (PR#4646) o merge.data.frame() could give incorrect names when one of the arguments had only one column. (PR#4299) o Subsetting a one-dimensional array dropped dimensions even when they were not of length one. (Related to PR#4110) o The plot() method for `ecdf' objects, plot.ecdf(), now allows to set a `ylab' argument (different from the default). o cor.test(*, method="spearman") gave wrong results `randomly' (because of a wrong type passed to C; PR#4718). o dist() objects with NA's didn't print these, now do. (PR#4866). o regexpr(fixed = TRUE) returned 0-based indices. o df[, length_1_index] <- value did not recycle short rhs. (PR#4820) o median() no longer `works' for odd-length factor variables. o packageStatus() is more robust to failing to contact a repository, and contacts the correct paths in the repositories under Windows. o .setOldIs (methods) contained a typo stopping POSIXct objects (etc) being included in formal classes. o terms() sometimes removed offset() terms incorrectly, since it counted by variables and not terms. Its "offset" attribute was incorrectly documented as referring to terms not variables. (Related to PR#4941) o buildVignettes() and pkgVignettes() in package tools are now documented. The call to texi2dvi is wrapped in the new function texi2dvi() which also works on Windows. o hclust() was sometimes not finding the correct inter-cluster distances with non-monotone methods. (PR#4195) o plot.hclust() now tolerates mode changes on dumped objects. (PR#4361) o prompt() no longer insists files are in the current directory. (PR#4978) o filter() did not use init in reverse order as documented. (PR#5017) o contrasts<-() and model.matrix() now have sanity checks that factors having at least 2 levels (or one level and a contrast matrix): model.matrix() gave nonsensical results for 0-level factors. o writeChar() could segfault if more characters were requested than exist. (PR#5090) o round() and signif() dropped attributes with 0-length inputs, only. (PR#4710) o The default graphics device in the GNOME interface was gtk, which is no longer in the base package. It is now X11. o The print button on the toolbar of the GNOME graphics device did not work. o The example code on the man page for TkWidgetcmds had not been updated after the change that made tkget (et al.) return tclObj objects, so the "Submit" button didn't work. o Rd conversion to latex did not add a new line before \end{Section} for the section environments, which caused problems if the last thing in a section was \preformatted{} (and potentially elsewhere). o Under some circumstances mosaicplot() failed if main was supplied as it was passed on to model.frame.default(). o Conversion to POSIXlt (including printing) of POSIXct dates before 1902 and after 2038 computed which were leap years from (year-1900) so got some xx00 years wrong. CHANGES IN R VERSION 1.8.0 MACOS CHANGES o As from this release there is only one R port for the Macintosh, which runs only on Mac OS X. (The `Carbon' port has been discontinued, and the `Darwin' port is part of the new version.) The current version can be run either as a command-line application or as an `Aqua' console. There is a `Quartz' device quartz(), and the download and installation of both source and binary packages is supported from the Aqua console. Those CRAN and BioC packages which build under Mac OS X have binary versions updated daily. USER-VISIBLE CHANGES o The defaults for glm.control(epsilon=1e-8, maxit=25) have been tightened: this will produce more accurate results, slightly slower. o sub, gsub, grep, regexpr, chartr, tolower, toupper, substr, substring, abbreviate and strsplit now handle missing values differently from "NA". o Saving data containing name space references no longer warns about name spaces possibly being unavailable on load. o On Unix-like systems interrupt signals now set a flag that is checked periodically rather than calling longjmp from the signal handler. This is analogous to the behavior on Windows. This reduces responsiveness to interrupts but prevents bugs caused by interrupting computations in a way that leaves the system in an inconsistent state. It also reduces the number of system calls, which can speed up computations on some platforms and make R more usable with systems like Mosix. CHANGES TO THE LANGUAGE o Error and warning handling has been modified to incorporate a flexible condition handling mechanism. See the online documentation of 'tryCatch' and 'signalCondition'. Code that does not use these new facilities should remain unaffected. o A triple colon operator can be used to access values of internal variables in a name space (i.e. a:::b is the value of the internal variable b in name space a). o Non-syntactic variable names can now be specified by inclusion between backticks `Like This`. The deparse() code has been changed to output non-syntactical names with this convention, when they occur as operands in expressions. This is controlled by a `backtick' argument, which is by default TRUE for composite expressions and FALSE for single symbols. This should give minimal interference with existing code. o Variables in formulae can be quoted by backticks, and such formulae can be used in the common model-fitting functions. terms.formula() will quote (by backticks) non-syntactic names in its "term.labels" attribute. [Note that other code using terms objects may expect syntactic names and/or not accept quoted names: such code will still work if the new feature is not used.] NEW FEATURES o New function bquote() does partial substitution like LISP backquote. o capture.output() takes arbitrary connections for `file' argument. o contr.poly() has a new `scores' argument to use as the base set for the polynomials. o cor() has a new argument `method = c("pearson","spearman","kendall")' as cor.test() did forever. The two rank based measures do work with all three missing value strategies. o New utility function cov2cor() {Cov -> Corr matrix}. o cut.POSIXt() now allows `breaks' to be more general intervals as allowed for the `by' argument to seq.POSIXt(). o data() now has an 'envir' argument. o det() uses an LU decomposition and LAPACK. The `method' argument to det() no longer has any effect. o dev.control() now accepts "enable" as well as "inhibit". (Wishlist PR#3424) o *, - and / work more generally on "difftime" objects, which now have a diff() method. o dt(*, ncp = V) is now implemented, thanks to Claus Ekstrom. o dump() only quotes object names in the file where necessary. o eval() of a promise forces the promise o file.path() now returns an empty character vector if given at least one zero-length argument. o format() and hence print() make an effort to handle corrupt data frames, with a warning. o format.info() now also works with `nsmall' in analogy with format.default(). o gamma(n) is very slightly more precise for integer n in 11:50. o ? and help() will accept more un-quoted arguments, e.g. NULL. o The "?" operator has new forms for querying documentation on S4 methods. See the online documentation. o New argument frame.plot = axes (== TRUE) for filled.contour(). o New argument fixed = TRUE for grep() and regexpr() to avoid the need to escape strings to match. o grep(x, ..., value = TRUE) preserves names of x. o hist.POSIXt() can now pass arguments to hist.default() o legend() and symbols() now make use of xy.coords() and accept a wider range of coordinate specifications. o Added function library.dynam.unload() to call dyn.unload() on a loaded DLL and tidy up. This is called for all the standard packages in namespaces with DLLs if their namespaces are unloaded. o lm(singular.ok = FALSE) is now implemented. o Empty lm() and glm() fits are now handled by the normal code: there are no methods for classes "lm.null" and "glm.null". Zero-rank fits are handled consistently. o make.names() has improvements, and there is a new auxiliary function make.unique(). (Based on code contributed by Tom Minka, since converted to a .Internal function.) In particular make.names() now recognises that names beginning with a dot are valid and that reserved words are not. o methods() has a print method which asterisks functions which are not user-visible. methods(class = "foo") now lists non-visible functions, and checks that there is a matching generic. o model.matrix() now warns when it removes the response from the rhs of the formula: that this happens is now documented on its help page. o New option `locatorBell' to control the confirmation beep during the use of locator() and identify(). o New option("scipen") provides some user control over the printing of numbers in fixed-point or exponential notation. (Contributed by David Brahm.) o plot.formula() now accepts horizontal=TRUE and works correctly when boxplots are produced. (Wishlist PR#1207) The code has been much simplified and corrected. o polygon() and rect() now interpret density < 0 or NA to mean filling (by colour) is desired: this allows filling and shading to be mixed in one call, e.g. from legend(). o The predict() methods for classes lm, glm, mlm and lqs take a `na.action' argument that controls how missing values in `newdata' are handled (and defaults to predicting NA). [Previously the value of getOption("na.action") was used and this by default omitted cases with missing values, even if set to `na.exclude'.] o print.summary.glm() now reports omitted coefficients in the same way as print.summary.lm(), and both show them as NAs in the table of coefficients. o print.table() has a new argument `zero.print' and is now documented. o rank(x, na.last = "keep") now preserves NAs in `x', and the argument `ties.method' allows to use non-averaging ranks in the presence of ties. o read.table()'s 'as.is' argument can be character, naming columns not to be converted. o rep() is now a generic function, with default, POSIXct and POSIXlt methods. For efficiency, the base code uses rep.int() rather than rep() where possible. o New function replicate() for repeated evaluation of expression and collection of results, wrapping a common use of sapply() for simulation purposes. o rev() is now a generic function, with default and dendrogram methods. o serialize() and unserialize() functions are available for low-level serialization to connections. o socketSelect() allows waiting on multiple sockets. o sort(method = "quick", decreasing = TRUE) is now implemented. o sort.list() has methods "quick" (a wrapper for sort(method = "quick", index.return = TRUE) and "radix" (a very fast method for small integers). The default "shell" method works faster on long vectors with many ties. o stripchart() now has `log', `add' and `at' arguments. o strsplit(x, *) now preserves names() but won't work for non-character `x' anymore {formerly used as.character(x), destroying names(x)}. o textConnection() now has a local argument for use with output connections. local = TRUE means the variable containing the output is assigned in the frame of the caller. o Using UseMethod() with more than two arguments now gives a warning (as R-lang.texi has long claimed it did). o New function vignette() for viewing or listing vignettes. o which.min(x) and which.max(x) now preserve names. o xy.coords() coerces "POSIXt" objects to "POSIXct", allowing lines etc to added to plot.POSIXlt() plots. o .Machine has a new entry, sizeof.pointer. o .Random.seed is only looked for and stored in the user's workspace. Previously the first place a variable of that name was found on the search path was used. o Subscripting for data.frames has been rationalized: - Using a single argument now ignores any `drop' argument (with a warning). Previously using `drop' inhibited list-like subscripting. - adf$name <- value now checks for the correct length of `value', replicating a whole number of times if needed. - adf[j] <- value and adf[[j]] <- value did not convert character vectors to factors, but adf[,j] <- value did. Now none do. Nor is a list `value' coerced to a data frame (thereby coercing character elements to factors). - Where replicating the replacement value a whole number of times will produce the right number of values, this is always done (rather than some times but not others). - Replacement list values can include NULL elements. - Subsetting a data frame can no longer produce duplicate column names. - Subsetting with drop=TRUE no longer sometimes drops dimensions on matrix or data frame columns of the data frame. - Attributes are no longer stripped when replacing part of a column. - Columns added in replacement operations will always be named, using the names of a list value if appropriate. - as.data.frame.list() did not cope with list names such as `check.rows', and formatting/printing data frames with such column names now works. - Row names in extraction are still made unique, but without forcing them to be syntactic names. - adf[x] <- list() failed if x was of length zero. o Setting dimnames to a factor now coerces to character, as S does. (Earlier versions of R used the internal codes.) o When coercion of a list fails, a meaningful error message is given. o Adding to NULL with [[ ]] generates a list if more than one element is added (as S does). o There is a new command-line flag --args that causes the rest of the command line to be skipped (but recorded in commandArgs() for further processing). o S4 generic functions and method dispatch have been modified to make the generic functions more self-contained (e.g., usable in apply-type operations) and potentially to speed dispatch. o The data editor is no longer limited to 65535 rows, and will be substantially faster for large numbers of columns. o Standalone Rmath now has a get_seed function as requested (PR#3160). o GC timing is not enabled until the first call to gc.time(); it can be disabled by calling gc.time(FALSE). This can speed up the garbage collector and reduce system calls on some platforms. STANDARD PACKAGES o New package 'mle'. This is a simple package to find maximum likelihood estimates, and perform likelihood profiling and approximate confidence limits based upon it. A well-behaved likelihood function is assumed, and it is the responsibility of the user to gauge the applicability of the asymptotic theory. This package is based on S4 methods and classes. o Changes in package 'mva': - factanal() now returns the test statistic and P-value formerly computed in the print method. - heatmap() has many more arguments, partly thanks to Wolfgang Huber and Andy Liaw. - Arguments `unit' and `hmin' of plclust() are now implemented. - prcomp() now accepts complex matrices, and there is biplot() method for its output (in the real case). - dendrograms are slightly better documented, methods working with "label", not "text" attribute. New rev() method for dendrograms. - plot.dendrogram() has an explicit `frame.plot' argument defaulting to FALSE (instead of an implicit one defaulting to TRUE). o Changes in package 'tcltk': - The package is now in a namespace. To remove it you will now need to use unloadNamespace("tcltk"). - The interface to Tcl has been made much more efficient by evaluating Tcl commands via a vector of Tcl objects rather than by constructing the string representation. - An interface to Tcl arrays has been introduced. - as.tclObj() has gained a `drop' argument to resolve an ambiguity for vectors of length one. o Changes in package 'tools': - Utilities for testing and listing files, manipulating file paths, and delimited pattern matching are now exported. - Functions checkAssignFuns(), checkDocArgs() and checkMethods() have been renamed to checkReplaceFuns(), checkDocFiles(), and checkS3methods, to given better descriptions of what they do. - R itself is now used for analyzing the markup in the \usage sections. Hence in particular, replacement functions or S3 replacement methods are no longer ignored. - checkDocFiles() now also determines 'over-documented' arguments which are given in the \arguments section but not in \usage. - checkDocStyle() and checkS3Methods() now know about internal S3 generics and S3 group generics. - S4 classes and methods are included in the QC tests. Warnings will be issued from undoc() for classes and methods defined but not documented. Default methods automatically generated from nongeneric functions do not need to be documented. - New (experimental) functions codocClasses() and codocData() for code/documentation consistency checking for S4 classes and data sets. o Changes in package 'ts': - arima.sim() now checks for inconsistent order specification (as requested in PR#3495: it was previously documented not to). - decompose() has a new argument `filter'. - HoltWinters() has new arguments `optim.start' and `optim.control', and returns more components in the fitted values. The plot method allows `ylim' to be set. - plot.ts() has a new argument `nc' controlling the number of columns (with default the old behaviour for plot.mts). - StructTS() now allows the first value of the series to be missing (although it is better to omit leading NAs). (PR#3990) USING PACKAGES o library() has a pos argument, controlling where the package is attached (defaulting to pos=2 as before). o require() now maintains a list of required packages in the toplevel environment (typically, .GlobalEnv). Two features use this: detach() now warns if a package is detached that is required by an attached package, and packages that install with saved images no longer need to use require() in the .First as well as in the main source. o Packages with name spaces can now be installed using --save. o Packages that use S4 classes and methods should now work with or without saved images (saved images are still recommended for efficiency), writing setMethod(), etc. calls with the default for argument `where'. The topenv() function and sys.source() have been changed correspondingly. See the online help. o Users can specify in the DESCRIPTION file the collation order for files in the R source directory of a package. DOCUMENTATION CHANGES o Changes in R documentation format: - New logical markup commands for emphasizing (\strong) and quoting (\sQuote and \dQuote) text, for indicating the usage of an S4 method (\S4method), and for indicating specific kinds of text (\acronym, \cite, \command, \dfn, \env, \kbd, \option, \pkg, \samp, \var). - New markup \preformatted for pre-formatted blocks of text (like \example but within another section). (Based on a contribution by Greg Warnes.) - New markup \concept for concept index entries for use by help.search(). o Rdconv now produces more informative output from the special \method{GENERIC}{CLASS} markup for indicating the usage of S3 methods, providing the CLASS info in a comment. o \dontrun sections are now marked within comments in the user-readable versions of the converted help pages. o \dontshow is now the preferred name for \testonly. INSTALLATION CHANGES o The zlib code in the sources is used unless the external version found is at least version 1.1.4 (up from 1.1.3). o The regression checks now have to be passed exactly, except those depending on recommended packages (which cannot be assumed to be present). o The target make check-all now runs R CMD check on all the recommended packages (and not just runs their examples). o There are new macros DYLIB_* for building dynamic libraries, and these are used for the dynamic Rmath library (which was previously built as a shared object). o If a system function log1p is found, it is tested for accuracy and if inadequate the substitute function in src/nmath is used, with name remapped to Rlog1p. (Apparently needed on OpenBSD/NetBSD.) C-LEVEL FACILITIES o There is a new installed header file R_ext/Parse.h which allows R_ParseVector to be called by those writing extensions. (Note that the interface is changed from that used in the unexported header Parse.h in earlier versions, and is not guaranteed to remain unchanged.) o The header R_ext/Mathlib.h has been removed. It was replaced by Rmath.h in R 1.2.0. o PREXPR has been replaced by two macros, PREXPR for obtaining the expression and PRCODE for obtaining the code for use in eval. The macro BODY_EXPR has been added for use with closures. For a closure with a byte compiled body, the macro BODY_EXPR returns the expression that was compiled; if the body is not compiled then the body is returned. This is to support byte compilation. o Internal support for executing byte compiled code has been added. A compiler for producing byte compiled code will be made available separately and should become part of a future R release. o On Unix-like systems calls to the popen() and system() C library functions now go through R_popen and R_system. On Mac OS X these suspend SIGALRM interrupts around the library call. (Related to PR#1140.) UTILITIES o R CMD check accepts "ORPHANED" as package maintainer. Package maintainers can now officially orphan a package, i.e., resign from maintaining a package. o R CMD INSTALL (Unix only) is now 'safe': if the attempt to install a package fails, leftovers are removed. If the package was already installed, the old version is restored. o R CMD build excludes possible (obsolete) data and vignette indices in DCF format (and hence also no longer rebuilds them). o R CMD check now tests whether file names are valid across file systems and supported operating system platforms. There is some support for code/documentation consistency checking for data sets and S4 classes. Replacement functions and S3 methods in \usage sections are no longer ignored. o R CMD Rdindex has been removed. DEPRECATED & DEFUNCT o The assignment operator `_' has been removed. o printNoClass() is defunct. o The classic Mac OS port is no longer supported, and its files have been removed from the sources. o The deprecated argument 'white' of parse() has been removed. o Methods pacf/plot.mts() have been removed and their functionality incorporated into pacf.default/plot.ts(). o print.coefmat() is deprecated in favour of printCoefmat() (which is identical apart from the default for na.print which is changed from "" to "NA", and better handling of the 0-rank case where all coefficients are missing). o codes() and codes<-() are deprecated, as almost all uses misunderstood what they actually do. o The use of multi-argument return() calls is deprecated: use a (named) list instead. o anovalist.lm (replaced in 1.2.0) is now deprecated. o - and Ops methods for POSIX[cl]t objects are removed: the POSIXt methods have been used since 1.3.0. o glm.fit.null(), lm.fit.null() and lm.wfit.null() are deprecated. o Classes "lm.null" and "glm.null" are deprecated and all of their methods have been removed. o Method weights.lm(), a copy of weights.default(), has been removed. o print.atomic() is now deprecated. o The back-compatibility entry point Rf_log1p in standalone Rmath has been removed. BUG FIXES o ARMAacf() sometimes gave too many results or failed if `lag.max' was used. o termplot() with a subset of terms now gives correct partial residuals o Functions anova.glm(), contrasts(), getS3method(), glm() and make.tables() were applying get() without asking for a function and/or not starting the search in the environment of the caller. o as.data.frame.matrix() ignored the `row.names' argument. o as.data.frame.list(optional = TRUE) was converting names, and hence data.frame(list(...), check.names = FALSE) was. (PR#3280) o as.dist(m) {mva} now obeys `diag=TRUE' or `upper=TRUE' in all cases. o as.double(list()) etc was regarded as an error, because of a bug in isVectorizable. o On some platforms the wday component of the result of as.POSIXlt() was corrupted when trying to guess the DST offset at dates the OS was unable to handle. o ave(x, g) didn't work when `g' had unused levels. o biplot.default() allows xlim and ylim to be set. (PR#3168) o bgroup with a null (.) delimiter was setting font to Greek. (PR#3099) o body() and formals() were looking for named functions in different places: they now both look starting at the environment in which they are called. Several documentation errors for these functions have been corrected. o boxplot() was ignoring cex.axis. (PR#2628) o cut.POSIXt() now passes on ... to cut.default(), as documented. o crossprod() now works for 1d arrays with unnamed dimnames (PR#4092). o data() sometimes failed with multiple files, as the paths variable got corrupted. o data.frame() failed with a nonsensical error message if it grabbed row names from an argument that was subsequently recycled. Now they are discarded, with a warning. o data.matrix() was documented to replace factors by their codes, but in fact re-coded into the alphabetical ordering of the levels. o decompose() with even frequency used an asymmetric moving average window. o demo() was using `topic' as a regexp rather than an exact match. o dotchart() now does recycle the `color' argument and better documents the `bg' one (PR#4343). o getAnywhere() didn't not correctly check for S3 methods, when the generic or the class name contains a "." (PR#4275). o file.copy() ignored the overwrite argument. (PR#3529) o filter(method="recursive") was unnecessarily requiring the time series to be longer than the filter. o format(*, nsmall = m) with m > 0 now returns exponential format less often. o get() and exists() were ignoring the `mode' argument for variables in base. The error message for get() now mentions the mode requested if not "any". A bug in setting the NAMED field in do_get was fixed. o getS3method(f, cl, optional=TRUE) now returns NULL if `f' does not exist. o HoltWinters() would segfault if only gamma was optimized, and not converge if gamma=0 and seasonal="mult". o hyperref.cfg now contains definitions for colors it uses. o identify.default() detects zero-length arguments. (PR#4057) o legend() allows shading without filling again. o legend(x, y, leg) doesn't triple `leg' anymore when it is a call. o Corrected many problems with 0-rank (but not necessarily empty model) lm() and glm() fits. o lm.influence() now handles 0-rank models, and names its output appropriately. It also ensures that hat values are not greater than one, and rounds values within rounding error of one. o The `method' argument to loess() did not work. (PR#3332) o lsfit() was returning incorrect residuals for 0-rank fits. o methods("$") and methods("$<-") were failing to find methods. o methods() and getS3method() find methods if the generic dispatches on a name other than its own. (The cases of coefficients() and fitted.values() were fixed in 1.7.1.) o model.matrix.default() was throwing an error on 0-term models, but now handles them correctly. o Printing `nls' objects misbehaved when `data' was a composite expression. o .NotYetImplemented() gave "Error in .NotYet...(): .." o numericDeriv() was failing if the first argument was a name rather than a call. (PR#3746) o pacf() was failing if called on a one-column matrix. o paste() applied to 0-length vectors gave "" not a 0-length vector. o The length of a string specification of par(lty=) is now checked: it should be 2, 4, 6 or 8. o Using lty=as.integer(NA) and as.double(NA) were being accepted but giving nonsensical results. Those are not documented valid values for lty. (PR#3217) o Erroneously calling par(new=TRUE) with no plot was not caught and so could result in invalid graphics files. (PR#4037) o par(tck=) was being interpreted incorrectly. It is now documented in the same way as S, and now behaves as documented. (PR#3504) o plclust() [and hence plot.hclust()] sometimes now uses correct `ylim's also in unusual cases. (PR#4197) o plot.POSIX[cl]t no longer passes col, lty, lwd to axis.POSIXt. o The png(), jpeg(), png() and win.metafile() devices now enforce the length limit on the filename. (PR#3466) o pnorm(x, 1, 0) does not give NaN anymore; also, pnorm(x, m, s=Inf) == lim{s -> Inf} pnorm(x,m,s). Similar changes for dnorm(), cf PR#1218. o On some machines the internal rounding used in postscript() was imperfect, causing unnecessarily verbose output (-0.00 instead of 0) and problems with make check. o qqnorm()'s result now keeps NAs from its input. (PR#3750) o rank() sometimes preserved and sometimes dropped names. o readBin(what = "foo") didn't convert `what' to its type. (PR#4043) o reorder.dendrogram() now properly resets the "midpoint" attributes such that reorder()ed dendrograms now plot properly. o rmultinom(1,100, c(3, 4, 2, 0,0))[3] was NA. (PR#4431) o sapply() for matrix result does not return list(NULL,NULL) dimnames anymore. o scan() now interprets quoting in fields to be skipped. (PR#4128) o seq.POSIXt(from, to, by="DSTday") was failing or calculating the length incorrectly. o sort() and unique.default() were failing on 0-level factors. o step() adds a fuzz for reduction in AIC for 0-df terms. (PR#3491) o str(x) gives better output when x is of mode "(". Its "dendrogram" method obeys the `give.attr' argument which now defaults to FALSE. o strwidth(f) and strheight(f) could seg.fault when `f' was a function. The fix [to C-level coerceVector()] now gives an error instead of passing through. This may catch other potential problems. o Sweave() reports the chunk number rather than the driver call when a try error gets caught. o trunc.POSIXt(x) for 0-length x does not return invalid structures anymore. (PR#3763). o warnings() now returns NULL instead of an error when no warnings have occured yet. (PR#4389) o Using write.table() setting the `dec' argument and with no numeric columns failed. (PR#3532) o $<- did not duplicate when it needed to. o Recursive indexing of lists had too little error-checking. (related to PR#3324) o Removed warning about names in persistent strings when a namespace is saved. o Fixed some malformed error messages in the methods package. o pipes were not opening properly when profiling on a Mac OS. (PR#1140) o Lapack error messages (PR#3494) and call to DGEQP3 (PR#2867) are corrected. o Rd conversion was limiting a file to 1000 pairs of braces, without any warning. Now the limit is 10000, with a warning. (PR#3400) o In the tcltk package, the tkimage.*() commands were defined nonsensically as widget commands. They have been redefined to be more useful now. o Registered group generics were not being used. (PR#3536) o Subsetting data frames did not always correctly detect that non-existent columns were specified. o There are many more checks for over-running internal buffers, almost always reporting errors. o Added some buffer overflow checking in gram.y. o Internals for complex assignment did not check that function name was a symbol, which could cause a segfault. o Fixed bug in S4 methods dispatch that made local variables in the generic visible when executing the body of a method, thus violating lexical scope. ************************************************** * * * 1.7 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.7.1 NEW FEATURES o The help pages give appropriate references to the Blue, White or Green books for functions based on the descriptions of S functions given there. (E&OE) o Function getAnywhere() can find non-exported objects, for namespaces or registered methods. DEPRECATED & DEFUNCT o The (unimplemented) argument 'white' of parse() is deprecated. o The tkfilefind demo in the tcltk library is deprecated, since it never worked well, and apparently not at all with Tcl/Tk 8.4. BUG FIXES o print.table() used too much white space in some cases in 1.7.0. o selectMethod() failed if `f' was a non-generic and optional=TRUE, and gave a confusing error message if optional=FALSE. o pchisq(*, ncp) and qchisq(*, ncp) work in more cases for large ncp or quantile and give warning or error messages otherwise. o str(x) now also works when x is an "externalptr" (or "weakref"). o rbeta(), rf(), and rt() now support infinite parameter values; other distributions return NaN instead of NA for such. o Redefining a class is now safer if the new definition generates an error (previously some invalid metadata could be left behind). o A number of errors are now caught in setClass() that previously either went unchecked or waited until new() to appear: - classes may not contain themselves, directly or indirectly; - classes appearing either as slots or as superclasses must themselves be defined; - slot names (direct or inherited) must be unique. In related changes, prototype() now works as documented, and is the recommended way to provide prototype objects. o Sorting an ordered factor would return an unordered one. This caused some trouble with panel.superpose (PR#974). o methods() could return duplicates if a method in a namespace was both exported and registered. o The internal zip.unpack() could crash if more than 500 files were to be extracted. (PR#2818) o The "r+" and "r+b" modes of opening file connections disallowed writing. o library() now warns the user if the chosen package name doesn't match the internal package name, and corrects the error. (PR#2816) o qr(LAPACK=TRUE) (and qr for complex arguments) might have failed to pivot for rank-deficient inputs. (PR#2867) o Only re-mapped symbols are exported by regex.o, to avoid problems with embedded R on RedHat 9. o arima() did not set transform.pars to FALSE if AR parameters were fixed, although it claimed to. o pnorm() was slower than necessary in the outer tails in some cases due to a typo in the improvements from PR#699. (PR#2883) o setGeneric() and setMethod() now catch some examples where the generic and the method have different argument lists; the evaluator checks for internal consistency of these argument lists. o expand.grid(x) {the rare case of one argument} now treats factor levels as in the typical case of two or more arguments. o Some implicit coercions to lists could cause segfaults, e.g. x <- matrix(nrow=20000, ncol=20); x$any <- numeric(0) due to a PROTECT bug. (PR#2923) o The replacement functions for colnames() and rownames() did not work for arrays with more than two dimensions. They could create dimnames of the form list(NULL, NULL) rather than remove the dimnames attribute. o termplot() gave incorrect answers with rug=TRUE or partial=TRUE for factors whose levels were not in lexicographical order. o A serious performance flaw in as() computations was fixed (the methods were not being cached properly.) o model.frame(~1, data) always returned 1 row. (PR#2958) o The data editor was truncating objects to 65535 rows. Pro tem, editing objects with more than 65535 rows is an error, and objects cannot be extended beyond that row. This restriction will be removed in 1.8.0. (PR#2962) o A bug could produce apparent loops in formal method selection when inheritance was restricted (used for the as() function). A related problem sometimes broke attaching a package that had methods for basic functions, such as names(), used in method selection. o Empty expressions as in return(x,) could generate subsequent segfaults: they are now errors. (PR#2880) o The Kinderman-Ramage Normal Random Generator had several problems leading to not-quite normally distributed variates (PR#2846). One problem was traced to an error in the original 1976 JASA paper! Thanks to Josef Leydold and his team for investigating this. The old generator has been retained for reproducibility of older results, under the name "Buggy Kinderman-Ramage". A warning is issued if you select it (also indirectly via RNGversion()). o promptMethods() now puts the \alias lines for methods in the normal place, near the top of the file, and quotes class names in signatures. o getS3method() and methods() were not finding methods for coefficients() and fitted.values() (which dispatch on "coef" and "fitted" respectively). o scan() (and hence read.table) was not finding matches for separator chars with the upper bit set. (PR#3035) o lm.(w)fit failed if the fit had rank 0. o lqs() did not report explicitly that it had failed if all samples gave singular fits. o predict.lm(*, se=TRUE) {w/ weights, w/o newdata} now gives correct SE's. (PR#3043) o cor.test(x, y, method="spearman") now also works for length(x) > 1290. o Matrices were printed mis-aligned if right=TRUE and na.print was specified. (PR#3058) o R CMD check gives now a clearer message when latex produces errors on the package manual. (PR#3070) o isSeekable() was incorrectly returning FALSE on all file connections. o tkpager() wasn't quite using its title and header arguments in the way prescribed by file.show() o legend(*, pch=p, lty=l) now works better when `p' or `l' have NAs. o All braces in regular expressions used by Sweave() are now escaped by a backslash. o unloadNamespace() failed because getNamespaceImports() now coerces a string argument to a name space. o deriv3 gave incorrect Hessians for some very simple expressions such as expression(x*y) (since the comments in the C code were incorrect). (PR#2577) o power.t.test(..., delta=NULL,alternative='two.sided') failed. (PR#2993) o Lines on postscript() plots with thousands of segments might have been plotted inaccurately in 1.7.0. (PR#3132) Solid lines in postscript() output are split into groups of 1000 segments to help some PostScript interpreters (typically old level-1 interpreters). o cut.POSIXt failed when the breaks were date/time objects. (PR#3181) o Usage of methods in dist.Rd is now correctly documented (as.matrix.dist() is not an exported symbol). o The predict() method for ar fits was not retrieving the series from the parent environment. o eigen() and La.eigen() were not returning a matrix of eigenvectors for a 1x1 input. o hsv() and rgb() now return character(0) when one of their args has length 0. This also fixes terrain.color(1). (PR#3233) o [[<-.data.frame checked if a replacment was too short, but not if it was too long. (related to PR#3229) o qt(x, df) was quite inaccurate for df=1+epsilon; it is now much more accurate for df in (1,2) and more precise for other df. (PR#2991) o qbeta() now has slightly improved C code in two places, as suggested in the 2nd followup to PR#2894. CHANGES IN R VERSION 1.7.0 USER-VISIBLE CHANGES o solve(), chol(), eigen() and svd() now use LAPACK routines unless a new back-compatibility option is turned on. The signs and normalization of eigen/singular vectors may change from earlier versions. o The `methods', `modreg', `mva', `nls' and `ts' packages are now attached by default at startup (in addition to `ctest'). The option "defaultPackages" has been added which contains the initial list of packages. See ?Startup and ?options for details. Note that .First() is no longer used by R itself. class() now always (not just when `methods' is attached) gives a non-null class, and UseMethod() always dispatches on the class that class() returns. This means that methods like foo.matrix and foo.integer will be used. Functions oldClass() and oldClass<-() get and set the "class" attribute as R without `methods' used to. o The default random number generators have been changed to `Mersenne-Twister' and `Inversion'. A new RNGversion() function allows you to restore the generators of an earlier R version if reproducibility is required. o Namespaces can now be defined for packages other than `base': see `Writing R Extensions'. This hides some internal objects and changes the search path from objects in a namespace. All the base packages (except methods and tcltk) have namespaces, as well as the recommended packages `KernSmooth', `MASS', `boot', `class', `nnet', `rpart' and `spatial'. o Formulae are not longer automatically simplified when terms() is called, so the formulae in results may still be in the original form rather than the equivalent simplified form (which may have reordered the terms): the results are now much closer to those of S. o The tables for plotmath, Hershey and Japanese have been moved from the help pages (example(plotmath) etc) to demo(plotmath) etc. o Errors and warnings are sent to stderr not stdout on command-line versions of R (Unix and Windows). o The R_X11 module is no longer loaded until it is needed, so do test that x11() works in a new Unix-alike R installation. NEW FEATURES o if() and while() give a warning if called with a vector condition. o Installed packages under Unix without compiled code are no longer stamped with the platform and can be copied to other Unix-alike platforms (but not to other OSes because of potential problems with line endings and OS-specific help files). o The internal random number generators will now never return values of 0 or 1 for runif. This might affect simulation output in extremely rare cases. Note that this is not guaranteed for user-supplied random-number generators, nor when the standalone Rmath library is used. o When assigning names to a vector, a value that is too short is padded by character NAs. (Wishlist part of PR#2358) o It is now recommended to use the 'SystemRequirements:' field in the DESCRIPTION file for specifying dependencies external to the R system. o Output text connections no longer have a line-length limit. o On platforms where vsnprintf does not return the needed buffer size the output line-length limit for fifo(), gzfile() and bzfile() has been raised from 10k to 100k chars. o The Math group generic does not check the number of arguments supplied before dispatch: it used to if the default method had one argument but not if it had two. This allows trunc.POSIXt() to be called via the group generic trunc(). o Logical matrix replacement indexing of data frames is now implemented (interpreted as if the lhs was a matrix). o Recursive indexing of lists is allowed, so x[[c(4,2)]] is shorthand for x[[4]][[2]] etc. (Wishlist PR#1588) o Most of the time series functions now check explicitly for a numeric time series, rather than fail at a later stage. o The postscript output makes use of relative moves, and so is somewhat more compact. o %*% and crossprod() for complex arguments make use of BLAS routines and so may be much faster on some platforms. o arima() has coef(), logLik() (and hence AIC) and vcov() methods. o New function as.difftime() for time-interval data. o basename() and dirname() are now vectorized. o biplot.default() {mva} allows `xlab' and `ylab' parameters to be set (without partially matching to `xlabs' and `ylabs'). (Thanks to Uwe Ligges.) o New function capture.output() to send printed output from an expression to a connection or a text string. o ccf() (pckage ts) now coerces its x and y arguments to class "ts". o chol() and chol2inv() now use LAPACK routines by default. o as.dist(.) is now idempotent, i.e., works for "dist" objects. o Generic function confint() and `lm' method (formerly in package MASS, which has `glm' and `nls' methods). o New function constrOptim() for optimisation under linear inequality constraints. o Add `difftime' subscript method and methods for the group generics. (Thereby fixing PR#2345) o download.file() can now use HTTP proxies which require `basic' username/password authentication. o dump() has a new argument `envir'. The search for named objects now starts by default in the environment from which dump() is called. o The edit.matrix() and edit.data.frame() editors can now handle logical data. o New argument `local' for example() (suggested by Andy Liaw). o New function file.symlink() to create symbolic file links where supported by the OS. o New generic function flush() with a method to flush connections. o New function force() to force evaluation of a formal argument. o New functions getFromNamespace(), fixInNamespace() and getS3method() to facilitate developing code in packages with namespaces. o glm() now accepts `etastart' and `mustart' as alternative ways to express starting values. o New function gzcon() which wraps a connection and provides (de)compression compatible with gzip. load() now uses gzcon(), so can read compressed saves from suitable connections. o help.search() can now reliably match individual aliases and keywords, provided that all packages searched were installed using R 1.7.0 or newer. o hist.default() now returns the nominal break points, not those adjusted for numerical tolerances. To guard against unthinking use, `include.lowest' in hist.default() is now ignored, with a warning, unless `breaks' is a vector. (It either generated an error or had no effect, depending how prettification of the range operated.) o New generic functions influence(), hatvalues() and dfbeta() with lm and glm methods; the previously normal functions rstudent(), rstandard(), cooks.distance() and dfbetas() became generic. These have changed behavior for glm objects -- all originating from John Fox' car package. o interaction.plot() has several new arguments, and the legend is not clipped anymore by default. It internally uses axis(1,*) instead of mtext(). This also addresses "bugs" PR#820, PR#1305, PR#1899. o New isoreg() function and class for isotonic regression (`modreg' package). o La.chol() and La.chol2inv() now give interpretable error messages rather than LAPACK error codes. o legend() has a new `plot' argument. Setting it `FALSE' gives size information without plotting (suggested by U.Ligges). o library() was changed so that when the methods package is attached it no longer complains about formal generic functions not specific to the library. o list.files()/dir() have a new argument `recursive'. o lm.influence() has a new `do.coef' argument allowing *not* to compute casewise changed coefficients. This makes plot.lm() much quicker for large data sets. o load() now returns invisibly a character vector of the names of the objects which were restored. o New convenience function loadURL() to allow loading data files from URLs (requested by Frank Harrell). o New function mapply(), a multivariate lapply(). o New function md5sum() in package tools to calculate MD5 checksums on files (e.g. on parts of the R installation). o medpolish() {package eda} now has an `na.rm' argument (PR#2298). o methods() now looks for registered methods in namespaces, and knows about many objects that look like methods but are not. o mosaicplot() has a new default for `main', and supports the `las' argument (contributed by Uwe Ligges and Wolfram Fischer). o An attempt to open() an already open connection will be detected and ignored with a warning. This avoids improperly closing some types of connections if they are opened repeatedly. o optim(method = "SANN") can now cover combinatorial optimization by supplying a move function as the `gr' argument (contributed by Adrian Trapletti). o PDF files produced by pdf() have more extensive information fields, including the version of R that produced them. o On Unix(-alike) systems the default PDF viewer is now determined during configuration, and available as the 'pdfviewer' option. o pie(...) has always accepted graphical pars but only passed them on to title(). Now pie(, cex=1.5) works. o plot.dendrogram (`mva' package) now draws leaf labels if present by default. o New plot.design() function as in S. o The postscript() and PDF() drivers now allow the title to be set. o New function power.anova.test(), contributed by Claus Ekstrom. o power.t.test() now behaves correctly for negative delta in the two-tailed case. o power.t.test() and power.prop.test() now have a `strict' argument that includes rejections in the "wrong tail" in the power calculation. (Based in part on code suggested by Ulrich Halekoh.) o prcomp() is now fast for n x m inputs with m >> n. o princomp() no longer allows the use of more variables than units: use prcomp() instead. o princomp.formula() now has principal argument `formula', so update() can be used. o Printing an object with attributes now dispatches on the class(es) of the attributes. See ?print.default for the fine print. (PR#2506) o print.matrix() and prmatrix() are now separate functions. prmatrix() is the old S-compatible function, and print.matrix() is a proper print method, currently identical to print.default(). prmatrix() and the old print.matrix() did not print attributes of a matrix, but the new print.matrix() does. o print.summary.{lm,glm} now default to symbolic.cor = FALSE, but symbolic.cor can be passed to the print methods from the summary methods. print.summary.{lm,glm} print correlations to 2 decimal places, and the symbolic printout avoids abbreviating labels. o If a prompt() method is called with 'filename' as 'NA', a list-style representation of the documentation shell generated is returned. New function promptData() for documenting objects as data sets. o qqnorm() and qqline() have an optional logical argument `datax' to transpose the plot (S-PLUS compatibility). o qr() now has the option to use LAPACK routines, and the results can be used by the helper routines qr.coef(), qr.qy() and qr.qty(). The LAPACK-using versions may be much faster for large matrices (using an optimized BLAS) but are less flexible. o QR objects now have class "qr", and solve.qr() is now just the method for solve() for the class. o New function r2dtable() for generating random samples of two-way tables with given marginals using Patefield's algorithm. o rchisq() now has a non-centrality parameter `ncp', and there's a C API for rnchisq(). o New generic function reorder() with a dendrogram method; new order.dendrogram() and heatmap(). o require() has a new argument, character.only, -- to make it align with library. o New functions rmultinom() and dmultinom(), the first one with a C API. o New function runmed() for fast runnning medians (`modreg' package). o New function slice.index() for identifying indexes with respect to slices of an array. o solve.default(a) now gives the dimnames one would expect. o stepfun() has a new `right' argument for right-continuous step function construction. o str() now shows ordered factors different from unordered ones. It also differentiates "NA" and as.character(NA), also for factor levels. o symnum() has a new logical argument `abbr.colnames'. o summary() now mentions NA's as suggested by Goran Brostrom. o summaryRprof() now prints times with a precision appropriate to the sampling interval, rather than always to 2dp. o New function Sys.getpid() to get the process ID of the R session. o table() now allows exclude= with factor arguments (requested by Michael Friendly). o The tempfile() function now takes an optional second argument giving the directory name. o The ordering of terms for terms.formula(keep.order=FALSE) is now defined on the help page and used consistently, so that repeated calls will not alter the ordering (which is why delete.response() was failing: see the bug fixes). The formula is not simplified unless the new argument `simplify' is true. o added "[" method for terms objects. o New argument `silent' to try(). o ts() now allows arbitrary values for y in start/end = c(x, y): it always allowed y < 1 but objected to y > frequency. o unique.default() now works for POSIXct objects, and hence so does factor(). o Package tcltk now allows return values from the R side to the Tcl side in callbacks and the R_eval command. If the return value from the R function or expression is of class "tclObj" then it will be returned to Tcl. o A new HIGHLY EXPERIMENTAL graphical user interface using the tcltk package is provided. Currently, little more than a proof of concept. It can be started by calling "R -g Tk" (this may change in later versions) or by evaluating tkStartGUI(). Only Unix-like systems for now. It is not too stable at this point; in particular, signal handling is not working properly. o Changes to support name spaces: - Placing base in a name space can no longer be disabled by defining the environment variable R_NO_BASE_NAMESPACE. - New function topenv() to determine the nearest top level environment (usually .GlobalEnv or a name space environment). - Added name space support for packages that do not use methods. o Formal classes and methods can be `sealed', by using the corresponding argument to setClass or setMethod. New functions isSealedClass() and isSealedMethod() test sealing. o packages can now be loaded with version numbers. This allows for multiple versions of files to be installed (and potentially loaded). Some serious testing will be going on, but it should have no effect unless specifically asked for. INSTALLATION CHANGES o TITLE files in packages are no longer used, the Title field in the DESCRIPTION file being preferred. TITLE files will be ignored in both installed packages and source packages. o When searching for a Fortran 77 compiler, configure by default now also looks for Fujitsu's frt and Compaq's fort, but no longer for cf77 and cft77. o Configure checks that mixed C/Fortran code can be run before checking compatibility on ints and doubles: the latter test was sometimes failing because the Fortran libraries were not found. o PCRE and bzip2 are built from versions in the R sources if the appropriate library is not found. o New configure option --with-lapack to allow high-performance LAPACK libraries to be used: a generic LAPACK library will be used if found. This option is not the default. o New configure options --with-libpng, --with-jpeglib, --with-zlib, --with-bzlib and --with-pcre, principally to allow these libraries to be avoided if they are unsuitable. o If the precious variable R_BROWSER is set at configure time it overrides the automatic selection of the default browser. It should be set to the full path unless the browser appears at different locations on different client machines. o Perl requirements are down again to 5.004 or newer. o Autoconf 2.57 or later is required to build the configure script. o Configure provides a more comprehensive summary of its results. o Index generation now happens when installing source packages using R code in package tools. An existing 'INDEX' file is used as is; otherwise, it is automatically generated from the \name and \title entries in the Rd files. Data, demo and vignette indices are computed from all available files of the respective kind, and the corresponding index information (in the Rd files, the 'demo/00Index' file, and the \VignetteIndexEntry{} entries, respectively). These index files, as well as the package Rd contents data base, are serialized as R objects in the 'Meta' subdirectory of the top-level package directory, allowing for faster and more reliable index-based computations (e.g., in help.search()). For vignettes an HTML index is generated and linked into the HTML help system. o The Rd contents data base is now computed when installing source packages using R code in package tools. The information is represented as a data frame without collapsing the aliases and keywords, and serialized as an R object. (The 'CONTENTS' file in Debian Control Format is still written, as it is used by the HTML search engine.) o A NAMESPACE file in root directory of a source package is copied to the root of the package installation directory. Attempting to install a package with a NAMESPACE file using --save signals an error; this is a temporary measure. o The defaults for configure for Darwin systems is --with-blas='-framework vecLib' --with-lapack --with-aqua that by default builds R as a framework and installs it in /Library/Frameworks as R.framework. Then, make install just installs the R.framework in /Library/Frameworks unless specified at configure time using the -enable-R-framework=[DIR] or using the --prefix flag at installation time. DEPRECATED & DEFUNCT o The assignment operator `_' will be removed in the next release and users are now warned on every usage: you may even see multiple warnings for each usage. If environment variable R_NO_UNDERLINE is set to anything of positive length then use of `_' becomes a syntax error. o machine(), Machine() and Platform() are defunct. o restart() is defunct. Use try(), as has long been recommended. o The deprecated arguments `pkg' and `lib' of system.file() have been removed. o printNoClass() {methods} is deprecated (and moved to base, since it was a copy of a base function). o Primitives dataClass() and objWithClass() have been replaced by class() and class<-(); they were internal support functions for use by package methods. o The use of SIGUSR2 to quit a running R process under Unix is deprecated, the signal may need to be reclaimed for other purposes. UTILITIES o R CMD check more compactly displays the tests of DESCRIPTION meta-information. It now reports demos and vignettes without available index information. Unless installation tests are skipped, checking is aborted if the package dependencies cannot be resolved at run time. Rd files are now also explicitly checked for empty \name and \title entries. The examples are always run with T and F redefined to give an error if used instead of TRUE and FALSE. o The Perl code to build help now removes an existing example file if there are no examples in the current help file. o R CMD Rdindex is now deprecated in favor of function Rdindex() in package tools. o Sweave() now encloses the Sinput and Soutput environments of each chunk in an Schunk environment. This allows to fix some vertical spacing problems when using the latex class slides. C-LEVEL FACILITIES o A full double-precision LAPACK shared library is made available as -lRlapack. To use this include $(LAPACK_LIBS) $(BLAS_LIBS) in PKG_LIBS. o Header file R_ext/Lapack.h added. C declarations of BLAS routines moved to R_ext/BLAS.h and included in R_ext/Applic.h and R_ext/Linpack.h for backward compatibility. o R will automatically call initialization and unload routines, if present, in shared libraries/DLLs during dyn.load() and dyn.unload() calls. The routines are named R_init_ and R_unload_, respectively. See the Writing R Extensions Manual for more information. o Routines exported directly from the R executable for use with .C(), .Call(), .Fortran() and .External() are now accessed via the registration mechanism (optionally) used by packages. The ROUTINES file (in src/appl/) and associated scripts to generate FFTab.h and FFDecl.h are no longer used. o Entry point Rf_append is no longer in the installed headers (but is still available). It is apparently unused. o Many conflicts between other headers and R's can be avoided by defining STRICT_R_HEADERS and/or R_NO_REMAP -- see `Writing R Extensions' for details. o New entry point R_GetX11Image and formerly undocumented ptr_R_GetX11Image are in new header R_ext/GetX11Image. These are used by package tkrplot. BUG FIXES o The redefinition of the internal do_dataentry by both the aqua and X11 modules, casued a bus error when launching R without the --gui=aqua option under X11 using a version of R built to use the aqua module. This has now been fixed. (PR#6438) o Sys.sleep() on Unix was having trouble with waits of less than 0.5s o The fix to PR#2396 broke read.table() on files with CR line endings. (PR#2469) Separate problem with this on Carbon Mac OS build fixed as well. o Converting Sweave files to noweb syntax using SweaveSyntConv() was broken. o Printing numbers near the minimum could get the number of significant figures wrong due to underflow: for example 4e-308 might print as 4.00000e-308. (Seen on some Windows builds, and also on numbers around 1e-317 on Linux.) o wilcox.test() could give integer overflow warnings on very long vectors. Also added tests for numeric inputs, as per the help page. (PR#2453) o Printing unquoted character vectors containing escape characters was computing the wrong length and hence misaligning names. This was due to a bug in Rstrlen which might have had other effects. o if(logical(0)) and while(logical(0)) now report zero length, not `missing value where logical is needed'. o The gaussian() and inverse.gaussian() families were documented to allow only one link, which has not been true in R for at least four years. o prmatrix() forced conversion to character if `na.print' was used, and that conversion neither respected `digits' nor `quote'. o Rprof() might give misleading results for too small values of `interval' and in practice the default 20ms was about as small as is advisable on Linux. Now the interval is forced to be at least one clock tick. o summary.data.frame() was not giving interpretable results when the data frame contained a data frame as a column. (PR#1891) o delete.response() might re-order the rhs terms so prediction might fail or even give incorrect results. (PR#2206) o StructTS() now accepts numeric time series of integer storage mode. o all(), any() now handle NAs as documented. o Subsetting arrays to a result with 0 dimension(s) failed if the array had dimnames. (PR#2507) o If the call to data.frame() included 0-row arguments, it tried to replicate them to the maximum number of rows, and failed if this was 1 or more. o replicate() now understands data frames to which na.omit() has been applied. o is.ts() was too liberal: a time series must have at least one point. o methods() was sorting by package, not by name. o symbols(thermometers=) was often giving a spurious warning about the range. o tcltk was using deprecated internals of the Tcl library when accessing error messages. Not likely to be a user-visible change. o The automatic search for BLAS libs now tries Sun's libsunperf the way the latest versions require. (PR#2530) o str(array(1)) now does show the array. str(Surv(...)) now works again. o step(), add1.default() and drop1.default() now work somewhat better if called from a function. o page() was searching from the wrong environment, and so searching base before the workspace. o crossprod(Z) for complex Z was returning nonsense. o La.chol2inv() gave incorrect results unless the matrix was square. o When the POSIXt date functions were required to guess DST, they sometimes guessed correctly that DST was in force but converted a POSIXlt time as if standard time was given. o c/rbind were not handling zero col/row matrices correctly. (PR#2541 was one symptom.) o approx() and approxfun() now work with 1 knot if method = "constant". stepfun(), ecdf() and plot.stepfun() do so as well. o AIC.lm/default was failing if multiple objects and k were specified. (PR#2518) o removeMethods{methods} was broken. (PR#2519) o summary.glm() had two `aic' components in the returned object. o autoload() was returning the value of its last command, a promise, even though it was documented to have no value. As a result some packages (e.g. nlme) were loading packages they meant to autoload. o Fixes to methods and classes: - show() is consistent with using setOldClass for S3 classes. - several problems with the coerce and replace methods generated by setIs have been fixed. - more thorough tests & informative messages for invalid `def' arguments to setGeneric - setGeneric will now create the generic function even when a generic of the same name already exists (it does issue a warning). o unz() connections could no longer be opened. (PR#2579) o unique(ordered factor) returned an unordered factor. (PR#2591) o x[] <- value coerced x to the mode of value if and only if x had length 0! (Should only happen if x is null: PR#2590) o lm() mislabelled the cols of the qr decomposition. (cause of PR#2586) o data() looks for file extensions in an order prescribed in the help file: previously whether foo.R or foo.csv was used was locale-dependent. o sys.function() now returns the actual function being evaluated in the specified frame rather than one inferred from the call. o match.call() now uses the definition of the actual function being evaluated rather than one inferred from the call. o abbreviate(*, dot = TRUE) now only adds a "." where abbreviations did happen. o Changing timezones in the POSIXt functions was not working on some Linux systems, and this has been corrected. o ks.test() in package ctest had numerical problems in the lower tail of the asymptotic distribution (PR#2571). o Sweave() now handles empty chunks at the end of files correctly. o [<-() lost the object bit if coercion was involved. o package::object wasn't being deparsed properly. o seq.POSIXt() with `by' an object of class "difftime" ignored the units. o rank(c("B", NA)) no longer returns character. o reference to by() added in ?tapply o ?lm describes what happens with matrix response o The X11 device has improved event handling. In particular it used to often miss the last of a series of resize events. o lm.influence() and related functions now work again for the multivariate case and when there are zero weights. o format( ) now always keeps names and dimnames. o table(factor(c(2,NA), exclude=NULL)) prints better now. o predict(foo, type = "terms") and hence residuals(foo, type = "partial") now work for lm and glm objects with weights zero. Further, model.matrix() is now only called once. o R CMD config now works correctly when called from a Makefile using GNU make. o The data.frame method for rbind() was - converting character columns to factors, - converting ordered factor columns to unordered factors, - failing to append correctly a factor to a character column and vice versa. o as.hclust.twins() now does provide proper `labels', `method' and `call' components. o cycle() sometimes failed on a time series which started at a cycle other than 1. o read.dcf() read incorrectly files which did not end in a new line. o read.socket() dropped certain non-alphanumeric characters. (PR#2639) o termplot() handles missing data better (PR#2687, ) o Corrected MacRoman encoding for Icircumflex etc. ************************************************** * * * 1.6 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.6.2 BUG FIXES o plot.stepfun() now obeys a `ylim=.' specification. o removeClass() does a better job of removing inheritance information. o setIs() will not allow mismatched representations between two classes (without an explicit coerce method). o The code underlying polygon drawing contained a memory leak. This showed up in persp, but did not affect other graphics functions. It is now possible to draw big DEMs. o logLik.nls() gave wrong df. (PR#2295) o rbind() with a mixture of data frames and matrices treated the matrices as vectors. (PR#2266) o stripchart(method="stack") was not handling missing values. (PR#2018) o Arithmetic functions such as log() lost the object bit from classed objects if coercion was needed. (PR#2315) o exp_rand would go into an infinite loop if unif_rand returned 0. o formatC(x, format="fg") could return exponential format if rounding pushed x over a positive power of 10. (PR#2299) o attr(x, foo) used partial matching for `foo' (even though not documented to do so), and failed to find `foo' if there were two or more partial matches before the exact match in the list of attributes. o Rdconv now creates direct HTML hyperlinks when linking to documentation in the same package. The code now ensures that links which can be resolved within the package are so resolved, even when there are possible resolutions in other packages. o If readBin(what=character()) is used incorrectly on a file which does not contain C-style character strings, warnings (usually many) are now given. o Building libR.so with the zlib in the R sources was not finding the local zlib headers. o system(intern=TRUE) has an undocumented line length limit of 119 chars both on Unix and Windows. The limit is now 8096 and documented. On Unix (only) every 120th character used to be discarded. o plot.POSIX[cl]t were not passing graphics parameters on to axis.POSIXct. o On some HP-UX systems, installed scripts were not executable when using the BSD-compatible install system program found by configure. We now always use install-sh on HP-UX. (PR#2091) o c() was converting NA names to "NA": now proper NA strings are used wherever possible. (PR#2358) o Checks in the C code prevent possible memory faults when standardGeneric is called invalidly. o Macros NEW_OBJECT (aka NEW) and MAKE_CLASS added; required by the .Call interface to generate arbitrary objects. o A typo was causing segfaults when using data.entry under SuSE. o mostattributes<-() was failing to copy across dimnames when one component was NULL, affecting pmax() and pmin() when the first argument was a matrix. (root cause of PR#2357) o The pdf() device now initialises graphical parameters properly. (PR#2281) o Checks in the C code prevent possible memory faults when standardGeneric is called invalidly. o Macros NEW_OBJECT (aka NEW) and MAKE_CLASS added; required by the .Call interface to generate arbitrary objects. o Problem that prevented package tcltk from working with Tcl/Tk 8.4 (crash on initialization) resolved. (Notice that binaries may still require an older Tcl/Tk, for example on Windows). o type.convert() was not getting the levels right if passed a character vector containing s, and `na.strings' did not contain "NA". This affected read.table(). o Internal match function did not check for nor handle 0-length vectors. (The R function match() did.) This could cause type.convert() to segfault. o The line length limit in output text connections has been raised to 8095 chars. o Sweave now uses anonymous file rather than text connections to avoid the limits of the latter (see previous item). o parsing did not work on connections when pushback was used (as it had never been implemented). (PR#2396) o max.col() only found NAs in the first column (typo). o Added a workaround for recent versions of glibc (e.g. RedHat 8.0) with inconsistent mktime/localtime functions which caused conversion to/from POSIXct times prior to 1970-01-01 to be inconsistent. On such platforms this is a run-time test to allow e.g. R compiled on RH7.2 to run on RH8.0. o Clipping was not being reset properly between plots on the gtk() device (the default under the GNOME interface). (PR#2366) o axis(*, fg= cc) now works (again) the same as axis(*, col = cc). CHANGES IN R VERSION 1.6.1 NEW FEATURES o Added a few "trivial and obviously missing" functions to tcltk: tkchooseDirectory, tkpopup, tkdialog, tkread o barplot() has a new argument `axis.lty', which if set to 1 allows the pre-1.6.0 behaviour of plotting the axis and tick marks for the categorical axis. (This was apparently not intentional, but axis() used to ignore lty=0.) The argument `border' is no longer ".NotYetUsed". BUG FIXES o hist(, cex.axis = f) now works for x-axis too. o prompt() gave wrong \usage{.} for long argument default expressions. o summary(x) gives more information when `x' is a logical (or a data frame with a logical column which is now quite customary). o seq.POSIXt(from, to, length.out= . ) could give too long results o summaryRprof() was counting nested calls to the same function twice. o Printing of objects of mode "expression" did strange things if there were "%" characters in the deparsed expression (PR#2120). o as.matrix.data.frame converted missings to "NA" not character NA. (PR#2130) o spec.pgram() was only interpolating zero freq for one series. (PR#2123) o help(randu) had % unescaped in the example. (PR#2141) o Making html links would fail if packages-head.html was not writable. (PR#2133) o Sweave.sty was not installed to $R_HOME/share/texmf when builddir != srcdir. On Windows backslashes in latex paths have to be replaced by slashes. o A memory leak in deparsing was introduced when eliminating static variables (thanks to Achim Zeileis for spotting this). A similar problem in loading workspaces has been corrected. o TclInterface.Rd incorrectly used \synopsis for \usage so that the usage section wasn't output. o Readline stack off-by-one error. (PR#2165) o R_ExpandFileName had a memory leak in the case libreadline was used under Unix-alikes. o sys.save.image() now closes all connections so it will work even if the connection list has become full. o loess() had an unstated limit of four predictors: this is now documented and enforced. o ${R_HOME}/etc/Renviron.site is now not read if R_ENVIRON is set, as documented. Previously it was read unless R_ENVIRON pointed to an actual file. o Startup.Rd described the processing under Unix-alikes but incorrectly implied it happened that way on the Windows and Mac OS ports. Neither use Renviron.site, for example. o besselK(x,*) now returns 0 instead of Inf for large x. (PR#2179) o The Tcl console code didn't work with Tcl/TK 8.0, and has been #ifdef'd out. (PR#2090) o format.AsIs() was not handling matrices. o sd() was not passing na.rm to var() for matrices and data frames. o dist() {mva} silently treated +/-Inf as NA. o setwd() now returns NULL invisibly. o basename() and dirname() did not check the length of their input and ignored elements after the first. This affected undoc {tools}. o If A had dimnames, eigen(A) had inappropriate dimnames. (PR#2116) o as.POSIXct.dates had a sign error for the origin (PR#2222) o The claim that pie charts should be avoided (in pie.Rd) is now supported by a quote from Cleveland (1985). o The vsnprintf() functions supplied for systems that don't supply their own had a bug in the output of fractional parts, corrupting data if using save() with ascii=TRUE. (PR#2144) o pretty() values close to 0 in some cases which are now 0 (PR#1032 and D.Brahm's mails). o factor.scope() was giving an error rather than a reasonable default in some cases when it was called incorrectly (e.g. via incorrect formula in add1()). BUILD ISSUES o Toplevel Makefile was missing dependency of "docs" on "R" (causing parallel makes to go wrong) o When building with recommended packages those were installed into the first path in R_LIBS, if the environment variable was present. CHANGES IN R VERSION 1.6.0 USER-VISIBLE CHANGES o The default colour palette now has "grey" instead of "white" in location 8. See palette(). o grid(nx) behaves differently (but the same as in R versions <= 0.64). NEW FEATURES o New operator :: in the grammar, for name spaces. o New faster rowsum(), also works on data frames. o grep(), (g)sub() and regexpr() have a new argument `perl' which if TRUE uses Perl-style regexps from PCRE (if installed). New capabilities option "PCRE" to say if PCRE is available. o Preparations for name space support: - Functions in the base package are now defined in a name space. As a temporary measure, you can disable this by defining the environment variable R_NO_BASE_NAMESPACE. - UseMethod dispatching now searches for methods in the environment of the caller of the generic function rather than the environment where the generic is defined. o The objects created in the methods package to represent classes, generic functions, method definitions, and inheritance relations now themselves belong to true classes. In particular, the "classRepresentation" objects follow the description in "Programming with Data" (section 7.6). o Other additions and changes to the methods package: - The function setOldClass() has been added, following the description on page 450 of "Programming with Data". Use it if old-style classes are to be supplied in signatures for setMethod, particularly if the old-style classes have inheritance. Many of the old-style classes in the base package should be pre-specified; try getClass("mlm"), e.g. - The setGeneric() function applies some heuristics to warn about possibly erroneous generic function definitions. (Before, obscure bugs could result.) - The function promptMethods() has been revised to work better and to provide aliases for individual methods. - The behavior of the as() function has been generalized, in particular with a strict= argument, the general goal being to let simple extensions of classes pass through in method dispatch and related computations without altering the objects. More to make method behavior more "natural" than for direct use. - Some inconsistencies following detach("package:methods") have been removed, so it _should_ be possible to detach/re-attach the methods package. o New methods ([[, print, str) and extended plot() method (incl. logical `horiz') for "dendrogram" class. o sprintf() now checks the agreement between formats and object types, and handles special values (NA, Inf, ...) correctly. o chol() now uses a tolerance for non-positive-definiteness and so should give more consistent results across platforms. o New function agrep() for approximate (fuzzy) string matching. o help.search() can now use both approximate (fuzzy) and regular expression matching. By default, if the pattern to be matched consists of only alphanumeric characters, whitespace or a dash, approximate matching is used. o axis() has three new optional arguments `col', `lty', and `lwd' all for drawing the axis line and tick marks. o Function vcov() (formerly in MASS), a generic function to return the variance-covariance matrix of the parameter estimates of a fitted model. o duplicated() and unique() have methods for matrices and arrays (based on ideas from Jens Oehlschlaegel). o Internally memory sizes and counts of cons cells are now stored in unsigned longs. This allows memory limits to be set and objects created in the range 2-4Gb on 32-bit platforms, and allows 64-bit platforms to use much larger amounts of memory. o Command-line flags to set memory can now use the suffix `G' for gigabytes. The setting of maximum vsize is now only limited by the platform's address space. o All warning and error messages are truncated to a length set by options(warning.length=), defaulting to 1000. (Previously most (but not quite all) were truncated at 8192 characters.) o [dpqr]gamma() check for shape parameter > 0. o as.POSIX[cl]t can now convert logical NAs. o All installed packages (even those shipped with R) are given a `Built' field in the DESCRIPTION file. o as.data.frame() now coerces logical matrices into logical columns (rather than factors). o [[<-.data.frame no longer coerces character replacement values to factor. This is consistent with using $ to replace and with S4. o library() attempts to detect improperly installed packages, so as from this version an installed package must have a DESCRIPTION file and that file must have been stamped with a `Built:' line (which was introduced in 1.2.0). Under Unix-alikes, the platform is checked against that used for installation. o print.factor() has new arguments `max.levels' (with a smart default) and `width'. print.ordered() is no longer needed. o RNGkind() has an additional option for normal random generators: "Inversion". o data.frame() recycles factors and "AsIs" objects as well as atomic vectors. o predict.lm() warns if `newdata' is supplied and the fit was rank-deficient, as this can be misleading. o rect() accepts additional graphics parameters through a ... argument (in the same way as polygon). o strwidth/strheight() now coerce their first argument in exactly the same way text() does, so a wider range of inputs is allowed. o prompt()'s default and data.frame methods have a new 3rd argument `name' allowing them to used more easily in scripts and loops. o rgb() has a new `maxColorValue' argument, allowing r,g,b in [0,M], particularly in {0:255}, efficiently and non-error-prone. o summaryRprof() provides the functionality of R CMD Rprof in R code, though more slowly. o stop() accepts multiple arguments (which are concatenated) just as warning() does. o scan() now throws an error with incorrect logical input (which was previously taken as FALSE). o pdf() now uses PDF not R code for clipping, which ensures that partially visible text strings are (partially) shown. o Each R session uses a per-session temporary directory which is removed at normal termination. The directory name is given by the tempdir() function, and filenames returned by tempfile() will be within that directory. o help.start() on Unix now uses a .R subdirectory of the per-session temporary directory and not ~/.R. A side effect is that ~/.R is now never deleted by R. This now uses the remote control mechanism only if the X display is local to the R process (as otherwise it might use a browser running on an arbitrary machine). o *Very* experimental browseEnv() for browsing objects in an environment. o cbind/rbind() used to ignore all zero-length vectors, an undocumented quirk for S-compatibility. This caused problems when combining zero-extent matrices and zero-length vectors, and now zero-length vectors are ignored unless the result would have zero rows/columns. o read.table(stdin()) will now work. o plot.spec(x) now also works for other x than AR and Pgram results. o New functions La.chol() and La.chol2inv() for Cholesky decomposition and inverse of positive definite matrices using Lapack. o Changes to the tcltk package - on Unix systems, the Tcl event loop has been integrated with R's own (so that tkwait.variable() no longer halts updates of plot windows). - also on Unix, stubs have been created to divert R's input and output routines to go via Tcl commands. (Nothing uses this at present, but packages might be developed to take advantage of it.) - return value from Tcl commands is no longer invisible. A new print method, print.tclObj(), has been introduced. - Tcl variables created by tclVar() are now explicitly put into Tcl's global namespace, removing potential scoping problems. - The tcltk dynamic library now loads with local=FALSE since the default had trouble when loading Tcl extensions (e.g. Tix) - The tkpager() function had not been updated for the return value change from 1.5.0 o The bmp(), jpeg() and png() devices can produce multiple bitmap files, one for each page. The default filenames have been changed to include a sequence number. o New function axTicks() returning tick mark locations like axis(). o grid() has a more sensible default behavior. Tick axis alignment only happens when no numbers of grid cells are specified. New arguments lwd and equilogs; nx/ny = NA for not drawing, see ?grid. o installed.packages() has a new argument `priority'. o termplot() uses factor levels rather than 1,2,3... for x-axis. o Workaround for optimization bugs on gcc 3.1/2 on 32-bit Solaris. o The trace() function has been robustified and a new function tracingState() added to turn tracing temporarily on and off. o New cophenetic() in "mva" as utility for hierarchical clustering. o p.adjust() has two new methods, 'Hommel' and 'FDR', contributed by Gordon Smyth . o stars() now has add and plot arguments. DEPRECATED & DEFUNCT o The assignment operator `_' is deprecated: a warning is given once per R session. o machine() is deprecated in favour of .Platform$OS.type. Machine() and Platform() are deprecated in favour of .Machine and .Platform. o arima0.diag() (package ts) is defunct. o piechart() is defunct. o print.ordered() has been removed, so print.factor() is used. o The global internal variables .Dyn.libs and .lib.loc are removed in favor of the internal functions .dynLibs() and .libPaths(). o restart() is deprecated in preparation for proper exception handling. Use try(), as has long been recommended. DOCUMENTATION CHANGES o New demo(persp) containing some of the former example(persp) ones and more. C-LEVEL FACILITIES o Rversion.h is no longer automatically included by R.h. Include it explicitly if you need it. o New entry point R_tmpnam in Utils.h. o The Unix event loop interface has been changed to facilitate integration with other loops. R_checkActivity and R_runHandlers should eventually replace getSelectedHandler. INSTALLATION CHANGES o Perl 5.005 or newer is now required. o R CMD INSTALL is now guaranteed to sort the R source files in ASCII order. UTILITIES o R CMD check now tests for mis-use on an installed or binary package, and sets 'T' and 'F' to 'NULL' when running the examples. o New function SweaveSyntConv() converts between Sweave file syntaxes. RweaveLatex() now gets its prompt from options() and uses the text width as linebreak cutoff for deparsing input statements. BUG FIXES o axis() was not respecting par("mgp")[3] by default. (PR#916) o tcltk back-compatibility fix for tcl8.0 o hist.POSIXct(*, breaks) now works for `breaks = #{breaks}' and when `x' has NAs; the latter applies to cut.POSIXct() as well. o The internal download.file() methods were setting the proxy port to 0 unless it was specified. o poly() did not work for >=3 column matrices. o cut.default() was not handling infinite values with infinite breaks. (PR#1694) o ks.test() could fail due to integer overflow if n.x and n.y were both large. o all.equal(3., 3:3) wasn't TRUE when the methods package was present. o read.table() could remap non-syntactic names to duplicates, and did not check for duplicated names. o ls.str(envir = environment(F)) now works (when F is a function). o pie() now has a `border' (and 'lty') argument which allows empty slice borders and makes pie() useable for hundreds of slices. o all.equal.character() now works correctly also when NAs don't match (PR#1767). o all.equal.numeric() now gives character {instead of list} when lengths don't match. o read.dcf() had a memory leak. o Setting "tcl = a" in a highlevel graphic function worked almost as if par(tcl = a) was called (i.e. was persistent). Further, after par(tcl= <.>), highlevel graphic setting of tcl didn't work anymore. "tck" has now S's default of -0.01 (when tcl=NA). o data() was not checking if ./data was a directory before warning. o Assignment beyond the end of character strings was filling with "", whereas changing the length extended with NA_STRING. Now NA_STRING is used for both. o boxplot()s with logarithmic scale in "width-direction" now have proper widths, i.e. typically constant. o Using GNU readline in asynchronous event callbacks (e.g. TclTk or Gtk) works correctly, i.e. doesn't cause readline to abort the process. o Using Q to exit a browser invoked at the top-level could lead to the browser being invoked on all future top-level loops (PR#1721) o step(fit, direction="both") now uses both directions even if no scope is supplied. o strwidth(), strheight() now give 0 on NA strings (as they are no longer plotted). (PR#1739) o mtext(), persp(), plot.hclust() and title() no longer plot NA character strings. o pdf() has been protected against the user who specified non-existent fonts. (PR#1748) o dlnorm() returns zero for negative x argument. (PR#1781) o Printing 0 in octmode gave "" not "0". (PR#1759) o anova.glm() was ignoring a `dispersion' argument if given multiple objects. (PR#1807) o model.matrix() with a `rhs ~ .' formula included columns with duplicated names in the data frame, which caused subsequent confusion (e.g. in prediction from the object). model.matrix() was sometimes incorrectly determining the first factor in a formula without an intercept. o termplot() now needs data= argument more rarely. (PR#828) o abline() on log scale doesn't draw -ve points. (PR#1243) o The Java search engine now works within Mozilla 1.0 and Netscape 6.2.x / 7.0pr1. o unsplit() failed if f was a list of factors. (PR#1843) o The methods package generic version of primitives is now "sealed" and cannot be redefined (it was always a bad idea to do so). o quantile() gave -Inf not NaN in some examples. (Related to PR#1852) o read.table() read too far in checking the file structure if 0 < nrows < 5 and more rows existed on the file. (PR1809) o loess() was not checking for too small a span (so no points were included in the smoothing window). o match() was assuming that there was only one possible bit pattern for a numeric NA, so some matches failed on Solaris under some compiler options. o identical() no longer thinks NaN and as.double(NA) are identical. o pipe() can open in a binary mode even on Linux (where popen cannot). o zero-column matrices were not being printed at all, not even the row names. o polygon()'s `border' argument was incorrectly documented: in particular `border = 0' plots in background colour. o delete.response() was losing the attribute set for safe prediction. (PR#1840) o poly() was checking the degree against the number of points even when predicting. o Comparison of a data frame and list failed due to typo. (PR#1889) o dput() and dump() attempt to check if writing succeeded. (PR#1884) o rep(1:2, 0) and hence array(1:2, 0) fail no longer. o apply(matrix("", 3, 0), 2, length) now works. o order(na.last = NA, decreasing = TRUE) now sorts in decreasing order. (PR#1906) o order(na.last=NA) failed if all args were of length 1 or all were NA. (PR#1913, 1981) o source() would crash if the `keep.source = TRUE' and the input contained a function with a line longer than 1024 chars. (PR#1900) The limits on nesting of functions and on total function size when the source is kept are now enforced. As (incorrectly) the source was always kept, this meant functions longer than 128Kb could crash R, even in packages. o lqs() and cov.rob() check that the quantile argument does not exceed n-1. o grid() now also works with log coordinates active. o plot.table(tab, xlab="X", ylab="Y") now works as expected. o plot.formula(ask=FALSE) now works. (PR#1923) o as.list() now works properly. (PR#1926). o The residual SSq printed from an aov() fit with weights is now the weighted SSq. (PR#1930) o aov() could still fail on multistrata models with very long Error formulae. o try() could fail in BATCH use due to use of fflush(stdin). Only seen on Solaris. (PR#1934) o title(main=list("main")) printed garbage, as did similar calls using quote() instead of expression() for plotmath. (PR#1939) o deparse() dropped parentheses in some case where they were needed. (PR#1119, 1737, 1928, at least) o pdf(onefile = FALSE) never incremented the file number beyond two. o On Unix, protect against broken pipes where popen calls succeed even though the command does not exist (and the glibc manual says it should return NULL). (PR#1959) o data.frame() was allowing explicit row.names with missing values, but row names are required to be unique. o as.character(expression) was silently truncating to 60 characters: the help page claimed 500 which is now true. o as.hclust(x) now also works (as identity) for "hclust" objects. o NextMethod didn't work right in Ops. o dotchart() now obeys `xlim ='. o t(x) behaves when x is a (multivariate) time series. (PR#1998) o parse(text=x) no longer parses from stdin if length(x) is zero o binom.test() miscalculated p-value in some extreme cases o get("print.ts")(1) would segfault. It's now just an error. o cbind(NULL) {and similar} gave an error instead of NULL. o the complex version of solve(a,b) now also works if b is a vector CHANGES IN R VERSION 1.5.1 NEW FEATURES o Enhancements to mathematical annotation of plots: - expressions involving dot() now produce a dot accent above the (initial patch from Ben Bolker). - within an expression, the symbol partialdiff is now converted to a partial differential symbol (greek delta). o smooth.spline() has a new argument `nknots' allowing to set the default number of knots (when `all.knots = FALSE' as per default). BUG FIXES o Rdconv now skips CRs in input files, even on Unix. o readBin() had a (very slow) memory leak if changing size or reading character strings. writeChar() had a memory leak. o polygon() and rect() with lty = "blank" were omitting the fill colour (if present). symbols(circles=, lty="blank") was drawing the border of the disks. o Subsetting non-existent rows in a data frame would produce missing row names, which are not allowed. o On Unix, R_PAPERSIZE was set to '' instead of 'a4' as default on systems without paperconf. o Under GNOME, capabilities() now reports correctly that X11, png and jpeg are available (if they are under X11). o The names of some results of unlist() had the wrong internal length, which confused paste(). Both have been corrected. (PR#1524) o RweaveLatex.Rd had unbalanced braces in section "Supported Options". o merge() with multiple and differently-named match columns failed. (PR#1510) o NAs in right-justified unquoted character matrices were being mis-aligned. This mainly affected printing data frames. o predict.*bSpline() bugs extrapolating for deriv >= 1 (PR#1473), and predict.[bn]s bug e.g. for bs(x), reported by Ch.Sangiorgio. o qr.X was failing if n < p. Fixed, but only in the case when pivoting does not occur. (PR#1519) o xx[, 1:3] was returning a list if xx had only one row, even though xx[1, 1:3] was a data frame. (PR#1530) o nls() was reporting incorrectly the number of iterations if the maximum was reached. o rbind.data.frame() was coercing logical columns to factors. (PR#1536) o Rprof(NULL) or Rprof("") called when not profiling caused a segfault: now silently ignored. (PR#1471) o On systems (e.g. Windows) using R's own code for expm1, the values were wrong for large negative x, and this affected pweibull(), for example. o prettyNum(*, bigmark=*) added extra marks in some cases. (PR#1548) o cut.dendrogram() failed in some cases. (PR#1552) o The links in refman.pdf were broken by a single invalid \alias{}. Now Rdconv checks more comprehensively. (PR#1550) o predict(smooth.spline(x,*), deriv =1) did not predict at all `x' values, and smooth.spline(x,*, all.knots = TRUE) used much too much memory when length(x) was largish. smooth.spline(*, .... trace = TRUE ..) is a bit more self-explaining. o pexp(x, log=TRUE) and pweibull(*) were losing precision for large x. o Workaround for NetBSD bug in compiling dounzip.c. (PR#1565/6) o Conversions to numeric in type.convert were always treating "NA" as missing whatever the setting of na.strings. (PR#1568) o R CMD check now deals correctly with package names containing a '.' in the Depends field of a DESCRIPTION file. (PR#1591) o pbinom() and pbinom() were misssing the "fuzz" that other discrete distributions have in order to guard against truncation. o The "=" assignment operator behaved as "<<-" in some constructions with composite left-hand sides. o Added print.AsIs() method to ensure "AsIs" objects are printed by the method for their real class. (PR#1587) o mosaicplot(*, color = v) now recycles v[] if needed. o Calling dev.control("inhibit") with no graphics device open crashed R. (PR#1605) o read.dcf() was not checking that memory allocation succeeded. o The C function fprec might overflow for > 16 digits, showing up in example(str) on some platforms. o Changes to the methods package: - Nonstandard generic function definitions given to setGeneric now work; these were previously ignored. - Classes that extend matrix, etc. as the data part previously lost their attributes. - There were bugs in distinguishing methods for "missing" from methods for "ANY". - Some coerce methods were not selected correctly when the two classes were related by an "is" relation. - extends() now works correctly if given a class definition rather than a name. - class()<- was leaving in an explicit class attribute for basic data types. - Method signatures including arguments following "..." in the argument list of the generic didn't work. o par(mgp = v) now allows negative `v' (S-compatibly and sensibly). o identify.hclust() masked its `x' argument and so failed. o System rint was never being used in fround.c. o round/trunc.POSIXt were erroneously retaining information on DST. (PR#1543) o tcltk package didn't work with tcl8.0.x. Compatibility code inserted (PR#1640, thanks to Rene' Bertin for helping out with this). o selfStart() {pkg "nls"} now works again when parameter names are not specified (but implicit). o legend() now treats lty="0" properly (as solid). o ARMAacf was failing if 0 < p < q+1: it failed to say that ar needed to be padded with zeroes, and now the code does that. o old.packages() was assuming a bundle was installed in only one library, and so update.packages() would only update a bundle in the first location in lib.loc. o fisher.test() could miscalculate odds ratio and confidence interval for tables with large entries, due to numerical overflow. o Using lty = "1" (or "10") does no longer produce invalid postscript or pdf. Using "0" in a character lty is currently not implemented device-independently and needs more fixing. o ccf(plot = FALSE) was returning a spurious extra 0 at lag 0. o On console-based versions of R (Windows, GNOME, probably Mac OS) warning/error messages longer than 8192 chars could crash R. (PR#1651) o Comparisons between objects of mode "call" using "==" now return TRUE if both sides deparse to the same string (as always intended). o HoltWinters() now initializes correctly in the exponential smoothing case, and plot.HoltWinters() allows lty to be set. o fisher.test() crashed due to corruption on some large problems. It also crashed on tables with total one. (PR#1662) o The substitution code for strptime (used e.g. on Windows) cached the month names and so did not recognise locale changes during an R session, as used by get.hist.quote{tseries}. Caching has been supressed. (PR#1116) o Some functions used the non-existing error() function instead of stop(). o vector("complex",n) doesn't return random garbage anymore. CHANGES IN R VERSION 1.5.0 USER-VISIBLE CHANGES o XDR support is now guaranteed to be available, so the default save format will always be XDR binary files, and it is safe to distribute data in that format. (We are unaware of any platform that did not support XDR in recent versions of R.) gzfile() is guaranteed to be available, so the preferred method to distribute sizeable data objects is now via save(compress = TRUE). o pie() replaces piechart() and defaults to using pastel colours. o formatC has new arguments (see below) and formatC(*, d = ) is no longer valid and must be written as formatC(*, digits = ). o Missingness of character strings is treated much more consistently, and the character string "NA" can be used as a non-missing value. o summary.factor() now uses a stable sort, so the output will change where there are ties in the frequencies. NEW FEATURES o Changes in handling missing character strings: - "NA" is no longer automatically coerced to a missing value for a character string. Use as.character(NA) where a missing value is required, and test via is.na(x) not x == "NA". String "NA" is still converted to missing by scan() and read.table() unless `na.strings' is changed from the default. - A missing character string is now printed as `NA' (no quotes) amongst quoted character strings, and `' if amongst unquoted character strings. - axis() and text.default() omit missing values of their `labels' argument (rather than plotting "NA"). - Missing character strings are treated as missing much more consistently, e.g. in logical comparisons and in sorts. identical() now differentiates "NA" from the missing string. o Changes in package methods: - New function validSlotNames(). - Classes can explicitly have a "data part", formally represented as a .Data slot in the class definition, but implemented consistently with informal structures. While the implementation is different, the user-level behavior largely follows the discussion in "Programming with Data". - A "next method" facility has been provided, via the function callNextMethod(). This calls the method that would have been selected if the currently active method didn't exist. See ?callNextMethod(). This is an extension to the API. - Classes can have initialize methods, which will be called when the function new() is used to create an object from the class. See ?initialize. This is an extension to the API. - The logic of setGeneric() has been clarified, simplifying nonstandard generic functions and default methods. o Changes in package tcltk: - Now works with the GNOME user interface. - Several new functions allow access to C level Tcl objects. These are implemented using a new `tclObj' class, and this is now the class of the return value from .Tcl() and tkcmd(). o Changes in package ts: - More emphasis on handling time series with missing values where possible, for example in acf() and in the ARIMA-fitting functions. - New function arima() which will replace arima0() in due course. Meanwhile, arima0() has been enhanced in several ways. Missing values are accepted. Parameter values can be initialized and can held fixed during fitting. There is a new argument `method' giving the option to use conditional-sum-of-squares estimation. - New function arima.sim(). - New datasets AirPassengers, Nile, UKgas and WWWusage, and a expanded version of UKDriverDeaths (as a multiple time series Seatbelts). - New generic function tsdiag() and methods for arima and arima0, to produce diagnostic plots. Supersedes arima0.diag(). - New functions ARMAacf() and ARMAtoMA() to compute theoretical quantities for an ARMA process. - New function acf2AR() to compute the AR process with a given autocorrelation function. - New function StructTS() to fit structural time series, and new generic function tsSmooth() for fixed-interval state-space smoothing of such models. - New function monthplot() (contributed by Duncan Murdoch). - New functions decompose() and HoltWinters() (contributed by David Meyer) for classical seasonal decomposition and exponentially-weighted forecasting. o An extensible approach to safe prediction for models with e.g. poly(), bs() or ns() terms, using the new generic function makepredictcall(). Used by most model-fitting functions including lm() and glm(). See ?poly, ?cars and ?ns for examples. o acosh(), asinh(), atanh() are guaranteed to be available. o axis() now omits labels which are NA (but still draws the tick mark. o Connections to bzip2-ed files via bzfile(). o chol() allows pivoting via new argument `pivot'. o cmdscale() now takes rownames from a dist object `d' as well as from a matrix; it has new arguments `add' (as S) and `x.ret'. o crossprod() handles the case of real matrices with y = x separately (by accepting y = NULL). This gives a small performance gain (suggestion of Jonathan Rougier). o deriv/deriv3() can now handle expressions involving pnorm and dnorm (with a single argument), as in S-PLUS. o New function expm1() both in R and in C API, for accurate exp(x)-1; precision improvement in pexp() and pweibull() in some cases. (PR#1334-5) o New function findInterval() {using new C entry point findInterval, see below}. o formatDL() now also works if both items and descriptions are given in a suitable list or matrix. o gzfile() is guaranteed to be available, and hence the `compress' option to save() and save.image(). o hist() now has a method for date-time objects. o library() now checks the dependence on R version (if any) and warns if the package was built under a later version of R. o library(help = PKG) now also returns the information about the package PKG. o Added function logb(), same as log() but for S-PLUS compatibility (where log now has only one argument). o New na.action function na.pass() passes through NAs unaltered. o piechart() has been renamed to pie(), as piechart is a Trellis function for arrays of pie charts. The default fill colours are now a set of pastel shades, rather than par("bg"). o plclust() in package mva, for more S-PLUS compatibility. o poly() now works with more than one vector or a matrix as input, and has a predict method for objects created from a single vector. o polyroot() now handles coefficient vectors with terminal zeroes (as in S). o New prettyNum() function used in formatC() and format.default() which have new optional arguments `big.mark', `big.interval', `small.mark', `small.interval', and `decimal.mark'. o print.coefmat() has a new argument 'eps.Pvalue' for determining when small P-values should be printed as "< {...}". o The recover() function has been moved to the base package. This is an interactive debugging function, usually a good choice for options(error=). See ?recover. o rep() has a new argument `each' for S-PLUS compatibility. The internal call is made available as rep.int(), again for help in porting code. o New functions rowSums(), colSums(), rowMeans() and colMeans(): versions of apply() optimized for these cases. o rug() now has a "..." argument allowing its location to be specified. o scan() can have NULL elements in `what', useful to save space when columns need to be discarded. o New option by = "DSTday" for seq.POSIXt(). o Changes to sorting: - sort(), sort.list() and order() have a new argument `decreasing' to allow the order to be reversed whilst still preserving ties. - sort() has an option to use quicksort in some cases (currently numeric vectors and increasing order). - The default Shell sort is Sedgewick's variant, around 20% faster, and pre-screening for NAs speeds cases without any NAs several-fold. - sort.list() (and order with just one vector) is several times faster for numeric, integer and logical vectors, and faster for character vectors. o New assignment forms of split(); new function unsplit(). o New sprintf() function for general C like formatting, from Jonathan Rougier. o Argument `split' of summary.{aov,aovlist} is now implemented. o summary.princomp() now has a separate print() method, and `digits' is now an argument to the print method and not to summary.princomp itself. o An extended version of the trace() function is available, compatible with the function in S-PLUS. Calls to R functions can be inserted on entry, on exit, and before any subexpressions. Calls to browser() and recover() are useful. See ?trace. o New function TukeyHSD() for multiple comparisons in the results of aov(). (Formerly function Tukey in package Devore5 by Douglas Bates.) o New read-only connections to files in zip files via unz(). o warning() has new argument `call.', like stop()'s. o zip.file.extract() is no longer provisional and has an "internal" method available on all platforms. o Methods for [, [<- and as.data.frame() for class "POSIXlt". o Much improved printing of matrices and arrays of type "list". o The "Knuth-TAOCP" option for random-number generation has been given an option of using the 2002 revision. See ?RNG for the details: the R usage already protected against the reported `weakness'. o min/max of integer(0) (or NULL) is now Inf/-Inf, not an extreme integer. DEPRECATED & DEFUNCT o .Alias, reshapeLong(), reshapeWide() are defunct. o arima0.diag() (package ts) is deprecated: use tsdiag() instead. o piechart() is deprecated; renamed to pie(). DOCUMENTATION CHANGES o `Writing R Extensions' now has an example of calling R's random numbers from FORTRAN via C. o R itself and all R manuals now have ISBN numbers, please use them when citing R or one of the manuals. INSTALLATION CHANGES o The configure script used when building R from source under Unix is now generated using Autoconf 2.50 or later, which has the following 'visible' consequences: - By default, configure no longer uses a cache file. Use the command line option '--config-cache' (or '-C') to enable caching. - Key configuration variables such as 'CC' are now *precious*, implying that the variables * no longer need to be exported to the environment and can and should be set as command line arguments; * are kept in the cache even if not specified on the command line, and checked for consistency between two configure runs (provided that caching is used, see above); * are kept during automatic reconfiguration as if having been passed as command line arguments, even if no cache is used. See the variable output section of 'configure --help' for a list of all these variables. o Configure variable 'FC' is deprecated, and options '--with-g77', '--with-f77' and '--with-f2c' are defunct. Use configure variable 'F77' to specify the FORTRAN 77 compiler, and 'F2C' to specify the FORTRAN-to-C compiler and/or that it should be used even if a FORTRAN 77 compiler is available. o Non-standard directories containing libraries are specified using configure variable 'LDFLAGS' (not 'LIBS'). UTILITIES o Sweave(), Stangle() and friends in package tools. Sweave allows mixing LaTeX documentation and R code in a single source file: the R code can be replaced by its output (text, figures) to allow automatic report generation. Sweave files found in package subdir 'inst/doc' are automatically tested by R CMD check and converted to PDF by R CMD build, see the section on package vignettes in the 'Writing R Extensions' manual. o Rdconv can convert to the S4 '.sgml' format. o R::Utils.pm masks some platform dependencies in perl code by providing global variables like R_OSTYPE or wrapper functions like R_runR(). o If a directory 'inst/doc' is present in the sources of a package, the HTML index of the installed package has a link to the respective subdirectory. o R CMD check is more stringent: it now also fails on malformed 'Depends' and 'Maintainer' fields in 'DESCRIPTION' files, and on unbalanced braces in Rd files. It now also provides pointers to documentation for problems it reports. o R CMD check, build and INSTALL produce outline-type output. o QC functions in package 'tools' now return the results of their computations as objects with suitable print() methods. By default, output is only produced if a problem was found. o New utility R CMD config to get the values of basic R configure variables, or the header and library flags necessary for linking against R. o Rdindex and maketitle.pl require perl 5.005, as Text::Wrap::fill was only introduced at 5.004_05. C-LEVEL FACILITIES o All the double-precision BLAS routines are now available, and package writers are encouraged not to include their own (so enhanced ones will be used if requested at configuration). o findInterval(xt[],n,x,...) gives the index (or interval number) of x in the sorted sequence xt[]. There's an F77_SUB(interv)(.) to be called from Fortran; this used to be part of predict.smooth.spline's underlying Fortran code. o Substitutes for (v)snprintf will be used if the OS does not supply one, so tests for HAVE_(V)SNPRINTF are no longer needed. o The DUP and NAOK arguments in a .C() call are not passed on to the native routine being invoked. Any code that relied on the old behaviour will need to be modified. o log1p is only provided in Rmath.h if it is not provided by the platform, in which case its name is not remapped, but a back-compatibility entry point Rf_log1p is provided. Applications using libRmath may need to be re-compiled. o The methods used by optim() and integrate() have entry points in R_ext/Applic.h and have a more general interface documented in `Writing R Extensions'. o The bessel_? entry points are now suitable to be called repeatedly from code loaded by .C(). (They did not free memory until .C() returned in earlier versions of R.) o Server sockets on non-Windows platforms now set the SO_REUSEADDR socket option. This allows a server to create simultanous connections to several clients. o New quicksort sorting (for numeric no-NA data), accessible from C as R_qsort() etc and from Fortran as qsort4() and qsort3(). o Rinternals.h no longer includes fcntl.h, as this is not an ISO C header and cannot be guaranteed to exist. o Fortran subroutines are more correctly declared as `extern void' in R_exts/Applic.h and R_exts/Linpack.h. BUG FIXES o The calculation of which axes to label on a persp() plot was incorrect in some cases. o Insufficient information was being recorded in the display list for the identify() function. In particular, the "plot=" argument was ignored when replaying the display list. (PR#1157) o The vertical alignment of mathematical annotations was wrong. When a vertical adjustment was not given, it was bottom-adjusting i.e,. it was treating adj=0 as adj=c(0, 0). It now treats adj=0 as adj=c(0, 0.5) as for "normal" text. (PR#1302) o the man page (doc/R.1) wasn't updated with the proper VERSION. o smooth.spline() had a "df = 5" default which was never used and hence extraneous and misleading. o read.fwf() was interpreting comment chars in its call to scan: replaced by a call to readlines(). (PR#1297/8) o The default has been changed to scan(comment.char="") for consistency with earlier code (as in the previous item). o bxp(*, notch.frac = f) now draws the median line correctly. o Current versions of gs were rotating the output of bitmap(type = "pdfwrite") and when converting the output of postscript() to PDF; this has been circumvented by suppressing the %%Orientation comment for non-standard paper sizes. o plot.ts(x, log = "y") works again when x has 0s, also for matrix x. o add1(), drop1(), step() work again on glm objects with formulae with rhs's containing `.'. (Broken by a `bug fix' (in reality an API change) in 1.2.1.) o optim(method="BFGS") was not reporting reaching `maxit' iterations in the convergence component of the return value. o aov() and model.tables() were failing on multistrata models with excessively long Error formula. (PR#1315) o Transparent backgrounds on png() devices on Unix-alikes had been broken during the driver changes just prior to 1.4.0. (They worked correctly on Windows.) o demo(is.things) didn't work properly when the methods package was attached. o match(), unique() and duplicated() were not declaring all NaNs to be equal, yet not always distinguishing NA and NaN. This was very rare except for data imported as binary numbers. o The error handler recover() protects itself against errors in dump.frames and uses a new utility, limitedLabels, to generate names for the dump that don't inadvertently blow the limit on symbol length. (TODO: either fix dump.frames accordingly or remove the limit--say by truncating very long symbols?) o se.contrasts() works more reliably with multistratum models, and its help page has an example. o summary.lm() was not returning r.squared nor adj.r.squared for intercept-only models, but summary.lm.null() was returning r.squared but not adj.r.squared. Now both are always returned. Neither returned f.statistic, and that is now documented. o Subsetting of matrices of mode list (or other non-atomic modes) was not implemented and gave incorrect results without warning. (PR#1329) Under some circumstances subsetting of a character matrix inserted NA in the wrong place. o abs() was not being treated as member of the Math group generic function, so e.g. its method for data frames was not being used. o set.seed(seed, "default") was not using the `seed' value (only for kind = "default"). o logLik.lm() now uses "df = p + 1" again (`+ sigma'!). o logLik.glm() was incorrect for families with estimated dispersion. o Added strptime() workaround for those platforms (such as Solaris) that returned missing components as 0. Missing days are now detected, but missing years will still be interpreted as 1900 on such platforms. o Inheritance in formal classes (the methods package) works breadth-first as intuition would expect. o The new() function in package `methods' works better (maybe even correctly?) for the various combinations of super-classes and prototypes that can be supplied as unnamed arguments. o Internal code allowed one more connection to be allocated than the table size, leading to segfaults. (PR#1333) o If a user asks to open a connection when it is created and it cannot be opened, the connection is destroyed before returning from the creation call. (related to PR#1333) o Sys.putenv() was not using permanent storage. (PR#1371) o La.svd() was not coercing integer matrices. (PR#1363) o deriv(3) now reports correctly the function it cannot find the derivatives table. o The GNOME user interface was over-enthusiastic about setting locale information. Now only LC_CTYPE, LC_COLLATE and LC_TIME are determined by the user's environment variables (PR#1321) o In X11, locator() would sound the bell even if "xset b off" had been set. o merge() could be confused by inconsistent use of as.character() giving leading spaces. o [pqr]binom() no longer silently round the `size' argument, but return NaN (as dbinom() does). (PR#1377) o Fixed socket writing code to block until all data is written. Fixed socket reading code to properly handle long reads and reads with part of the data in the connection buffer. o Allow sockets to be opened in binary mode with both open="ab" and open="a+b". o levels<-.factor() was using incorrectly list values longer than the number of levels (PR#1394), and incorrectly documented that a character value could not be longer than the existing levels. o The pdf() device was running out of objects before the documented 500 page limit. Now there is no limit. o legend() did not deal correctly with `angle' arguments. (PR#1404) o sum() tried to give an integer result for integer arguments, but (PR#1408) - this was not documented - it sometimes warned on overflow, sometimes not - it was order-dependent for a mixture of integer and numeric args. o mean() gave (numeric) NA if integer overflow occurred in sum(), but now always works internally with numeric (or complex) numbers. o sort.list() and order() were treating NA_STRING as "NA". o sort.list(na.last = NA) was not implemented. o seq.default() was returning only one element for a relative range of less than about 1e-8, which was excessively conservative. (PR#1416) o tsp(x) <- NULL now also works after library(methods). o persp(shade=) was not working correctly with the default col=NULL if this was transparent. (PR#1419) o min/max(complex(0)) was returning a random value. o range() gave c(1, 1). o range(numeric(0)) is now c(Inf, -Inf), as it was documented to be. o print.ts() was occasionally making rounding errors in the labels for multiple calendar time series. o Rdconv was not handling nested \describe{} constructs when converting to HTML (PR#1257) and not fixing up mal-formed \item fields in \describe{} when converting to text (PR#1330). o filled.contour() was not checking consistency of x, y, z. (PR#1432) o persp.default() no longer crashes with non-character labels. (PR#1431) o fft() gave incorrect answers for input sizes 392, 588, 968, 980 .... (PR#1429) o det(method = "qr") gave incorrect results for numerically singular matrices. (PR#1244) o barplot() now allows the user to control `xpd'. (PR#1088, 1398) o library() (with no arguments) no longer fails on empty TITLE files. o glm() was failing if both offset() and start were specified. (PR#1421) o glm() might have gotten confused if both step-shortening and pivoting had occurred (PR#1331). Step-halving to avoid the boundary of feasible values was not working. o Internal representation of logical values was not being treated consistently. (Related to PR#1439) o The c() function sometimes inserted garbage in the name vector for some types of objects, e.g. names(c(ls, a=1)). o Fixed bug in `$' that could cause mutations on assignment (PR#1450). o Some X servers displayed random bytes in the window title of graphics windows (PR#1451) o The X11 data editor would segfault if closed with window manager controls (PR#1453) o Interrupt of Sys.sleep() on UNIX no longer causes subsequent Sys.sleep() calls to segfault due to infinite recusion. o Eliminated a race condition that could cause segfaults when a SIGINT was received while handling an earlier SIGINT. o rect(lty = "blank") was incorrectly drawing with a dashed line. o type.convert() was not reporting incorrectly formatted complex inputs. (PR#1477) o readChar() was not resetting vmax, so causing memory build-up. (PR#1483) ************************************************** * * * 1.4 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.4.1 BUG FIXES o scan(multi.line = FALSE) now always gives an immediate error message if a line is incomplete. (As requested in PR#1210) o read.table() is no longer very slow in processing comments: moved to C code and fewer lines checked. o type.convert() could give stack imbalance warnings if used with as.is = TRUE. o predict.mlm ignored newdata (PR#1226) and also offsets. o demo(tkttest) was inadvertently changed in 1.4.0 so that it would evaluate the requested test, but not display the result. o stars(scale = TRUE) (the default) now works as documented (and as S does). Previously it only scaled the maximum to 1. (PR#1230) o d0 <- data.frame(a = 0); data.matrix(d0[0, 0]) and data.matrix(d0[, 0]) now work. o plot(multiple time series, plot.type = "single") was computing `ylim' from the first series only. o plot.acf() has a new `xpd = par("xpd")' argument which by default *does* clipping (of the horizontal lines) as desired (xpd = NA was used before, erronously in most cases). o predict(smooth.spline(.), deriv = 1) now works. o identify() failed when x is a structure/matrix. (PR#1238) o getMethod() returns NULL when optional=TRUE as promised in the documentation. o setMethod() allows "..." to be one of the arguments omitted in the method definition (but so far no check for ... being missing) o Allow round() to work again on very large numbers (introduced in fixing PR#1138). (PR#1254) o Rinternals.h is now accepted by a C++ compiler. o type.convert() was failing to detect integer overflow. o piechart() was defaulting to foreground colour (black) fills rather than background (as used in 1.3.1 and earlier). Now background is used, but be aware that as from 1.4.0 this may be transparent. o La.eigen(*, only.values=TRUE) does not segfault anymore in one branch (PR#1262). o cut() now produces correct default labels even when include.lowest = TRUE (PR#1263). o reformulate() works properly with a response. o cmdscale(*, k = 1) now works properly. o Options by = "month" and "year" to seq.POSIXt() will always take account of changes to/from daylight savings time: this was not working on some platforms. o glm.fit.null() now accepts all the arguments of glm.fit() (it could be called from glm.fit with arguments it did not accept), and is now documented. o cov.wt(cbind(1), cor = TRUE) now works. o predict(glm.object, se.fit = TRUE) was failing if the fit involved an offset. o detach() on package:base would crash R. (PR#1271) o print or summary on a manova() object with no terms, no names on the response and intercept = FALSE (which is not sensible) would give an error. o seek() on file connections was ignoring the `origin' argument. o Fixed new environment handling in library() to avoid forcing promises created by delay() o arima0() could leak memory: now released via on.exit(). o qr.coef(qr,*) now keeps the names of qr$qr. o read.00Index() no longer fails on data indexes not generated by Rdindex (PR#1274). 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 QC tools checkFF(), codoc() and undoc() previously in package base, as well as the following new ones: - checkAssignFuns() for checking whether the final argument of replacement 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 replacement 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 Mac OS 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 Mac OS. 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 data bases 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. o The trace() function has two new features. Giving where= as a function name allows tracing of functions called from a namespace. A new argument edit= allows inserting arbitrary tracing code in the function. See the online help for details. o Namespaces and S4 classes/methods should work better together. Generic function and class definition objects are used in many places where the name of the function or class was used before, which caused problems for non-exported objects. 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)) o fixed special cases that caused bad behavior for methods, particularly with nested use of primitive operators when setMethod had been called. Also fixed some situations that prevented caching methods (and therfore slowed down dispatch seriously) in similar cases. o Packages can now have non-exported classes. Previously this failed because computations could not find methods for objects from private classes. Adding a "package" attribute to an object's class attribute (along with a large number of changes to use the package information) fixes this for most cases. (Methods for primitive functions still use global information about classes because of imposed efficiency constraints on primitives.) o untrace() now works with package::function-style references. ************************************************** * * * 1.0 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 1.0.0 NEW FEATURES o The entry points [dpq]norm no longer exist: the header file R_ext/Mathlib.h must be used and such code re-compiled. o Header files in R_ext must be given explicitly as e.g. "R_ext/Mathlib.h". o New function log1p(x) := log(1 + x) , accurate for |x| << 1. o HTML searches can now select between any combination of titles, keywords and object names. The keyword list of SearchEngine.html is automatically built from KEYWORDS.db. Missing links are now resolved using the search engine. o A data subdirectory of the working directory will be searched for data, by default after all the loaded packages (including base). o Data directories can now be zipped as Rdata.zip, provided a list of contents is provided in file `filelist'. o New function try(expr) which provides a user-friendly wrapper to restart(). o New function geterrmessage() to retrieve the last error message, for use in try() and user's error handlers, and new option "show.error.messages" to control the printing of error messages. o persp() now labels its axes. o ?plotmath documents the plotting expressions facility much more comprehensively, with tables in the examples. o New functions dump.frames() and debugger() allow post-mortem debugging. See the help on debugger. o New functions by() and merge() to split and join data frames. o Generic methods now do "match before dispatch", so plot(pch=2, y ~ x) invokes plot.formula. Notice that this will break user code if it has renamed the dispatch argument and uses the original name for a different argument. o Long-named command-line options also allow `--name VALUE'. o arima0() now uses optim() rather than nlm(), and is thereby normally faster and gives more accurate solutions. Perhaps more importantly, it fails to converge much less often. o Enhanced pairs() function allowing separate upper, lower and diagonal panel functions and control of diagonal labels. (Much of this was contributed by Jens Oehlschlaegel-Akiyoshi.) o Links to R objects in other packages in help files can now be specified explicitly as \link[pkg]{topic} or \link[pkg:maintopic]{topic} o optim() has a new simulated annealing method contributed by Adrian Trapletti. o Hershey vector fonts are available in text() and contour(). Documentation for Hershey vector fonts is in help(Hershey). o The HTML function indices (for packages and for all installed functions) and the index to the reference manual now omit methods for generic functions if they would immediately follow the generic and refer to the same file. This reduces the clutter considerably. o New functions points.formula() and lines.formula() to supplement plot.formula(). The latter has been enhanced so that all arguments are now evaluated in the supplied data frame and all subsettable arguments are subsetted. Notice that the data= argument can no longer be given as a positional argument but must be given in keyword form. o The behaviour of pmatch() has been changed to be S-compatible: in particular the meaning of duplicates.ok=TRUE has changed. The help for pmatch and charmatch now gives more precise descriptions, including of their differences. o print.hclust(), hclust() and dist() now store the method that has been used. o If there are unmatched function argument(s), the first found is named in the message, for example `unused argument(s) (xlabel ...)'. o Conversion from Rd to raw nroff is no longer available. o text() now accepts vector "col", "cex" and "font" arguments. o "default" is now a valid argument to RNGkind(). o nlm() and optim() will now give up immediately they try to step to a non-finite value: nlm at least would go into an infinite loop. o "mostattributes(obj) <- value" utility useful for careful attributes' inheritance; e.g. for fixing pmax/pmin (see below). BUG FIXES o (0.99.0a) The internal code for strsplit no longer destroys other internal structures, e.g. postscript file output on Linux. o (0.99.0a) nlm() no longer segfaults with Hessian specified. o (0.99.0a) Gnome version plotmath works, kind of o (0.99.0a) edit.data.frame() now handles character vectors better, provided they were generated with I(). o (0.99.0a) Attempt to special-case print-buffer allocation with just a format argument was abandoned, since there is no portable way of doing it and it caused compile problem on Alpha. o tempfile("") now works on all Unix platforms, and tempfile("a b c") returns a single name (with spaces in). The file names are now unique across processes (Unix), are guaranteed not to exist and very likely to be unique within an R session. o The search semantics of data(), example() and help() have changed (see their help pages). In particular, they will normally look in the package which was loaded, even if it is not in one of the libraries given in .lib.loc. Autoloads are no longer included in the search (as they searched whole packages, not just the autoloaded objects). o The documentation for .Rd files said & must be entered as \& but only the unescaped form was processed correctly. Now both are accepted but & is preferred. o list.files now skips non-existent/unreadable directories with a warning, rather that failing with an error. o Lots of help examples now tidy up the files they created, and detach data frames and libraries they attach. o library(help=foo) lists only contents of first version if multiple matches are found on lib.loc. o round(2.345e-99, 100) now works (not giving 0). C functions fprec() and fround() [= R's signif() and round()], now use R_pow_di(10.0, n) which is clean and more efficient. This changes some results in the least significant bits. o rpois sometimes had problems with mu=0, now special-cased o Rare memory overrun in rpois fixed. o --nsize and --vsize arguments to R CMD check now work. o plot.stepfun had renamed the dispatch argument and used the original name "x" for a different argument which broke on the new `match & dispatch' code. Changed to "xval". o The return value for par() was incorrectly documented, and in consequence cpgram() was not re-setting "pty". o package.dependencies() printed unnecessary debugging messages (version comparison): these have been removed. o backslashes in examples in help files are now converted correctly to latex. o qchisq with non-centrality parameter now does something. o Greek symbols are now converted correctly in HTML help (but only rendered correctly on a few browsers). o rbind(x, y) works when x has no columns. o \tabular in Rd files is rendered better in latex, and long tabular material is now acceptable (and split over pages). o evaluation depth wasn't properly reset by "next" o Old (pre-0.63.1) .Random.seed would cause problems if used. o Row indexing of data.frames by characters (e.g. y["ab", ]) was wrong, as pmatch was not S-compatible. o Contour labels used to be rounded to integers. o Calling rbinom() repeatedly with the same p but different n gave incorrect results. o Rd2contents assumed the \name field was the file name, so searches could lead to non-existent links. o Assigning functions to list elements is not longer disallowed. o Unified usage statement to R CMD xxx for all commands o Using duplicated new string indices in [<- caused a crash on some platforms, e.g. x <- 1:2; x[c("3", "3")] <- 3; x. o rle() can now handle character vectors, as documented. o print.default failed to reset its settings, so, e.g. na.print could persist when printing a list. o [cr]bind could sometimes return an invisible value. o axis() and rug() sometimes extended the axis line too far. rug() always clipped x values to the plot region, but now admits to doing so with a warning. o plot() and axis() got into trouble with very small relative ranges: these are now required to be at least 100x the machine precision. o split.screen(, erase=TRUE) failed to create a new plot, so failed if it was used on a postscript device before other plots. o plotting with lwd = 0 also set the dash length to 0: now dash lengths are scaled up for lwd > 1 but not reduced for 0 <= lwd < 1. o plotting a " " vertically caused an X11 error with some fonts, (notably URW fonts on RedHat) causing plot.lm to crash R o F distributions with huge DF now behave more sensibly o Crashes could occur if there was an error in inline parameters, because the call was not being recorded. It is now. o Title field of DESCRIPTION now overrides TITLE file. o R now reports `50 or more warnings', not just 50, as it only displays the first 50. o Resetting the RNG state resets the state of the Box-Muller generator too. o Pointer protection bug in load() code. o Assignment with unknown string index caused memory corruption when used on matrices. o It is now possible to call Fortran routines d1mach and 11mach on platforms which do not append underscores. o Additions to plots by identify() and locator() were not being recorded, and so did not appear when a plot was copied or printed. o The defaults for `na.action' arguments were inconsistently documented. In R the default is taken from the options(na.action) setting, and that defaults to `na.omit'. If there is no `na.action' setting, the default is `na.fail'. For consistency, the default for replications() has been changed. o Fix cases with lambda==0 in Poisson distribution o demo(is.things) had been broken by the introduction of is.element. o palette() didn't check for overflow and was limited to 256 colors, so palette(colors()) would segfault. Limit increased to 1024 and check inserted. o C functions fprec() and fround() [= R's signif() and round()], now use R_pow_di(10., n) which is clean and more efficient. This changes some results in the least significant bits. o pmin(c(a=1), 2:3) now works {and pmax(.) too}. ************************************************** * * * 0.99 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 0.99.0 NEW FEATURES o The ``Introduction to R'' manual, in doc/manual. The ``Writing R Extensions'' manual is much enhanced for this release. o The format for save/load has been changed. Workspaces and objects saved in earlier versions can be loaded into this version, but not conversely. Use save() or save.image() with argument oldstyle=TRUE to save in the old format if you need to. o The header files for C code have been reorganised. The preferred header file for user code is now "R.h", and ancillary files such as Arith.h now need to be referred to as "R_ext/Arith.h". The `Writing R Extensions' manual now contains the beginnings of a description of the public API and how to use it. o Many of the exported symbols have been remapped or hidden. This means that code using Rdefines.h or Rinternals.h or Mathlib.h will need to be re-compiled, and code using Applic.h may do so. Many packages will need to be re-installed for use with this release. o The random number generation interface has changed, although saved .Random.seed's will work unchanged. The default generator is now Marsaglia's multicarry, and the Mersenne Twister GFSR and Knuth's Fibonacci subtraction are also available. The type of normal generation can be selected by RNGkind() (and is encoded in .Random.seed). The new function set.seed() which uses a single integer to set the random number seeds is now the recommended way to do so. It is now possible for a user to plug-in a new RNG written in C: consult ?Random and ?Random-user for the details. o All the DPQ {probability density quantile} functions have new arguments, "lower_tail = TRUE" and "log{_p} = FALSE". This allows more precise results when values would be close to 0 or 1. o R CMD Rd2dvi has new options --pdf, --title and --output. o New fields Date, URL and Title in the DESCRIPTION file of packages. The Title field replaces the separate TITLE file of packages, which is no longer necessary. o residuals.lm() has a "type" argument, as S does. o The underlying code for nlm has been translated from Fortran to C and made re-entrant (changes contributed by Saikat DebRoy). o optimize() can now be used recursively. o New suite of optimization methods optim(), covering Nelder-Mead, BFGS quasi-Newton and conjugate-gradients methods for unconstrained minimization and maximization with and without derivatives. optim() also allows box constraints (interval bounds on individual variables) in its limited-memory BFGS option. o R now compiles in the GNU version of regex, so regular expressions (grep, sub, gsub, regexpr, "pattern" in ls) are always available. The class of regular expressions supported is now slightly wider on some Unix platforms. o package ctest (for classical tests) is now part of the base distribution, and also contains chisq.test, prop.test and t.test which previously were in package base. These three functions are auto-loaded from ctest. o New utility `R CMD build' for building add-on packages along with some useful testing and cleaning up. o Conversion of .Rd help files to text format is done in Perl, and no longer requires nroff. This makes the conversion 8-bit clean and more accurate. o Building help for a package now removes help files that no longer exist in the source. o strsplit() now uses split regexps, and no longer insists on splitting into non-empty tokens. o Long-named options with arguments such as `--vsize' now use the `--name=VALUE' form; the old `--name VALUE' is deprecated. The old-style command line options `-v' and `-n' are now defunct. o par("cxy") { == par("cin")/par("pin") in user coordinates} for S compatibility. o If R_PAPERSIZE is not specified otherwise, configure now tries to compute it by calling paperconf. o The deprecated alternative RPROFILE is no longer accepted: use R_PROFILE instead. o Added setequal() for set equality. o First argument renamed to "package" for library(), require(), provide(). o model.frame() now accepts data= arguments that can be coerced to data frames. o Help files can now contain \describe groups. o Hyperlinks in help files can now use LaTeX special characters. o rstandard() now also works for glm objects. o glm drops 0-weight observations when fitting so that the output is compatible with lm.influence() and plot.lm(). o New function ftable() for creating and manipulating flat contingency tables. o New function cutree() for cutting hclust trees in package mva. New functions rect.hclust() and identify.hclust(). o Under Unix, the default editor is obtained from the environment variables EDITOR or VISUAL if either is set. o New command line option `--gui' to specify the graphical user interface under Unix. Currently, possible values are `X11' (the (default) and `GNOME', provided that GNOME support is available. Command line options `-g' and `--gnome' are defunct. o power.t.test() and power.prop.test() functions added for power and sample size calculations. o edit() is now generic and a new edit.data.frame() function calls up the spreadsheet data editor. This is still rather rudimentary, since the data editor really only knows about numeric and character vectors. o Modifications to the data editor so that one can use ESC to quit a partial cell entry and entering an empty cell causes the element to be set to NA. o prop.table() and margin.table() functions (these are *really* trivial). o R INSTALL checks the Depends field of DESCRIPTION if the currently running version of R meets an R dependency. old.packages() reports only packages conforming to the current version of R. New function package.dependencies() for parsing and checking dependencies. o options("expressions") now does something, and the evaluation depth is checked on all platforms (not just Macintosh). This will catch infinite recursions gracefully. o The default number of cons cells (`nsize') is now 350k (it was 250k). This reflects the added base code and packages, and increases memory usage by about 2Mb (on a 32-bit machine). o Some simple multiple comparison procedures: p.adjust() for generic adjustment of a set of p values by variants of the Bonferroni method; pairwise.t.test, pairwise.wilcox.test, pairwise.prop.test for pairwise comparisons of grouped data and proportions. o Error / warning calls with a long description of the call are split into two lines. (This helps avoid scrolling in the Windows GUI.) o lapply() is now internal and substantially faster (7% overall speed-up on the tests for the base package). o apply() no longer names the output dimensions unless FUN returns a result with names, and the same names for every result. o contour() can (at last) label contours by level. o persp() labels its axes. o scan() and read.table() now have a dec= argument to set the decimal point character. If sep= is set, quoting of strings is now possible and follows the conventions for comma-separated files. This should make it easier to read the "continental CSV" format (fields separated by semicolon and using comma as decimal point). The set of quoting characters has also been made optional. Variants of read.table(), read.csv() and read.csv2() have been defined o HDF5 support is gone from the R distribution, and provided by an add-on package available from CRAN. o New function getOption() for retrieving the value of a single option. o read.table.url() and related functions now use download.file, which has an extra "socket" method for direct HTTP socket connection. download.file has new option ``quiet''. o pairs.default() has an oma argument to allow users to override the internal setting of that graphics parameter. o princomp() in package mva allows the user to specify the covariance matrix (and hence use, e.g. cov.mve). BUG FIXES o svd(matrix(2,1,0)), arma0f(NULL), cancor(F,F) and prcomp(F[F]) no longer segfault. o loess.smooth(F[F],F[F]) and supsmu(F[F],F[F]) no longer segfault. o save(1, file = ""[F]) no longer segfaults. o stop(list()) and warning(list()) no longer segfault. o system(""[F]) and save(1, file = ""[F]) no longer segfault. o Overflow of the pointer protection stack is handled correctly o predict.glm(, type="link", se.fit=T) works o str() now works with Surv(.) objects from library(survival5). o all.equal(-Inf, -1e5) now gives "Mean absolute difference: Inf" instead of "Mean relative difference: NaN". o strsplit fix broke copy.url. o 0 ^ -1 == Inf and min(NA, NaN) is now always NA o R CMD xxx sets $R_HOME/bin to be first in PATH o Added more warnings to update.packages & friends. New function old.packages for better control of update.packages. o Adding matrices to data frames now happens column by column as documented, so character or logical matrices generate factor columns. o Formulae containing interactions with the response were handled incorrectly by model.matrix, giving wrong answers or crashes. o anova(lm(.)) with 0 weights now works. o plot.lm(), dffits(), covratio() now do the right thing for weighted lm regression. o formatC(as.integer(c(1,0,NA))) now works. PR#394, thanks to Jens O.-A. o format.char(.) is much faster for long vector argument [Jens O.-A.] o \enumerate now enumerates in text conversion of .Rd files. o glm() no longer fails with names<- errors in cases where observations with fits on the mu.eta boundary have been dropped. o Deviance residuals could be NaN instead of 0 by rounding error. o shapiro.test(x) now gives better error messages (eg. x=rep(1,5)) and doesn't print ANYTHING anymore (in some cases). o mode(as.formula(paste("~", paste(1:50, collapse="+")))[2]) now works. o glm() now handles cases with numerically 0 or 1 fitted values in binomial and numerically 0 in poisson correctly. (Previously these observations were dropped even though the variances were also numerically 0.) o (-4 + 0i) ^ (1/2) now gives 2i. o system.time() now does sensible things in the non-HAVE_TIMES case, and that and proc.time() have better documentation. o A couple of bugs in the data editor spreadsheet have been eliminated. o Elapsed time in proc.time() is no longer rounded to whole seconds under Unix. o Assigning character vectors to subsets of data frames now works correctly (it used to assign the numeric codes of factors). o Extensive enhancements and corrections to the help pages. o The possibility of buffer overruns during printing has been much reduced, and eliminated on systems with vsnprintf. ************************************************** * * * 0.90 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 0.90.1 NEW FEATURES o rect(.) has `lwd' argument. o legend() has a `adj' argument and has been streamlined (and fixed up). o `unname' convenience function [experimental data.frame behavior]. o `examples' sections have been added to the documentation for most of the data sets in the base library. o update.packages & friends have new argument contriburl for incomplete CRAN mirrors. Package bundles such as VR can be directly installed both from the shell and from inside R. o RLIBS is no longer accepted as well as R_LIBS (which has been the documented form since 0.65.0). o demo(nlm) has examples of using analytical gradients and Hessians. o .Platform$OS.type is standardized to be `unix', `mac' or `windows' o setting cex in matplot(matrix(1:25,5), cex=1:5) now works o ar.ols() has separate demean and intercept arguments, uses internal scaling for greater accuracy. o xxxPR functions allow NCHAR=-1 for S compatibility. o `Rcomplex' is preferred to `complex' (a future reserved word in C) for R complex objects passed to C. o new function dir.create() for platform-independence. o help.search() creates a database for faster searching later in the R session. o density() allows for more kernels and has a new argument `give.Rkern' to access the relevant kernel property. o multivariate methods for ar: "yule-walker" (now in C) and "burg" (new) contributed by Martyn Plummer. o New data sets `HairEyeColor' (hair and eye color of statistics students), `Titanic' (survival of passengers on the Titanic), and `UCBAdmissions' (student admissions at UC Berkeley). BUG FIXES o Many help pages have been revised and enhanced. o predict.glm() works again with type="link". o subscripting arrays and matrices no longer loses the names of the dimnames vector. Transpose also preserves the names. o examples in help files containing \testonly are no longer (partially) duplicated. o is.numeric() of a factor is now FALSE o prevent a segfault in plotmath o f <- get("function"); f(,); f(F,F) now "ok" (PR#361). o blank-line reject code in parse.dcf was wrong (Martyn Plummer) o made filled.contour independent of pointsize. Make plot key wider so there's room for a title. Touchup example. o font size fixups for the X11 driver (mainly) o some.list[[NA]] is NULL, following S, rather than giving spurious error messages o segfault when running out of heap o segfault in rbind of a vector without names fixed. cbind, too. o fixed symbol size problems with PostScript driver o unique() & duplicated() only work for atomic vectors; unique(data.frame(""[F])) doesn't segfault anymore. o get("attr<-")(""[0],""[0]) doesn't segfault anymore. o blunder in do_memoryprofile, causing segfault on Alpha machines o erroneous error message in coerceToSymbol o partial workaround for workspace restore problems. This can happen if an environment on the search path is assigned to a variable which gets saved. The error "unresolved node during restore" is turned into a warning, allowing the rest of the workspace to be restored, but the variable contains an empty environment on reload. o density(x) now works also when IQR(x) == 0. density(x, window=...) now works [S compatibility]. o prevent points from being plotted if pch, cex, or col are NA. Does not apply to bg on pch 21--25 (where NA means "transparent") because it would require fixes at the driver level. CHANGES IN R VERSION 0.90.0 NEW FEATURES o packages splines (for regression smoothing splines or interpolating splines) and nls (nonlinear least squares) are part of the base distribution. o New error handling using options ( error = expression(..) , warning.expr = ... ). REPLACING version 0.65.1's options(error.halt = T/F) o collected warnings before an error are no longer lost but are printed after the error message (unless the error makes this impossible). o A couple of substantial graphics changes, esp. in the X11 driver. The scaling of symbols is now linear in cex=, rather than being tied to the available font's size. The fonts on an X11 device also scale linearly with cex= insofar as your X server can do it. On systems with the scalable type 1 PostScript fonts installed, this looks particularly nice. Note that the scaling is linear in the *diameter*, but quadratic in area. The distance between lines of margin text in the X11 device is now proportional to the size given to x11(pointsize). o abline(a,b) now (again) refers to transformed coordinates on plots with log-axes, so that abline(lm(log10(y)~log10(x))) (say) draws a best-fitting line on a log-log plot. The earlier convention (to draw a curve representing a line in original coordinates) is available using a new untf= argument. o barplot.default() has new `axisnames' (and `sub') arguments, easily allowing suppression of bar labeling. o cbind() and rbind() now actually do what deparse.level=1 implies: add column/row names based on the deparsed argument, provided it is a simple symbol. The behaviour is still hardcoded, though. o gc() now reports the total sizes in Mb as well as numbers. o New function help.search() for searching the names, titles, aliases, or keywords in the help system. o image() allows x and y to specify either the boundaries or the midpoints of the cells. If the latter, the whole cells are drawn, rather than the outer cells being half-sized as previously. o NULL extra arguments to model.frame() are now treated as missing (instead of an error). o optimization with nlm() can use analytic gradients and Hessians if they are supplied. o on.exit() allows add=TRUE. o function parse.dcf() for parsing files in debian control file format (DESCRIPTION, CONTENTS, ...) o predict.{g}lm has a type="terms" option, and residual.glm has type="partial" as a step towards plot.gam(). o New arguments to q() and quit() allow the exit status to be set and the execution of .Last() to be skipped. o New function regexpr(), similar to grep but returns the position of the match in each string. (For S-PLUS compatibility.) o scan() now supports complex numbers. o New function sort.list, for S compatibility. (This has argument partial, but always sorts completely.) o storage.mode<- can be used to set "single", and if setting anything other than "single" it removes the "Csingle" attribute. o new function sunflowerplot(). o New function undoc() for listing undocumented objects. o User's .Rprofile now executes in global environment o All HTML pages now use the new style sheet doc/html/R.css o html and text files have now a header line giving the name of the help file and the package. The description section now comes first. o All the standard packages have DESCRIPTION files with "Priority: base", so installed.packages and package.description will work with them. o The R-external manual which describes programming for the .Call and .External interfaces is in the doc/manual directory. o New target `make pdf' in doc/manuals makes hyperlinked PDF documentation. (This is experimental for this release. See doc/manual/README for further details.) o S.h now contains (via Rdefines.h) a MESSAGE macro, and Free NULLs the pointer, for compatibility with S3 (but not S4). o New subroutine REALPR callable from Fortran (like DBLEPR but for real arguments): useful if as.single is in use. o The cex= argument to plot() etc. can be a vector, like pch=. o lty=0 now (again) makes lines invisible. Looks better for barplot label axis. o zero.R tries to find the zero DLL in a system-independent way. BUG FIXES o apply should now work for all un-dimnamed arrays (PR#318). o ar(..., demean=F) works more consistently across methods. o barplot() had lower limits set at -0.01, causing trouble with small heights. Switch to relative scale. (Thanks to Matt Wiener) o density() should work better with NAs and infinite values. See ?density for the current definitions of how these are handled. o diag(x) now works (as pre 0.65.1) for 1-d arrays. o Stored-source was dropped by dump(). o expand.grid returns a data frame even for one arg. o expand.grid(x) now also works for vector arguments x. o factor(list()) or factor(character(0)) *is* now a factor with valid levels(.); ordered does NOT allow an `ordered' argument anymore and is now defined as trivial call to factor. o help page for gc gives correct size of cons cells (20 bytes for 32-bit systems, 36 or more for 64-bit systems). o gcinfo reports correct percentages of heap even for vsize > 200M. o gl(6,3,12) and gl(6,3,2) now both work. o Empty lists now deparse correctly. o na.omit.ts and na.contiguous preserve classes. o plot.factor {plot()} now obeys axes=FALSE and xaxt="n". o read.table(as.is = TRUE) would leave everything as character. Now it correctly tries to convert to numeric. o require() now has the warn.conflicts argument of library(). o Fix problems in scan(flush = TRUE). o scan() got confused by trailing whitespace. o split(x,f) now works even when f is a factor with unused levels (PR#294). o mosaicplot() has a formula interface and NULL instead of NA default args. o stars() has "NULL" instead of "NA" defaults. o str() is quite a bit nicer with factors. o ts.union, cbind.ts, arithmetic on ts objects now allow non-integer frequencies. o Switch to in HTML pages since Linux Netscape mangles Courier. o When documentation is "compiled" (build-help), you now get warnings for multiple (conflicting) \alias{.} or \name{.}s. o making the reference manual with `make dvi' copes better with isolatin1 characters (but not perfectly as these are not in standard TeX fonts). o Rd.sty now uses standard LaTeX constructs like \bm for bold math and \url for URLs. o Protect R_fopen against NULL filename in Unix. o Math text in outer margins didn't work. o Text clipping now works in the X11 device. o Pixel rows sometimes got doubled in rotated text on the X11 device. o par("yaxt") is now ok. o Problems with realloc on some systems in AllocBuffer. o Problem with formatReal on non-IEEE systems. o demos/dynload/Makefile used macros that gave incorrect build on some non-GNU makes. o Windows version copes better with paths with spaces in. o R CMD check had a typo which made the final message fail. o R_EOF redefined as -1, was causing trouble with isxxxx contructions. ************************************************** * * * 0.65 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 0.65.1 NEW FEATURES o .C, .Fortran. .Call and .External now have an argument PACKAGE to specify the shared library to be used for the symbol. See ?Foreign. Package writers are encouraged to use this. o On startup (unless --no-environ), first .Renviron is looked for in the current directory, and then in $HOME/ (= ~/ ). o New options(error.halt = FALSE) (default is TRUE) allows continuation after an error in batch processing. o In graphics, lty has now 6 instead of 4 predefined line types. o as.hclust.twins() in package mva to convert (and plot) objects from agnes() and daisy() of package cluster. o R INSTALL now can directly install pkg_version.tar.gz files as obtained from CRAN. New function update.packages() & friends for automatically downloading packages from CRAN and install them on the fly (on Unix and Windows). o New function commandArgs() to record the command-line used. o New arguments `local' and `now' to dyn.load. o diag(x) now keeps names when appropriate and barfs when x is an array. o functions source.url, url.show, read.table.url, scan.url to read from an http server instead of a file. o grid() gets useful defaults: grid lines drawn at tick marks. o set operations union(), intersect(), setdiff() and is.element(). o New function stars() for star plots and segment diagrams of multivariate data. o Version info now in the top-level file `VERSION'. o barplot has a "plot = TRUE" argument and now returns locations of all bars even when "beside = TRUE". o hist has an "nclass" argument purely for S compatibility. o Character strings can now, with most compilers, be passed on and from Fortran. See ?Foreign for details. o Functions as.single and single now have the effect with .C and .Fortran of passing a numeric argument as float/REAL rather than as double/DOUBLE PRECISION, by setting the attribute "Csingle". See ?Foreign for details. o Comparison of strings uses the current locale on systems where this is available, and so is always consistent with the ordering used by sort(). o sapply has a new argument USE.NAMES=TRUE and now returns a named result when its input was a character. o plot.stepfun has new arguments lty and lwd. o x labels in boxplot now handled differently, so that math expressions are allowed. o postscript() argument `onefile' now does something, and there is a new paper type `special' and new argument `pagecentre'. See ?postscript for details. o Experimental function dev2bitmap() to copy to a bitmap graphics format. BUG FIXES o centering in text() will be more accurate, particularly on devices with full font metric information (postscript, x11, not windows). o arguments after --no-readline in the Unix version were ignored. o couldn't set attributes in hashed environments. o [<-.data.frame mishandled dfr[1] <- 1 (forgotten drop=FALSE) o sys.on.exit didn't work o sys.parent didn't quite work either for n >= 2. o par("mfg") was wrong, par(mfg=) switched to down columns. Now par(mfrow/mfcol = c(nr, nc)) followed by par(mfg=c(i,j)) is the preferred style. o plot( ) failed after 2nd plot, PR#279 o Several patches for systems with long != int. o approx failed if inputs contained NAs. o weighted lm fits with 1 diml x failed if any weight was zero. o lm.influence failed when there were undetermined coefficients, PR#280. o problem with function()... inside saved functions because arg count increased to accommodate stored source. (Incorrect number of arguments to "lambda") o improvements to generation of HTML help files: should work better on viewers other than Netscape. o stl in package ts could conflict with package leaps: the Fortran symbols have been changed. o help page for factor is improved and corrected. o na.omit.ts and na.contiguous now preserve time-series attributes. o more automatic testing ("make check") using options(error.halt=FALSE) led to the elimination of dozens (!) of seg.fault possibilities. o family quasi handles zero observations with var=mu^2 more correctly. o dynamically-loaded libraries are searched last-loaded first, as documented (under Unix it used to be first-loaded first). o rowsum failed with a matrix and a single group (drop=FALSE needed). o deriv(y ~ (x)) now works as well as deriv(~ (x)). o qr over-estimated ranks in some degenerate cases. qr did not work correctly if n < p and the first n cols were rank-deficient. o str() wouldn't work quite right for named characters; doesn't quote symbols anymore. o Colour conversion (rgb, gray, hsv) truncated doubles and so gave machine-dependent results on the examples. It now rounds. o cat() now admits again that it can't handle lists instead of "random" segfaulting. o More accurate rounding (including rounding to even) on platforms without rint (e.g. Windows). o qgeom() is now left-continuous with a tolerance, and so the example on the help page will be platform-independent. o pretty() has been changed to use tolerance around integers and so will be more platform-independent. The exact output has probably changed on all platforms for some input. o image() & filled.contour() now work for 1x1 matrices and with constant z values. CHANGES IN R VERSION 0.65.0 NEW FEATURES o A first step in improving performance has been made. Attached objects, libraries etc are now hashed; performance gains will be particularly apparent if large packages are in use. o First version of package ts for time-series analysis. This has fairly complete S-PLUS compatibility, but more features are planned. See library(help=ts) for details. o warnings can be collected (options(warn=0), the default), printed immediately (options(warn=1)) or turned into errors (options(warn=2)). As a consequence, all warnings and errors now are printed followed by a newline, if one is not supplied. (This should improve the S compatibility of the use of PROBLEM ... in compiled code.) o All R environment variables are now of the form `R_xxx'. In particular, `RHOME', `RLIBS' and `RPROFILE' are now called `R_HOME', `R_LIBS', and `R_PROFILE'. o The handling of q()/quit()/EOF has been changed, with a new option "default". In interactive use this asks unless --save or --no-save has been specified: if these are specified they set the default. o Limited capability for tilde expansion of file names even without readline (on Unix, and on Windows). o New environment variables `R_HISTFILE' and `R_HISTSIZE' for the name and size of the history file. o Attempting to restore (at startup) too large a .RData is now a fatal error. o The loading of shared library on Unix now uses RTLD_NOW not RTLD_LAZY. This means that all symbols must be resolvable when the library is loaded, and R will not terminate later when a missing symbol is called. Code which had missing symbols (including some packages) will need to be re-compiled. o New generic function all.equal(); most useful for numerical comparisons `up to rounding errors'. o New function boxplot.formula() as a formula interface to boxplots. o New functions getwd() and setwd() for getting and setting the R working directory, basename() and dirname() for manipulating paths. o Function locator(, type=) is implemented to plot points or draw lines interactively. o Functions new.env() to create empty environment and local() to allow local evaluation of expressions, with various useful idiomatic uses. o Convenience functions parent.frame() and eval.parent(). o A new scheme for keeping source code with user-defined functions has been implemented. In particular, comments will no longer move about or disappear. The flip side of the coin is that you can no longer rely on R to indent your code for you. The stored-source facility can be turned off with options(keep.source=FALSE), and for an individual function by deleting the "source" attribute. If the source attribute is absent, the function will be deparsed for editing or printing, but any comments will be lost. o expressions have gained semantics that are closer to those of S. They don't get evaluated except when explicitly specified. Example: e <- expression(x); e[[1]] <- expression(123); eval(e) now gives expression(123), not 123. This fixes some problems with expressions in the list argument to do.call(). o contrast() no longer drops colnames for 1DF contrasts. Consequentially, the labels of regression coefficients for binary factors contain level names (again ...). o na.omit() and na.fail() are now generic. o plot.lm() has more options and now does 4 plots by default, should also be okay for "glm" object; all thanks to John Maindonald. o If the dimnames of a table are themselves named, then their names are used to label the respective dimensions in tabular output. o chisq.test() now optionally computes the p-value by Monte Carlo simulation (in the standard case of a 2-d contigency table). o source() has a new argument `chdir' for changing the working directory to that of the file being sourced when evaluating. o If data() loads an R source file, it now changes the working directory (to that containing the file) when evaluating. o Interpret strings NaN and Inf in character to numeric conversions (and thereby in read.table) o The presence of an object `.conflicts.OK' in a package suppresses conflict checking in library() for that package. o uniroot() can now be used recursively. o hdf5{read|write} now allow more kinds of attributes and add support for HDF5 version 1.2 (or newer) thanks to Marcus G. Daniels. Configure checks for HDF5 1.2 availability, older versions will no longer work. BUG FIXES o x ^ y gives proper results when x or y are infinite. o The semantics of <<- have been corrected. The search for a variable binding to modify now begins one level "up" from the current one. Thus S and R semantics in "non-closure" functions will be identical. o .Last() is called when terminating with q() (not just with EOF). o abline() now understands the "lwd" graphics parameter if it is supplied as an inline argument. o axis() now sorts `labels' when it sorts `at'. o Some small changes have made in the axis drawing code to ensure that tick-mark label alignment is correct for non-default values of the "las" parameter. o Improved error message from check.options(). o cm.colors(n) now doesn't append silly "v=1"; works for n=0, n=1. o cooks.distance() now also works for "glm" objects; deviance.lm() now ok for the case of weights. o date() doesn't return a final "\n" (again ...). o diag() and diag<- now handle correctly matrices with zero rows or cols. o help([<-.factor) (etc) work again. o is.recursive(list(.)) is now TRUE [PR#221]. o log(0) gives -Inf on all architectures. o When persp() was the first graphics command given to R it gave the error "plot.new() has not been called yet". This no longer happens. o pgamma() gave 0 or 1 for extreme arguments too soon. o plot(, log="x") doesn't give a silly warning any more. o The internals of postscript() have been changed so that line textures (dotted dashed etc) look better. The use of the PostScript "initclip" operator has been removed so that we can(?) really claim eps compliance. o revsort() misbehaved if n<=1, causing sample(1,1,,1) to segfault o seq(along = v) { and seq(v) when length(v) > 1 } now returns a result of mode "integer". o split.default() now uses subscripting for x with a non-null class, this preserves, e.g., the class of factors o substr/substring(), deparse(), dput(), dump(), print() will work for arbitrarily long strings. o which(x) failed when x had names and contained NAs. o Default editor files (e.g. from fix()) are now removed at termination. o Typos in NegBinomial.Rd (Negative Binomial distrib), thanks to Ch. Gu. o a clipping problem for plots when there non-zero outer margins has been fixed. This problem used to affect coplot() and pairs(). o get("zzz", mode="xxx") missed promise objects. o match.fun failed when a data frame was attached containing a "length" variable (e.g.) ************************************************** * * * 0.64 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 0.64.2 NEW FEATURES o new target for R installation testing : make strict-tests. o symnum(x) now nicely codes logical x. o convolve() has a new type = c("circular", "open", "filter") argument allowing more than the only circular convolution. o par(xpd) now has three settings: FALSE (clip to plot region), TRUE (clip to figure region), or NA (clip to device region). o zapsmall(x) works for complex x. o new global variable R.version.string (for plots & reports). Deprecated version & Version for new R.version & R.Version. o R CMD Rd2dvi has builtin "Usage" help and works for multiple files. Useful for automatic reference manual of a package. BUG FIXES o power() is now fully implemented and documented. o A couple of problems with group generic operations. o A bug which meant that it was not possible to add elements to zero length lists in the obvious way has been fixed. x <- list(); x[[1]] <- 10 x <- list(); x[["a"]] <- 11 both now work. o save.image() ignored dot-names. (esp. .First()) o lab= argument to plot() misinterpreted by axis() via ... passing o NULL labels in text() caused segfault o matrix(f,...) with f a factor now coerces to character o documentation errors for substitute and is.vector, minor fixups for trig and nlm o Background colours are set properly on X11 devices with colortype="pseudo": sometimes they were not allocated separately. o C() works (again?) for a single argument. o is.na() didn't work properly for "list" arguments. o symnum() sometimes failed with arrays of rank >= 3. o in some cases one could get nonblack color instead of black on 2nd x11() window. o influence.measures(.) $ is.influential was wrong on the cooks.distance. o printing of complex NaN/Inf was wrong as well. o printing of complex named vectors had a wrong initial space. o allow trailing space in character->numeric coercion o library() gave wrong "masked" warnings in some cases. o par(xpd) semantics were not compatible with S. o rect() output was not clipped in PostScript. o par(pin=c(width, height)) was behaving as par(pin=c(width, width)). o Non-blank separated data files didn't have their 1st field handled properly. o "aux" directory moved to "tools" to avoid difficulties on Windows. o structure() clobbered factors with missing levels. o pmatch() misbehaved on duplicate matches. o R CMD Rd2dvi works again. o logical binops tried to set time series parameters before dimensions. o upped the BUFSIZE in model.c (NOT proper long-term solution). o dput(), dump() and deparse() now always use DBL_DIG (=15) digits for numeric formatting. o chull() now works for vertical borders, such as in chull(c(1,1,2),3:1). CHANGES IN R VERSION 0.64.1 NEW FEATURES o barplot() and boxplot() are now generic o relevel function to reorder levels in factors. o contr.treatment now has a base= argument for selecting the baseline group. o New command line option `--no-environ' (under Unix) to prevent sourcing the `~/.Renviron' file. Implied by `--vanilla'. o Packages can now have a configure script. If a file `configure' is found it is executed before anything else is done by R INSTALL. o If HTML help files are asked for but not available, text help is used. o HTML help file conversion reports unsatisified \link{..}s. o `vsize' and `nsize' can be set by the environment variables R_VSIZE and R_NSIZE respectively, perhaps most conveniently from `~/.Renviron' under Unix or Windows. Command-line settings will take precedence. The defaults have been increased to 6M and 250k. o zip files can be used for storing help and example files. See the help files for "help" and "example" for details. o New submission method "none" (for not sending email) in bug.report(). o `R CMD check' can now also be used for installed packages without the corresponding sources. o The sources for the Windows port are included in src/gnuwin32. See src/gnuwin32/readme. BUG FIXES o deparser left off empty parentheses on e.g. (function(x) x)() o cat() now works on "name" objects o forgot to set jump buffer in return context in one case o parser dropped off tagged missing args on function calls ( f(a=) ) o relops tried to set time series parameters before dimensions o arithmetic tried to set time series parameters before dimensions o mvfft fixes (from Martyn Plummer) - not working with vectors and segfault problem. o Rephrased error message on invalid assignment target. o ifelse() now evaluates yes/no only if needed o PROTECT'ed some memory in NewExtractNames that was getting overwritten during garbage collection. o Crossing factors (`:') works again. o terms.formula used to choke on terms more than 60 characters long o is.nan() should now work correctly on new/old-style lists. o x[[i]] did not work correctly for negative subscripts i. o as.list() didn't work for expressions o x[[i]] <- quote(a) (x generic vector) didn't work o for method functions: many argument name changes, add ... where needed, for consistency with the generic function. o example() will allow (again) aliased topic names. o HTML help file conversions will find hyperlinks in the main library as well as the current library. Links containing `<' or `>' now work properly. o Rdconv conversion of \section{}{}s to Sd corrected. o ppois rounded non-integer `q', should truncate. o pnbinom was wrong for non-integer `q'. o dbinom, dgeom, dnbinom, dpois give 0 with a warning for non-integer arguments. o load / save / data allow unlimited string sizes. o strsplit() allows unlimited string size. o eigen() now should work (again) in all cases. o is.nan() fixed to work (again) in architectures with "unspecified" internal isnan(). CHANGES IN R VERSION 0.64.0 NEW FEATURES o Files BUGS and FAQ are now included with distribution and various "front matter" files have been cleaned up. o readline has now an argument prompt = "" o coplot() now labels levels when conditioning variable is factor (John Maindonald). o A new function filled.contour() has been added. It produces a variant of contour plots where the area between contours is filled with a solid colour. The function (currently) uses the layout() function and so is restricted to a full page display. o The function terrain.colors() has been modified to remove a visual discontinuity (at yellow). In addition, a function cm.colors() which implements a Cleveland-style cyan-magenta palette has been added. o Primitive function .External() to call dynamically loaded `internal'-style functions (code from Jean Meloche). o Function page() to view an R object in a pager. o Support for handling embedded '\n's in text strings handed to low-level graphics functions has been added. Some changes to the PostScript graphics driver were needed to support this, so there may some minor change in the appearance of plots produced in PostScript. o The LaTeX documentation is now split into 2 parts: the (currently almost non-existent) manual and a reference index. Manual: new section on loading C++ code. o [EXPERIMENTAL] Gnome support added. Use ./configure --with-gnome to try it, but don't expect too much yet. o HDF5 support improved. Still not perfect, though. o The X11 graphics driver can now use a variety of strategies for handing color. This means that it is now possible to use black and white or grayscale graphics on color displays. There are two strategies for handing color on pseudocolor displays. The original "allocate-colors-until-they-run-out" strategy has been supplemented by one which allocates a color cube at startup and approximates requested colors by those in the cube. On truecolor displays, there is no limit on the number of colors which can be displayed and you get exactly the color you request. (Note that Directcolor and staticcolor displays are not supported yet). o The persp() function now allows shading of the rendered surface using a simple lighting model. o Many functions providing an interface to the operating system have been made "platform independent". See the manual entries for "file", "list.files" and "file.show" for details of the new interface. The system.file() interface has been changed. o There is a new function "eval.with.vis" which behaves exactly like "eval", but which returns both the result of the evaluation an a logical value indicating whether the value is ``visible''. This has been used to replace some ad-hoc tests for whether value should be printed or not in "source". As a consequence, the "example" and "demo" functions no longer print invisible values when the example script is run. o Index files in data directories in packages should be `00Index' not `index.doc'. o Function interaction() to compute factor interactions. o load() can load to specific environments. o Sockets interface: make/read/write/close.socket() o Function chull() for planar convex hulls o pairs.formula() allows formula notations for scatter plot matrix. o new dataset co2. o documentation for datasets mtcars, plants, pressure, randu and sleep. o the sunspots dataset is now monthly rather than annual. BUG FIXES o strsplit(), scan() and friends use a much larger char buffer (still fixed size; this will change again) o ts() allows a data-frame argument `data'. o anova.lm handles singular models better, and deparses responses. o dump() now uses digits=12 rather than the current setting. o tabulate ignores entries beyond nbins rather than core dumps. o ?.C documents what C/Fortran types R objects correspond to in foreign function calls, which is not what everyone thought. o changed long to int in several .C calls to follow the above rules. o rbind(x1,x2) now does not lose dimnames when xi are character or complex. o readline() accidentally inherited menu()'s prompt. o .C() and .Fortran() now correctly report that there might be NaN/Infs, not just NAs, unless NAOK=TRUE. o Resizing an inactive graphics window to an invalid size left that window active and produced a spurious prompt and newline in the console window. This no longer happens. o poly() rescales x to increase accuracy o apply() preserves names in yet another case [-> new example]. o phyper() now works for larger arguments than before. o Missing values didn't work in log plot o outer() doesn't produce all-empty dimnames any more o quantile.default() works when `probs' has zero length o example() now works again in all cases [AnIndex spaces]. o typos fixed in nlm() message, glm help o pt() now works better for extreme `df' arguments and gives at least an approximate answer for ncp > 37.6. __more to change__ o fixed some glitches with formatC() and its docs. o several fixes in *.c code to make -Wall happy o curve() [and plot.function()] now use proper `x' values with log="x"; `type = "."' now works with curve() and plot.function() o zapped old windows files since they didn't build any more. The sources for the later gnuwin32 version are expected to appear here for 0.64.1. The #ifdef Win32's here are for that version. ************************************************** * * * 0.63 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 0.63.3 NEW FEATURES o get() and assign() allow position in search list to be a character string. (e.g. get("delete.response","package:base") o HTML search now works for all packages (after new installation). o R INSTALL now also copies DESCRIPTION file to target dir. o offsets should work with lm as well as with glm now o range() is now in the Summary group, trunc() back in the Math group. o Under Unix, R-specific environment variables can now be kept/set in `~/.Renviron'. o New options `latexcmd' and `dvipscmd' for specifying the locations of LaTeX and dvips; corresponding environment variables renamed to `R_LATEXCMD' and `R_DVIPSCMD'. o --vsize & --nsize now both give size in "single units" (bytes/cons cells) with possible suffixes "M" (Mega), "K"ilo (1024) and "k"ilo(1000). o [pdqr]negbin() now also work with non-integer 'size' [by Ben Bolker]. o New standard package `lqs' for resistant regression and covariance estimation, contributed by Brian Ripley. o new functions match.fun() and kronecker() [by Jonathan Rougier] o par(las = 3) is a new option. o new function jitter() [slightly more useful than S's]. BUG FIXES o system(command, intern=FALSE, ignore.errors=FALSE) changed 1st & 3rd argument names and is better documented. o "/Font5 /Symbol findfont definefont" confused some printers o Bounding box rotated 90 deg for landscape (shouldn't be) o Legend skipped symbol for pch=0 o compilation on non-Intel Linux systems no longer looks for __setfpucw o a %% b -- is now periodic instead of symmetric; more S compatible. o locator(n=512) -- default: MANY points, not just one. o qqnorm() uses ppoints() and returns list with x sorted along y. o plot.formula now allows ylab to be set o plotmath had trouble with paste()'ing expressions o plotting math expressions now also works for objects of mode "call" (in particular on the result of substitute()) o locator() on log axes: value antilogged twice o (a real oldie - and trival too) is.recursive now TRUE for expressions o sanitised delete.response o x[["a",]] could crash R o strwidth() crashed R if no device open o predict inconsistencies with offsets straightened out o tapply goofed when FUN returned named scalar o [.factor now retains contrasts attrib. o hist() had trouble with plotting math o HTML indices get only built when installing a package to RHOME o subscripting with a length zero logical no longer bombs. o as.ordered(NULL) now returns an "ordered" object. o --debugger .. now gives a warning if other command line args are used o pt(t, df, ncp) now also works for bigger ncp's o apply(a,d, fun) now passes vectors (rank 1 arrays) to fun. o model.frame() with subset and only one column fixed o boxplot() now works again. o dyn.load(..) failing gives more informative error message. o Ops.factor: not error, but a warning + NAs o bug.report() keeps report file if can't be e-mailed o Ops.data.frame : things like d.fr < a now return a matrix o data.frame(): duplicated row.names now give a warning when dropped. o boxplot(.., ylim=..) or (.., axes=..) gave erronous warning o glm had wrong init code for models with offsets. Also fixed so that linear predictor includes offset, also when predicting. o predict.glm didn't work with se=T o backsolve(), qr.solve... now return a vector when x (or y) is a vector. o string tags now converted to symbols and strange symbolic tags print as strings, cf. e<-quote(c(F=2, "tail area" = .5)), etc. o row.names(.) <- val doesn't allow duplicated values anymore. o library(mva)'s dist() now works with both "euclidean" & "euclidian" o revised curve function to avoid using grep patterns that caused problems under Solaris 2.6 o coplot() now has 'number' and 'overlap' arguments, and should work in more situations. [by John Maindonald and MM]. o save(..ascii=TRUE) now uses "full precision" for numerics. o as.array() preserves names() o outer() works for general array args and preserves (dim)names. o print.factor and print.ordered now return their args invisibly. CHANGES IN R VERSION 0.63.2 NEW FEATURES o sink() has new `append' argument. o new function rle(). o plot(.) and curve(.) also accept a function as first argument. new `plot.function'. o new function loglin(). o pretty() has new arguments and now better "obeys" its `n' arg. Internal GPretty() [implicitly used by axis(.., at = NULL,..) now uses pretty. o new generic function aggregate() with methods for data frames and time series. o data set `euro' with Euro conversion rates. BUG FIXES o model.frame(,subset=) no longer loses contrasts o `make install' copied the R shell script a second time without getting RHOME right (thus also breaking R CMD check). Fixed. o help() after help.start() did not work if topic was not equal to filename (e.g. rnorm is found in Normal.html) o fix the 0.63.1 fix for abbreviate(.); improved doc. o predict.mlm(.) couldn't have worked with `newdata'. o model.frame/na.omit bug for matrices and Surv objects. o mean( ) now doesn't return sum(.) anymore. o str(.) doesn't give extraneous "..." in rare cases anymore. o Added documentation for group methods ("Math", "Ops","Summary"). o R_PAPERSIZE is used for Rd2dvi and at configure time for the `make dvi' parts. o hist(i) now also works for e.g., i = -1, 0, or 1. o range() now works on dataframes (uses c(..., recursive=T)) o pretty(.) does not loop infinitely anymore in very extreme cases. o math functions should work better on dataframes now o plot(.., type = 'h', log = 'y') now works ... o plot.factor(x, y, ...) of two factors now makes barplot(table(y,x), ...) o use object$prior.weights in add1.glm, drop1.glm (Brian Ripley) o rnorm(1,mean=m,sd=0) returns m, not NaN (Ben Bolker) o runif(n, a,a) now returns rep(a,n) instead of NaNs. CHANGES IN R VERSION 0.63.1 NEW FEATURES o new function mosaicplot(). o xy.coords(.) has a "recycle = FALSE" argument, used in text(). o RNGtype() allows to choose different Random Number Generators. __EXPERIMENTAL__ o print.default(.) now also works with a `right = TRUE' argument. {{ print.matrix(.) is bound to become deprecated... }} o new help page `Memory' on the usage of command line options --vsize and --nsize. Error message if R runs out of memory points to help(Memory). o rowsum() and improved na.omit() added from survival4 o backsolve(.) has new arguments "upper.tri = TRUE, transpose = FALSE" o hist() has new "right = TRUE" argument; "right = FALSE" gives [a,b) intervals o help() has "htmlhelp" argument, allowing to suppress htmlhelp after help.start(). This is desired for ESS. o quantile(.) has an "names = TRUE" argument for speed. It is much better documented now. BUG FIXES o build-help --dosnames should now also work for text help, latex and examples. o seq() should work better now (fuzz-factor 1e-7 inserted) o multiple arguments to return caused value to be a pairlist o data.frame choked on long names from deparse() o data.edit now works (dataedit doesn't need pairlist()s anymore) o as.pairlist(NULL) is ok o ts(1:5, start=2, end=4) now work. Further plot(ts(..), ts(..)) o eigen() returns $vectors in any case [S compat]. o apply(cbind(1,1:9, 2, quantile) doesn't drop quantile names anymore o array(1, dim=(1:3)[c(F,F,F)]) is now valid == array(1,NULL) == c(1); the same for array(a,d, list()) o fix problem with step() and offsets o drop attributes on matrix subsetting o kappa(.) now works [dtrco now in load table (ROUTINES)]. o pmin() and pmax() now preserve attributes. o handle null models arising in drop1(), step, etc. o partial matching problem with $ indexing o matplot(.) works with lwd (vectors) o par("cex.axis") now has the desired effect... o which(.) now omits NAs in its argument. o rbind.data.frame caused character-to-factor coercion a bit too often o couple of messups in dotplot o z[[1]] <- ~x probl fixed as suggested by J.Lindsey o do_modelframe could lose contrast attributes o "make check" needed standardisation of locale o unlist(...,recursive=F) got names wrong o abbreviate(.) does not anymore return random garbage in some cases [by Guido M.] CHANGES IN R VERSION 0.63 NEW FEATURES o library(... , warn.conflicts = TRUE) now prints all conflicts arising from attaching the given package. o new .Platform variable for better modularizing platform dependence. __This_is_"beta"_and_bound_to_be_changed___ o new arguments to colnames(..) and rownames(x, do.NULL = TRUE, prefix = "row"). _ o par(bty = "]") for _| box(.) in plots. o New standard package `modreg' (smoothing and local MODern REGression methods) contributed by B.D. Ripley. o par() has a `no.readonly = FALSE' argument which allows more sensible op <- par(no.readonly = TRUE); on.exit(par(op)). o Real Bessel functions of 1st to 3rd kind, of arbitrary order: besselI(), besselK(), besselJ(), besselY() are the I(), K(), J(), and Y() Bessel functions. o New conflicts() function from B.D. Ripley o uniroot has a new `maxiter' argument and returns #{iter} and precision. o New option `show.coef.Pvalue' (default: TRUE). If FALSE, print.summary.[g]lm does not print P values. o New `R --vanilla' is equivalent to R --no-save --no-restore --no-site-file --no-init-file o gc() has now a `verbose' argument and returns a matrix with free and total n- and v-cells(heap). o New example() function runs the \emph{Examples} R code of . example() calls source() which now has a `verbose' instead of `debug' argument. o experimental functions [as.|is.|]pairlist() for the few old-style dotted pair lists [undocumented]. o options(check.bounds = TRUE) makes sub-assignments which "stretch" a vector give a warning [dropped undocumented check.bounds() function]. o Makefiles should now conform (mostly) with the GNU Coding Standards. In particular, `make install', `make uninstall' and `make install-strip' now work. Also, it is now possible to build R in a non-source directory. o which() preserves names and has a new `arr.ind' argument allowing for array indices. o New functions {d,p,q,r}signrank for the Wilcoxon signed rank distribution, and {d,p,q,r}wilcox for the Wilcoxon (rank sum) distribution. o Command line options GNUified a bit further. New command line option `--verbose' for printing more information about progress. Command line options `--vsize' and `--hsize' as replacements for `-v' and `-n' which are now deprecated. Added `--silent' as synonym for `--quiet'. Short-style option `-V' obsolete. o Added bug.report() to generate & send bug reports from within R. o The PostScript device driver now uses the ISO Latin1 font encoding. This should allow Western Europeans to render their languages correctly. It is likely that additional encodings will be added (e.g. Latin2) when we figure out how to set the correct font encoding in printers. o The mathematical annotation code has been reworked. Italic correction works better. Additional functionality will be added. o "sample" now has an optional "prob" argument which gives the probabilities of sampling each element in the vector being sampled. The present implementation is based on some code from E. S. Venkatraman . o The internal data structure used to represent lists has changed from being based on dotted pairs to generic vectors. Users should see no changes as a result (with the exception of some efficiency gains in list operations). o Subscripting matches that of S more closely. It is now possible to use subscripting beyond that the end of vectors and lists. o Element labelling in "c" and "unlist" should match that of of S. o Added split.screen etc functions for manipulating multiple screens on a single device o After help.start() the HTML help system is used for all help() requests. The name of the browser is now controlled by options("browser"). o Added kmeans to package mva (donated by B. Ripley) o New persp function added. It is NOT compatible with S (yet) and is subject to internal and interface changes. o gctorture() for torturing the garbage collector to reveal memory protection bugs. (Call GC on every memory allocation). o B. Ripley's aov code (and more) has been added. This includes: - aov() now handles models with Error terms, multiple responses. - proj(), model.tables(), se.contrast(), replications(), eff.aovlist() are implemented for aov fits, and where appropriate for lm fits. - dummy.coef(), with methods for lm and aovlist fits. - add1(), drop1(), step() for stepwise fitting of statistical models, with default, lm and glm methods. - summary() and deviance() -- mlm methods. - kappa() (for estimating condition numbers) - labels() to find a suitable set of labels from an object - C() for setting the contrasts of a factor - anova(), plot(), summary() and deviance() methods for mlm fits o eval() semantics changed when envir= is a list. A 3rd argument is now allowed, specifying the enclosure (i.e. where R looks for variables *not* found in envir=) it defaults to the calling environment (was .GlobalEnv). Note that when used inside a function, it is often desirable to set the enclosure to the parent environment instead. [ eval(e, data, sys.frame(sys.parent())) ] BUG FIXES o min(NULL); max(double()) now give warnings. range() gives NA. o substring("", NULL) no longer segfaults. o formatC(.) now takes default "width = 1" when both width and digits are unspecified. o several fixes in internal axis and tickmarks setup for "extreme" ranges and values, especially for "log" scaling. o seq(a,a, by=b) now works properly. o print.data.frame(.) now calls print.matrix instead of print(.) which finally enables the 'right = TRUE' argument. o R --help gives more o postscript() now uses 'hyphen' instead of 'plusminus' for a minus. o source(..., echo=TRUE) now puts a `"' if necessary after truncation. o Changes to the PostScript device driver mean that the volume of output has been reduced to about a third of what it was. o Fixes and restructuring to name generation in connection with unlist() and c(). o Many bugs found and fixed in the memory allocation / garbage collection area. In particular, the parser was sometimes UNPROTECT()ing the wrong pointers. o lm(y[g=="1"]~x[g=="1"]) caused memory corruption CHANGES IN R VERSION 0.62.4 BUG FIXES o plot.default(.) has now 'sub' argument which eliminates "Warning: parameter "sub" couldn't be set in high-level plot() function" o formatC(numeric(0)) now works. o menu(.) works for empty imput o 0i ^ 2 now gives 0+0i as it should. o ppoints() now behaves like S, and has additional argument 'a' o seq(1,6,by=3) and similar "by" calls now work okay o mahalanobis(.) now fixed; does *NOT* have default arguments for center and cov anymore. o diag(.) doesn't return non-sensical dimnames anymore. CHANGES IN R VERSION 0.62.3 NEW FEATURES o preserve factor levels and contrast settings in model objects o factor[...,drop=T] reduces level set o added dblepr, intpr o do_modelmatrix(model.c): Set rownames from data argument. o New generic function preplot(). o A new R BATCH interface for non-interactive execution. o Added `offline' argument to help() for producing hardcopy via latex and dvips. o glm.fit.null now calculates AIC and print.glm.null prints it o effects.lm implemented o new class "mlm" for multivariate "lm", predict.mlm to go with it o "Details" section added to .Rd format o R_PRINTCMD and R_PAPERSIZE can now be set via users' environment, overriding setting in startup script. o enhanced identify() o new function print.coefmat() o added unix() as .Deprecated("system") o date() replacing system.date() BUG FIXES o substitute would re-substitute after expanding ... o indexing modified object in some cases o sweep should work again on dataframes o minor changes in aov() o builds should now actually work on systems that do not add underscores to Fortran symbols o biplot[.default]() was redundant in "base" package; now only in "mva". o unix(..) now helps the user to find system(..) instead. o apropos("[") and methods("[") now both work (even though "[" is not a valid regular expression). o row.names<-.default now exists. Converts object to data frame and then adds row names o codes() now distinguishes between ordered and unordered factors o codes() had *opposite* semantics of Splus. Now it's the same. o replicating factors now yields factors (again) o print.summary.xxx functions more consistent, using new function print.coefmat(). o Changed many `T' to `TRUE' and `F' to `FALSE' in the base package. o binary operation on 1x1 matrix lost dimension o fix anova.glm for null model o glm.fit.null: ensure df.residual == df.null for a null model o summary.glm: correlations in saturated cases o stat.anova: use match.arg and labeled switch statement o Major cleanup of glm iteration code o Correct reordering of glm coefficients if pivoting o Rownames on contrast matrices o factor() and [.factor preserves class "ordered" o Code rearrangement in predict.lm (avoid unnecessary computation) + let rownames through on predictions o model.matrix.default: Initial code to define model frame simplified considerably after defaulting data argument to sys.frame(sys.parent()). This also removes the problem where data.frame mangles I(x^2) and similar names, so that the "reorder" sanity check at the end fails. o The handling of extra FORTRAN libraries (f2c-related and BLAS) should now be correct. Via SHLIBLDFLAGS, add-ons will also be linked against these libraries. o Modified makefiles so configure followed by "make distclean" should restore the source tree to its original form. o a leftover "colours <- colors" caused trouble when collating sequence changes caused files to go into the "base" file in a different order CHANGES IN R VERSION 0.62.2 (The new functions predict.glm, poly, aov, alias, biplot.default and biplot.princop, update.default and rug all come from Brian D. Ripley, who is also responsible for finding and/or fixing a lot of the bugs) NEW FEATURES o predict.glm() added. o text() is generic. o update.default() (replaces update.glm() and update.lm()). (This will only work if you comment out update.lm and update.glm in the sources, or disable them with update.lm<-function(object,...)NextMethod(), etc.) o predict.lm() changed towards S-plus compatibility. Intervals are still available via interval= argument. o zapsmall() function. o polygon() now handles NAs o options(show.signif.stars = TRUE). If FALSE, summary.lm and similar functions do *not* print significance stars anymore. o poly() for [g]lm modelling. o aov() for Analysis Of Variance [anova]. o alias() for displaying ``aliased'' factor levels in (>=2)way anova. o mva: Now has biplot and biplot.princomp o rug() plot. o new src/library/profile/Common.R for OS-independent intialization. o new date stamp mechanism (ensures that prerelease versions carry correct date) BUG FIXES o abbreviate() now always retains the first letter. o attr() partial matches for attribute name. o axis() accepts graphical parameters. o binomial() accepts factor responses. o cbind() works with data frames. o contrasts() gives simpler labels (like S) for factors with two levels. o contrasts<-() now has a how.many= argument. o contour() and image() can accept a list to specify the matrix. o contr.poly() uses orthogonal polynomials (like S) not raw polynomials. o data() could fail with a partial match to the dataset name. o density() works correctly if from= or to= are used. n= can now take any value, not just a large power of 2. o expand.grid() now accepts more than two arguments, or a list of factors. o factor() and ordered() handle their levels argument better. o family.glm() now returns the correct family (including link etc). o legend() now knows about lwd. o match.args() works correctly for default arguments. o model.frame.lm() did not invoke `lm'. o model.matrix() calls model.frame() if needed. o model.response() now returns names, so glm() gives names to residuals, fitted values, etc. o quasi() works in glm() (was missing aic component). o seq() sometimes omitted the final value due to rounding error. o terms.formula() and update.formula() now resolve `.' in formulae and tidy up `(a + b) - b' etc. o ... is now passed down correctly to functions inside functions. o save.image didn't work (Martyn Plummer) o abs() instead of fabs() in seq.c crashed R on Digital Unix o model.matrix() gagged on variables with complicated names o saturated models acting up in glm o various improvement of build procedures o rbind(NULL, matrix) core dump o density() default 'bw' now 0.9*(...) instead of 1.06*(...) [=Silverman's rule of thumb]. o detach(2) now works. o format() doesn't drop names anymore. o format.pval() works with NAs. o print.[summary.][g]lm() functions print numbers better formatted. o legend() now also works properly in log coordinates. o backsolve() now working; bakslv.c not depending on Fortran_underscores. o Tick marks acting up on log axes in postscript (fix from Martyn Plummer) o The Rd format has a new section \details{} (needed for proper Sd2Rd translation). \R was not understood for nroff conversions, longer dashes (-- and --- in latex syntax) are now converted properly. o prompt.default() now carries "\details{}". o R [ SHLIB | COMPILE ] were broken on some Solaris systems due to use of bash syntax. R [ INSTALL | COMPILE | SHLIB ] now use a MAKE environment variable if present. R INSTALL only rebuilds man pages if they are not already up to date. CHANGES IN R VERSION 0.62.1 BUG FIXES o Accidentally shipped R-0.62 without the tests and etc/Rdoc directories. CHANGES IN R VERSION 0.62 NEW FEATURES o Many more help(.) pages. o The top level Makefile now supports the usual ./configure; make; make install procedure (new make targets `all' and `install'). o The HTML help pages can now be searched for keywords. o Conversion of functions to and from lists. formals<- and body<-. The alist() function makes it easier to construct argument lists, etc. Added expression-->list coercion. o complex(.) now has optional 'argument' and 'modulus' arguments, allowing ``polar coordinate'' specifications. o layout() documented and improved: starts default device if needed, and returns number of figures. o New find() function [relying on apropos(..)]. o objects() now works, being equivalent to objects(pos=). o storage.mode() and related functions now return "double" instead of "real", for compatibility. "real" is still allowed as synomym for "double". o A `tests' directory has been added (in the source), and "make tests" has been modified to run more than all the examples from the base package. The exact `make tests' behavior is still bound to change. o An experimental directory `etc/Rdoc' has been added with a perl5 module to parse R documentation files. Sample perl programs to use this module are also included. o All internal mechanisms to support factors and data.frames have been removed. These are now entirely supported by interpreted code! `is.unordered' has been eliminated. Thanks to John Chambers for allowing the distribution of his StatLib code. o "pmatch" is now completely S compatible and is not just another name for "charmatch". o There is now a function called ".Alias" which can be used to provide multiple names for the same object. Example: lm2 <- .Alias(lm) This is dangerous because it can be used to defeat the call-by-value illusion. o Many functions changed from to .Internal(..). Currently, new .Internal(.)s in ..library/base/R/New-Internal.R Primitive functions are now printed as ``.Primitive(..)''. o [dpqr]hyper(.) now also work with some 0 arguments. o C-code: Many "-Wall" fixes (MM & DB). o mva's dist() now takes arguments diag and upper which control how the distance matrix is printed. plot.hclust() now takes a labels argument. o Attributes are now propagated correctly in binary operations. Changes from: Steve Oncley and Gordon Maclean National Center for Atmospheric Research Boulder, Colorado USA o configure now also checks for fort77. o Usage of R INSTALL now is R INSTALL [options] [-l lib] pkg_1 ... pkg_n The +/- options were replaced by GNU-style `--no-docs' and `--no-text', `--no-html', and `--no-latex'. o Usage of R REMOVE now is R REMOVE [options] [-l lib] pkg_1 ... pkg_n o Usage of R COMPILE now is R COMPILE [options] srcfiles, where through options one can set e.g. CFLAGS or FFLAGS. o Usage of R SHLIB now is R SHLIB [-o libname] files, where the file names can be that of source or object files. o A new R CMD interface allows invokation of executables in $RHOME/{etc,cmd} without installing them or setting paths. o Data files are now also documented using the Rd format, all data documentation in the base package has been converted accordingly. Rd files for data have a \keyword{datasets} as identifier. o new function mahalanobis() for Mahalanobis distance o quantile.default() now handles Inf's correctly. o New command line options `--enable-blas' and `--enable-readline' to configure. o pretty(x) is more reasonable when max(x)-min(x) < 1e-10 max(|x|), and has a new argument "shrink.sml" for that case. o formatC(.) supports a new "fg" format for flexible non-exponential formatting. o etc/build-htmlpkglist has been integrated into etc/build-help (option --htmllists) o family gaussian(.) and inverse.gaussian(.) both accept several link arguments [J.Lindsey]. o The graphics function "tck" now produces effects just like those in S (e.g. par(tck=1) now produces grid lines). Since using "tck" produces nasty results in some circumstances there is also an alternative parameter "tcl" which defines the tick length in terms of lines of text. The default setting is par(tcl=-0.5). o menu() now takes additional arguments `graphics' (currently unused) and `title'. o New function plot.formula(). plot.factor() now produces boxplots when given 2 arguments. o New function write.table(). o signif() now has a `digits' default of 6. o Old-style long command line options (`-save' etc) changed to GNU-style (`--save' etc). Debugging options (`-ddd', `-gdb', `-xxgdb') unified into the new `--debugger' (`-d'). New command line options `--version' (`-V') and `--help' (`-h') which print useful information and exit. o The loading of profiles at startup now works as follows. Unless the new `--no-site-file' was given, a site profile is sought (as specified via the environment variable `RPROFILE', or if this is unset defaulting to `${RHOME}/etc/Rprofile'. Then, unless the new `--no-init-file' was given, the user profiles (`.Rprofile' and `~/.Rprofile') are sought. o New functions subset() and transform() intended primarily to make life with dataframes easier. o debian directory has been added so Debian GNU/Linux packages can be created from raw source. o The graphics system has been through a major overhaul. It is now possible to have multiple active device drivers and to control them with full suite of dev.xxx() functions available in S. Display lists are now kept for interactive devices. When an on-screen graphics window is resized, the content of that window is redrawn at the new size. At present only X11 and PostScript graphics device drivers are available, but more are on the way. o On systems using IEEE arithmetic, the builtin Inf and NaN values are now recognised and used. NA and NaN should propagate correctly in computations, with NA dominating in computations involving both quantities. E.g. NA+NaN is NA. o Some of the t, F, and chisq distribution/probability functions now allow a noncentrality parameter `ncp'. o Functions ptukey() and qtukey() provide the distribution and quantile functions for the maximum of several studentized ranges. o system.file() [now documented] returns all files matched by wildcards. o data() now supports more file formats: .RData for binary files, .txt or .tab for data to be read by `read.table(file, header=TRUE)' and .csv for data to be read by `read.table(file, header=TRUE, sep=";")' o Rdconv: new tabular environment, new sections `\format' and `\source', new output format `-type Sd' for S documentation o .First.lib() now implemented; called by library() after loading a package. o print.summary.[g]lm() now give `significance stars' and a symbolic correlation matrix. o new is.R() function. o glm() now also returns an AIC value [from JL]. print..glm methods indicate the options()$contrasts in some cases. In summary.glm(..., correlation=..), the default has been changed to corr. = FALSE which is consistent with summary.lm(). predict() now works again for glm objects. o the `flag' argument in formatC(.) can now have more than one character. o nlm() returns the number of iterations used [from J.Lindsey]. o cut, diff, hist, mean, quantile, seq, trunc() are now all generic. cut() has an `include.lowest' argument as S. o save.image() as short-cut to save the current session in .RData. o new design of HTML help pages, including an index of all functions from all installed packages. o new editor function pico() o matrices and arrays can have zero extents BUG FIXES (many of which resulted from the added features...) o atanh(.) now works o summary(glm) and summary(lm) now use compatible names. o [pq]tukey(.) now working. o title() now handles main=, sub=, xlab=, ylab= with embedded newlines correctly. This is partly a change in title and partly a change in the underlying graphics code. o min(.), max(.), sum(.) now return integer for integer arguments. o which(.) now returns integer. o Rd files: leading whitespace of lines in user-defined sections was not correctly removed by Rdconv o sign(.) works again. o [.data.frame segfaulted if arg. wasn't a data frame o "R --no-readline" now again gives proper prompts. o demos/zero.R dyn.load(.) now should be working more easily. o mode(.) now returns "(" for a "parentheses 'call'". o Bug fix in mva dist.c for method binary (gave "invalid distance"). plot.hclust failed for data without row names. o R INSTALL should work (again) now when `pkg' is a relative file name. o .not.yet.implemented() now takes an arbitrary number of args. o Plotting of dendrograms is working again. o data.frame(.) now uses "1:n" as default row.names. o image(.) and contour(.) now also work called as, e.g., ``image(z)''. o the first argument of axis(.) is now called `side' as in S. o format(NULL) now works. o minor fix in symnum. o hist() now is more compatible to S, has a new `labels' argument, and should work ok for non-equidistant breaks. o plot(-1) now labels properly. o Many small code changes (eliminating extraneous variables, nested comm.) in C code in order to satisfy `gcc -Wall' [Doug Bates]. o model.extract() will now extract arbitrary model frame arguments. o list of currently loaded libraries (.Dyn.libs) not saved from session to session (really, this time) o rhyper works with vectorisation, degenerate cases. o printing of objects in lists now dispatches methods correctly CHANGES IN R VERSION 0.61.2 BUG FIXES o pretty(999) resulted in an infinite loop due to integer overflow. pretty(.) now sometimes returns different results than before. o pi:6 returned integer, instead of real. o [.data.frame caused segfault if called with non-dataframe argument o hist() now is more compatible to S, has a new `labels' argument, and should work ok for non-equidistant breaks. o lgamma(-1e7) segfaulted. gamma(.) and lgamma(.) now give proper results for negative integers. o formatC(pi,dig=20,wid=2) segfaulted. o quantile(..., pr = c(1,2,5)/1000) gave all names as "0%". o In 0.61.1, model.matrix was fixed to pay attention to the names of the names of its data arg, but the data arg was defaulting to an unnamed list, so model.matrix(~x) failed... o Indexing with [[]] and a zero-length vector segfaulted. o Coercion of factors as in S-plus o dyn.load statement in demos/dynload/zero.R fixed o Factors could get allocated without the OBJECT bit, which nearly drove Kurt mad trying to write plot.factor... o Fixed confidence limit problem in t.test CHANGES IN R VERSION 0.61.1 NEW FEATURES o None (by definition, x.y.z releases are bugfix releases now) BUG FIXES o Return statements of the form return(x,y) will now return a list with named components. o Parsing of nested "if" statments was broken. This is fixed now. (Reported by Paul Gilbert). o Wrong declaration of ConsoleBufCnt in src/main/scan.c caused crash in Irix (George White ) o if(nmatch = 0) bug in src/main/character.c fixed (Doug Bates) o R_alloc/S_alloc fixes. The former allocated 4 times more than needed, the latter zeroed half of what it got, sizeof() mistakes in both cases. o c(ordered factor) caused segfault (uninitalised pointer), now fixed. o behaviour of as.numeric() on factors changed recently; now documented. o model.matrix() now pays attention to the names on its dataframe argument. o Fixes to group methods. o autoload() caused infinite loop if function wasn't found in library on loading o The pager ate the rest of stdin in batch mode, now fixed. Also, stdout was not flushed before call to system(). "make tests" should work now. o Empty directories now created by configure (so that it doesn't matter that "CVS export" doesn't do it) o as.name() made idempotent (i.e. if is.name(x) then as.name(x)==x) o 3 problems with glm, 2 in glm.fit and a one in print.glm fixed [Jim Lindsey] o binomial (family) now works when 'n=0'. [J.Lindsey] o split() now also works in split(1:10,1:2) o strsplit() now also works for strsplit(c,NULL) o A LANG='..' environment variable no longer affects scan()ing of numbers. o seq(.) doesn't segfault anymore in gl(2,3):gl(1,6) o contour(.) now also works with integer arguments CHANGES IN R VERSION 0.61 We try to make development more flexible by creating a "CVS branch". This should make it easier to produce patches for obvious bugs in the releases, without having to wait for changes in other areas to stabilize. NEW FEATURES o New functions "all.vars" and "all.names" added. o There has been a small change in the include file structure. All include files now live in RHOME/src/include and are copied to RHOME/include when needed. o The "noquote" functions are now documented. o A new `language' demo, "is.things", is provided. o symnum(.) function o The files in R/library/base/data have had a .R suffix added. BUG_FIXES o A nasty bug which showed when attempt was made to create a zero length call has been fixed. o model.matrix(.) now allows a contrasts argument. o barplot(.) now also works for barplot(table(rpois(100,3))). o make clean ; make now should work; ./Makefile.in eliminated o format(.) is now generic; the default method has a `digits' argument. CHANGES IN R VERSION 0.60.1 NEW FEATURES o "split" is now a generic function, with a method for data frames. (contributed by Doug Bates). o S compatible functions "all.names" and "all.vars" added. BUG FIXES o A file was closed multiple times if an error message occurred after sourcing a file. In some versions of Linux this caused a core dump. o The inclusion was causing problems with some versions of readline because the file did not exist. This is now detected by configure. CHANGES IN R VERSION 0.60 R is about to become an official part of the GNU project. To quote RMS (Richard Stallman) ``I hereby dub R GNU software!'' NEW FEATURES o There has been a major change in directory structure masterminded by Kurt Hornik. library(.) now attaches ``package''s which are better integrated, see "?library". Packages may be available from outside the RHOME path via the .lib.loc variable. o The documentation format (of files in src/library//man/ ) has changed to a more easily parsable LaTeX like format. The doc files now all end in `.Rd'. etc/Rman2Rd can be used to translate old-style documentation to the new one. The translation to *roff, LaTeX and HTML is now done using etc/Rdconv, written in Perl by Fritz Leisch. The HTML online help produced has now links which work. The manual (in doc/manual/) now includes a section on the documentation format and on mathematical text in graphs. etc/ further contains `Sd2Rd' for (partial) translation of S `.d' documentation to Rd, and `Rd2txt' and `Rd2dvi' for easy previewing of single Rd files. o The use of "names" on one dimensional arrays will now produce sensible results. This means that for most purposes, one dimensional arrays can be treated like vectors. o We have a applied a patch from mward@wolf.hip.berkeley.edu which should substantially improve the speed of (vector) arithmetic. o The modeling formula handler has been expanded so that it accepts y ~ 0 + x as a "through the origin" specification. models with no parameters are now acceptable. o "cov", "cor" and "var" now produce a matrix result if either of their x or y arguments is a matrix. Dimnames are propagated in a sensible fashion. o New chisq.test(.) and prop.test() from Kurt Hornik. o New read.fwf(.) for reading fixed width format (KH). o New str(.) [alternative to summary(.) for programmers] (MM). o New example data sets "esoph", "infert" and "anscombe" (TL), "iris3" (KH) and "stackloss" (MM). o source(.) has several new arguments, notably ``echo = FALSE''. This is applied in the new function demo(.) which runs all the code in demos/ (but dynload). o strheight(.) is new, accompanying strwidth(.). Both now work for mathematical expressions (Paul Murrell). o The LaTeX version of the manual (-> doc/manual/) now has an index. o EVERY *.Rd file in src/library/base/man/ has now at least one \keyword o New package (`library(.)') "stepfun" for step functions, incl. empirical distributions. BUG FIXES o Regular expression matching is now done with system versions of the regexp library. This should fix compilation problems on some platforms. o "approx" and "approxfun", have had some minor adjustments. which fix the interpretation of the rule= argument. The code for piecewise constant case is now internal C code that than interpreted. This should boost performance in this case. o There has been a minor fixup of "model.frame" to ensure that subsets, weights, etc are handled properly. o Model fitting of the form lm(y~., data=df) glm(y~., data=df) will now work. The RHS of the model will consist of an additive model containing all (non-response) variables in the given data frame. o The following type of assignment to data frame subsets z <- data.frame(x=rnorm(10),y=rnorm(10),z=rnorm(10)) z[,1:2] <- matrix(1:20,nc=2) was producing incorrect results. The solution was to wrap an implicit "as.data.frame" around the RHS. o "[.data.frame" no longer has a default drop=TRUE argument. This means that subsetting a data frame with "[" will always yield a data frame. o There was a swap of coordinates internally in "mtext" which meant that labels were coming out in the wrong place. Fixed. o Syntax errors in parse(text="...") would cause R to terminate with a segmentation violation. This no longer happens, although the result is still not perfect (the parse() returns). This will be fixed by a future parse rewrite. o rainbow, topo.colors, etc., now also work with n in {1,2}; don't return duplicate neighbor colors anymore. o legend has new `text.width' argument and now also works with mathematical expressions as text. o hist() now works better, has a `plot = TRUE' argument, and returns something useful. o barplot() improved for `names', now returns vector of midpoints. o lm(), lm.fit, lm.wfit (was `lm.w.fit'): Made more compatible. Dealing with (close to) collinear situations is still not flexible enough. o internal postscript() improved (missing lines in boxplot(.)). o Improvement to many (even most ?) documentation (.Rd) files. o Numerous other fixes of minor things ... CHANGES IN R VERSION 0.50 WARNING!!! o A change in the way that "expressions" are implemented means that saved data images which contain expressions will probably not restore properly. NEW FEATURES o The installation of documentation has now been streamlined. Many manual entries have been revised. o "expressions" are now implemented as a basic type rather than as a class of object. This change was made as move toward compatibility with S and also to implement mathematical annotation in graphs. For some examples of the latter, see ?text and ?title. o "eigen" can now handle complex and non-symmetric matrices. o Libraries are now attached by loading their code into newly created environment frames on the search path rather than in with the general system code. This means that libraries can be unloaded as well as loaded. They can also have .First.lib and .Last.lib functions. The variable .Libraries has been replaced by .library() but should not be needed much anymore. o There is now an experimental function called "delay" which creates a promise to evaluate an expression. This provides direct access to the lazy evaluation mechanism used by R. o >>>> 'make tests' allows to test--run all the help() examples. o New functions matplot / matpoints / matlines. o cut has 2 new arguments. 'right = TRUE' gives intervals closed on the right, open to the left (as S); 'right = FALSE' allows to reverse this. The code for default label construction has been enhanced, and can be controlled by the new argument 'dig.lab'. o legend(.) has 2 new arguments 'cex' (obvious) and 'merge = FALSE'. -> ?legend. o deparse has a 2nd argument allowing for a kind of line width. o There is now print.density (method). o many help(.) pages have been updated with working examples, and several new ones have been created. o influence.measures() and lm.influence now allow to get at the usual regression diagnostics. BUG FIXES o The "is.object" function has been with drawn. o A bug which prevented the "pictex" graphics driver from working has been fixed. o Regression diagnostics obtained with "lm.influence" now work when there are weights. This means they should work for glms. o There was a problem in parsing files from statements which were separated from following statements by ";" (e.g. data(iris); iris). This is fixed. o Comments are handled better in functions. The rule is that they are shifted to just before their statements. Comments after the last statement of a function are lost. o It is now possible to perform complicated mutations of expressions. For example e <- quote(f(x=1,y=2)) names(e)[[2]] <- "a" will change the x= argument tag into a=. In the past this produced odd error messages. o The length function now tries to return a "sensible" value for all the built-in types. For example, symbols now have length 1. o "update" should now work in both "lm" and "glm" models. o The functions Re, Im, Mod, Arg and Conj will now accept real-valued arguments and return the obvious results. o Minor graphics cleanup. o A fix for convergence problems in glm from Thomas Lumley included. o A new version of qt() should not take infinitely long to get an answer in the large degrees if freedom case. The underlying code (Hill 1970, CACM) appears to be much faster and more accurate than Splus. o A final Newton step has been added to give a final "polish" to the quantiles produced by pnorm(). These should be close to full accuracy now. o A bug in qbeta found by Martin Maechler has been fixed. This should speed up quantile computation for the F and Beta distributions. Further improvements in qbeta(.) by MM. No infinite loops anymore. o rainbow(.) now allows "start > end" indexing the "color circle". topo.colors(n), terrain.colors(n), heat.colors(n) now also work for n=1,2. o ?"+" now works. o tapply has been fixed as indicated by T. Lumley.