Dear Emacs, please make this -*-Text-*- mode! ************************************************** * * * 2.8 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 2.8.0 SIGNIFICANT USER-VISIBLE CHANGES o var(), cov(), cor(), sd() etc now by default (when 'use' is not specified) return NA in many cases where they signalled an error before. NEW FEATURES o abbreviate() gains an optional argument 'strict' allowing cheap and fast strict abbrevation. o The "lm" methods of add1(), anova() and drop1() warn if they are mis-used on an essentially exact fit. o as.array() is now generic, gains a '...' argument. o New function as.hexmode() for converting integers in hex format. format.hexmode() and as.character.hexmode() gain an 'upper.case' argument. o bitmap() and dev2bitmap() gain support for anti-aliasing. The default type has been changed to 'png16m', which supports anti-aliasing. o Box.test() gains a 'fitdf' argument to adjust the degrees of freedom if applied to residuals. o browseURL() has a new argument 'encodeIfNeeded' to use URLencode() in cases where it seems likely that would be helpful. (Unfortunately, those are hard to guess.) o by() gains a 'simplify' argument, passed to tapply(). o capabilities() gains a new argument "tiff" to report if tiff() is operational. o chol2inv() now treats as a [1 x 1]-matrix. o cov() and cor() have the option 'use = "everything"' as default, and so does var() with its default 'na.rm = FALSE'. This returns NA instead of signalling an error for NA observations. Another new option is 'use = "na.or.complete"' which is the default for var(*, na.rm=FALSE). var(double(0), na.rm= L) now returns NA instead of signalling an error, for both L = TRUE or FALSE, as one consequence of these changes. o data.matrix() now tries harder to convert non-numeric columns, via as.numeric() or as(, "numeric"). o dev.interactive() is able to recognize the standard screen devices if getOption("device") is a function (as well as by name). o dev.new() gains a '...' argument which can be used to pass named arguments which will be used if appropriate to the device selected. o dimnames(x) <- value extends 'value' if it a list and too short, and 'x' is an array. This allows constructions such as dimnames(x)[[1]] <- 1:3 to work whether or not 'x' already has dimnames. o format(), formatC() and prettyNum() gain a new argument 'drop0trailing' which can be used to suppress trailing "0"s. o format() now works for environments; also print(env) and str(env) share the same code for environments. o It is now possible to create and open a text-mode gzfile() connection by explicitly using e.g. open="rt". o New help.request() function for compiling an e-mail to R-help according to "the rules". It is built on the new utility, create.post() on which also bug.report() is based now; both thanks to a contribution by Heather Turner. o help.search() now assumes that non-ASCII items are in latin1 if that makes sense (all known examples on CRAN are). o HoltWinters() and decompose() use a (statistically) more efficient computation for seasonal fits (they used to waste one period). o intToUtf8() and intToBits() now accept numeric vectors, truncating them to integers. o is.unsorted() gains an argument 'strictly'. It now works for classed objects with a >= or > method (as incorrectly documented earlier). o library() no longer warns about the masking objects that are identical(.,.) to those they mask. o lockBinding(), unlockBinding(), lockEnvironment() and makeActiveBinding() now all return invisibly (they always return NULL). o mood.test() now behaves better in the presence of ties. o na.action() now works on fits of classes "lm", "glm", .... o optim(.., method="SANN", .., trace=TRUE) is now customizable via the 'REPORT' control argument, thanks to code proposals by Thomas Petzoldt. o The 'factory-fresh' defaults for options("device") have been changed to refer to the devices as functions in the grDevices namespace and not as names. This makes it more likely that the incorrect (since R 2.5.0) assumption in packages that get(getOption("device"))() will work will catch users of those packages. o pch=16 now has no border (for consistency with 15, 17, 18) and hence is now different from pch=19. o pdf() has new arguments 'useDingbats' (set this to FALSE for use with broken viewers) and 'colormodel'. It now only references the ZapfDingbats font if it is used (for small opaque circles). The default PDF version is now 1.4, since viewers that do not accept that are now rare. Different viewers were rendering consecutive text() calls on a pdf() device in different ways where translucency was involved. The PDF generated has been changed to force each call to be rendered separately (which is the way xpdf or ghostscript was rendering, but Acrobat was forming a transparency group), which is consistent with other graphics devices supporting semi-transparency. o plot.dendrogram() has new arguments (xlim, ylim) which allows zooming into a hiearchical clustering dendrogram. o plot.histogram() gains an 'ann' argument. (Wish from Ben Bolker.) o plot() now warns when it omits points with leverage one from a plot. o Plotmath now recognizes 'aleph' and 'nabla' (the Adobe Symbol 'gradient' glyph) as symbol names. o polyroot() no longer has a maximum degree. o The alpha/alphamax argument of the 'nls' and 'mle' profile() methods is used to compute confidence limits for univariate t-statistics rather than a confidence region for all the parameters (and not just those being profiled). o quantile.default() allows 'probs' to stray just beyond [0, 1], to allow for computed values. o New functions rawConnection() and rawConnectionValue() allow raw vectors to be treated as connections. o read.dcf() now consistently gives an error for malformed DCF. o read.fwf() no longer passes its default for 'as.is' to read.table(): this allows the latter's default to be used. o readBin(), writeBin(), readChar() and writeChar() now open a connection which was not already open in an appropriate binary mode rather than the default mode. readLines(), cat() and sink() now open a connection which was not already open in an appropriate text mode rather than the default mode. o readCitationFile() (and hence citation) now reads a package's CITATION file in the package's declared encoding (if there is one). o The behaviour of readLines() for incomplete final lines on binary-mode connections has been changed to be like blocking rather than non-blocking text-mode connections. o A new reorder.character() method has been added. This allows use of 'reorder(x, ...)' as a shorthand for 'reorder(factor(x), ...)' when 'x' is a character vector. o round() now computes in long doubles where possible so the results are more likely to be correct to representation error. o rug() now uses axis()'s new arguments from 2.7.2, hence no longer draws an axis line. o save() (optionally, but by default) checks for the existence of objects before opening the file/connections (wish of PR#12543). o segments(), arrows() and rect() allow zero-length coordinates. (Wish of PR#11192) o set.seed(kind=NULL) now takes 'kind' from a saved seed if the workspace has been restored or .Random.seed has been set in some other way. Previously it took the 'currently used' value, which was "default" unless random numbers had been used in the current session. Similarly for the values reported by RNGkind(). (Related to PR#12567.) set.seed() gains a 'normal.kind' argument. o setEPS() and setPS() gain '...' to allow other arguments to be passed to ps.options(), including overriding 'width' and 'height'. o setTimeLimit() function to set limits on the CPU and/or elapsed time for each top-level computation, and setSessionLimit() to set limits for the rest of the session. o splinefun() has a new method = "monoH.FC" for monotone Hermite spline interpolation. o sprintf() optionally supports the %a/%A notation of C99 (if the platform does, including under Windows). o str()'s default method gains a 'formatNum' function argument which is used for formatting numeric vectors. Note that this is very slightly not backward compatible, and that its default may change before release. o The summary() method for class "ecdf" now uses a print() method rather than printing directly. o summary.manova() uses a stabler computation of the test statistics, and gains a 'tol' argument to allow highly correlated responses to be explored (with probable loss of accuracy). Similar changes have been made to anova.mlm() and anova.mlmlist(). o Sweave() now writes concordance information inside a \Sconcordance LaTeX macro, which allows it to be inserted into PDF output. o system.time() now uses lazy evaluation rather than eval/substitute, which results in more natural scoping. (PR#11169) o In table(), 'exclude=NULL' now does something also for factor arguments. A new 'useNA' argument allows you to control whether to add NA levels unconditionally or only when present in data. A new convenience function addNA() gives similar functionality by adding NA levels to individual factors. o unlink() tries the literal pattern if it does not match with wildcards interpreted -- this helps with e.g. unlink("a[b") which previously needed to be unlink("a\\[b"). o update.packages() gains an argument 'oldPkgs', where new.packages() and old.packages() get 'instPkgs'. These allow to consider only subsets of packages instead of all installed ones. o which(b) is somewhat faster now, notably for named vectors, thanks to a suggestion by Henrik Bengtsson. o New generic function xtfrm() as an auxiliary helper for sort(), order() and rank(). This should return a numeric vector that sorts in the same way as its input. The default method supports any class with ==, > and is.na() methods but specific methods can be much faster. As a side-effect, rank() will now work better on classed objects, although possibly rather slowly. o X11() and capabilities("X11") now catch some X11 I/O errors that previously terminated R. These were rare and have only be seen with a misconfigured X11 setup on some versions of X11. o The handling of nuls in character strings has been changed -- they are no longer allowed, and attempting to create such a string now gives a truncation warning (unless options("warnEscapes") is false). o The user environment and profile files can now be specified via environment variables 'R_ENVIRON_USER' and 'R_PROFILE_USER', respectively. o ?pkg::topic and ?pkg:::topic now find help on 'topic' from package 'pkg' (and not help on :: or :::). o ??topic now does help.search("topic"); variations such as ??pkg::topic or field??topic are also supported. o There is support for using ICU (International Components for Unicode) for collation, enabled by configure option --with-ICU on a Unix-alike and by a setting in MkRules on Windows. Function icuSetCollate() allows the collation rules (including the locale) to be tuned. [Experimental] o If S4 method dispatch is on and S4 objects are found as attributes, show() rather than print() is used to print the S4 attributes. o Starting package tcltk without access to Tk (e.g. no available display) is now a warning rather than an error, as Tcl will still be usable. (On most platforms it was possible to inhibit Tk by not having DISPLAY set, but not on Windows nor Mac OS X builds with --with-aqua.) o Using $ on a non-subsettable object (such as a function) is now an error (rather than returning NULL). o Hexadecimal numerical constants (such as 0xab.cdp+12) may now contain a decimal point. o PCRE has been updated to version 7.8 (mainly bug fixes). o plot.ecdf() now defaults to pch=19 so as to better convey the left-closed line segments. NEW FEATURES IN PACKAGE 'methods' o S3 classes that are registered by a call to setOldClass() now have the S3 class as a special slot, and therefore so do any S4 classes that contain them. This mechanism is used to support S4 classes that extend S3 classes, to the extent possible. See ?Classes, ?setOldClass, and ?S3Class. The treatment of special pseudo-classes "matrix", "array", and "ts" as S4 classes has also been modified to be more consistent and, within limitations imposed by special treatment of these objects in the base code, to allow other classes to contain them. See class?ts. A general feature added to implement "ts" and also "data.frame" as S4 classes is that an S4 class definition can be supplied to setOldClass() when the S3 class has known attributes of known class. setOldClass() now saves all the S3 inheritance, allowing the calls to be built up in stages, rather than including all the S3 classes in each call. Also allows as(x,"S3") to generate valid S3 inheritance from the stored definition. See ?S3. o S4 methods may now be defined corresponding to "...", by creating a generic function that has "..." as its signature. A method will be selected and called if all the arguments matching "..." are from this class or a subclass. See ?dotsMethods. o New functions S3Part() and S3Class() provide access to the corresponding S3 object and class for S4 classes that extend either an S3 class or a basic R object type. o show() now also shows the class name. INSTALLATION o If sub-architectures are used, a copy of Rscript is installed in ${R_HOME}/bin/exec${R_ARCH} (since that in ${R_HOME}/bin and /usr/bin might be overwritten in a subsequent installation). PACKAGE INSTALLATION o LazyLoad: yes is now the default, so packages wanting to avoid lazy loading must set 'LazyLoad: no' (or an equivalent value) in the DESCRIPTION file. o R CMD INSTALL will now fail if it finds a non-executable 'configure' script in the package -- this usually indicates a file system with insufficient permissions. If a non-executable 'cleanup' script is found and either --clean or --preclean is used, a warning is given. DEPRECATED & DEFUNCT o Use in packages of the graphics headers Rdevices.h and Rgraphics.h is defunct: they are no longer installed. o options("par.ask.default") is defunct in favour of "device.ask.default". o The 'device-independent' family "symbol" is defunct: use font=5 (base) or fontface=5 (grid) instead. o gammaCody() is defunct. o par("gamma") is defunct. o 'methods' package functions getAccess(), getAllMethods(), getClassName(), getClassPackage(), getExtends(), getProperties(), getPrototype(), getSubclasses, getVirtual(), mlistMetaName(), removeMethodsObject() and seemsS4Object() are defunct. o Use of a non-integer .Random.seed is now an error. (R itself has never generated such values, but user code has, and R >= 2.6.0 has given a warning.) o methods::allGenerics() is deprecated. o In package installation, SaveImage: yes is now ignored, and any use of the field will give a warning. o unserialize() no longer accepts character strings as input. o The C macro 'allocString' has been removed -- use 'mkChar' and variants. o Use of allocVector(CHARSXP ...) is deprecated and gives a warning. UTILITIES o The default for 'stylepath' in Sweave's (default) RweaveLatex driver is now FALSE rather than TRUE if SWEAVE_STYLEPATH_DEFAULT is unset : see ?RweaveLatex. To support this, tools::texi2dvi adds the R 'texmf' directory to the input search path. o R CMD Rd2dvi now previews PDF output (as was documented) if R_PDFVIEWER is set (as it will normally be on a Unix-alike but not on Windows, where the file association is used by default). o R CMD check checks for binary executable files (which should not appear in a source package), using a suitable 'file' if available, else by name. o R CMD check now also uses codetools' checks on the body of S4 methods. C-LEVEL FACILITIES o R_ReadConsole will now be called with a buffer size of 4096 bytes (rather than 1024): maintainers of alternative front-ends should check that they do not have a smaller limit. o Graphics structure NewDevDesc has been renamed to DevDesc. For now there is a compatibility define in GraphicsDevice.h, but it will be removed in R 2.9.0. o PROTECT and UNPROTECT macros now work even with R_NO_REMAP. BUG FIXES o @ now gives an error (and not just a warning) if it is being applied to a non-S4 object. o R CMD appends (not prepends) R's texmf path to TEXINPUTS. o Objects generated by new() from S4 classes should now all satisfy isS4(object). Previously, prototypes not of object type S4 would not be S4 objects. new() applied to basic, non-S4 classes still will (and should) return non-S4 objects. o Functions writing to connections such as writeLines(), writeBin(), writeChar(), save(), dput() and dump() now check more carefully that the connections are opened for writing, including connections that they open themselves. Similarly functions which read such as readLines(), scan(), dcf() and parse() check connections for being open for reading. o Equality comparison of factors with levels now works correctly again. o Repainting of open X11 View() windows is now done whilst an X11 dataentry window is in use. o Indexing of data frames with NA column names and a numeric or logical column index works again even if columns with NA names are selected. o on.exit() has been fixed to use lexical scope in determining where to evaluate the exit action when the on.exit expression appears in a function argument. o rank() now consistently returns a double result for ties.method = "average" and an integer result otherwise. Previously the storage mode depended on 'na.last' and if any NAs were present. o The "lm" methods of add1(), and drop1() now also work on a model fit with na.action = na.exclude. o median(c(x = NA_real_)) no longer has spurious names(). o isoreg(x, y) now returns the correct result also when x has ties, in all cases. o What na.action() does is now correctly documented. o source() with echo=TRUE now behaves like ordinary automatic printing, by using methods::show() for S4 objects. o Several bugs fixed in `?` with topics: it previously died trying to construct some error messages; for S4 methods, class "ANY" should be used for omitted arguments and default methods. o trace() should create missing traceable classes in the global environment, not in baseenv() where other classes will not be found. o Class inheritance using explicit coerce= methods via setIs() failed to coerce the argument in method dispatch. With this fixed, a mechanism was needed to prohibit such inheritance when it would break the generic function (e.g., initialize). See ?setIs and ?setGeneric. o RSiteSearch() encodes its query (it seems this is occasionally needed on some platforms, but encoding other fields is harmful). o 'incomparables' in match() was looking up indices in the wrong table. o write.dcf() did not escape "." according to Debian policy (PR#12816). o col2rgb() sometimes opened a graphics device unnecessarily, and col2rgb(NA) did not return a transparent color, as documented. o pdf(family="Japan") [and other CIDfonts] no longer seg.faults when writing "western" text strings. o as.list() applied to an environment now forces promises and returns values. o Promises capturing calls to sys.parent() and friends did not work properly when evaluated via method dispatch for internal S3 generics. o The default pkgType option for non-CRAN builds of R on Mac OS X is now correctly "source" as documented. o The default R_LIBS_USER path in AQUA builds now matches the Mac-specifc path used by the Mac GUI: ~/Library/R/x.y/library o splinefun() with natural splines incorrectly evaluated derivatives to the left of the first knot. (PR#13132, fix thanks to Berwin Turlach) o anova(glm(..., y=FALSE)) now works. (PR#13098) o cut.Date(x, "weeks") could fail if x has only one unique value which fell on a week boundary. (PR#13159) ************************************************** * * * 2.7 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 2.7.2 patched BUG FIXES o within(, { ... }) now also works when '...' removes more than one column. o Attempting to open an X11() device on a non-existent display when one is already open on another display now gives a warning rather than terminating R via a fatal X11 error. (PR#12628) o source() did not respect the setting of options("keep.source") when setting source references. o seek() now clears the pushback on a text-mode connection if used to set a new position. (PR#12640) o quartz() would segfault if asked to create a file for bitmap output which could not be created. This applied also to the type="quartz" versions of bmp(), jpeg(), png() and tiff(). o dnbinom(0, size, mu = ) suffered from cancellation in 2.7.2 only. CHANGES IN R VERSION 2.7.2 NEW FEATURES o sprintf() returns elements of the result in UTF-8 when the format or any character input has a corresponding element declared as UTF-8. Similarly for paste(), elements of the result are in UTF-8 when any input to that element is declared as UTF-8. o axis() has new arguments 'col.ticks' and 'lwd.ticks' to allow the colour and line width of ticks to be set separately from that of the line (e.g. to set one or the other to transparent or zero width). o legend() has a new argument 'box.col' to set the colour of the enclosing box. o legend() gains a 'xpd' argument to make it easier to place a legend in the margins or outer margins. o stripchart() now passes '...' to title() (as well as to plot.default() and axis()). (Wish of PR#12202) o help.search() has new argument 'searchEngine' to go directly to the search form: this is needed by users of Firefox 3 to workaround a bug in interpreting the search results pages. BUG FIXES o Plotmath computed the glyph metrics for the wrong character (and perhaps for a non-existent one) if this was a single-byte character with the top bit set. An example was symbol("\300"). o sink() and cat() could divert output to a non-writable connection. o phyper(x, 0,0,0) no longer hangs for huge x and gives 1 for x >= 0. (PR#11813) o plnorm(x, ..., log.p=TRUE) is now correct for x <= 0. (PR#11867) o [, ch] gives an error (again!) when ch is a string not exactly matching the column names, thanks to an oral bug report by Matthew Dowle. o data.frame(x=1:2, y=3:4, row.names=c("a","NA"))[c(2,NA),] has correct row names c("NA,"NA.1") again. o The GUI data editor for dataframes did not handle escape characters in entries properly. (PR#11897) o PCRE has been updated to 7.7 (bugfix release). o package.skeleton() wrongly warned about invalid code_files names when these were not in the current directory. o shapiro.test(c(0,0,1)) now has P value >= 0 (instead of barely negative). o assign() now warns if given a character vector of length > 1, rather than silently taking the first element. o rcond() now gives 0 instead of an error. o There was a memory leak in C function ucstoutf8 used by some graphics devices. o Plots of profile.mle() objects (package 'stats4') were misbehaving when the 'which' argument had been used in their calculation. o dnbinom(x, size, mu=*, ..) is now more accurate for very large 'size'. The same applies to pnbinom() and rnbinom(). o axis() was ignoring par() mgp[3] if mgp was set in-line. o Closing an X11 View() or dataentry window via its frame's close control now works better on some window managers. o Calling lapply() was not handling method dispatch correctly for is.numeric(), is.matrix(), is.array(), log() and the Math2 group. This affected data.matrix() which incorrectly regarded "Date" and "POSIXct" objects as numeric, and has been adjusted to do so as exceptions. o package.skeleton() was not looking for non-function objects in its 'environment' argument. o nls() was only finding its 'weights' argument in the case when all the variables in the formula were of the same length and hence that model.frame() could be used. It was silently ignoring 'subset' and 'na.action' except in that case. Now they are ignored only if 'data' is a list and variables taken from 'data' are not all of the same length, in which case a warning is given. o The 'mle' confint() method now takes 'level' into account when setting 'alpha' for the profile. o within() was not handling correctly expressions that produced NULL columns. (PR#11131) o dev.print() and dev.copy2{eps,pdf}() now ensure that the current device is restored as the active device even if an error occurs. (PR#9801) o as.Date() could fail to convert character strings representing days on which midnight did not exist in the current timezone (as happened in parts of Africa on 1960-01-01). o The automatic placement of legend() with 'title' and a reversed 'x' axis was incorrect. (PR#12019) o The use of multiple packages in 'LinkingTo' works again, and now works when the dependent packages are in the library to be installed to (but not in the library path seen by R --vanilla). o bxp() (and hence boxplot) now respects in-line graphical parameters 'xaxp'/'yaxp' as appropriate. (PR#11463) o barplot(log = "y") failed if there were NAs in the 'height' argument. (PR#11585) o pbeta() is more accurate in some cases with extreme values of 'ncp'. (PR#11277). o edit.data.frame() no longer fails if called on a 0-column data frame and no column is created. o pchisq(x, df=0) was always one even for x < 0; similarly for pgamma(x, alpha=0). o add1() and drop1() now return a P-value of NaN in cases with df=0 for test="Chisq" (they gave NaN until pchisq was altered in R 2.6.2). o The default methods of drop1() and add1() now re-evaluate in the object's formula environment, rather than simply in the parent (informal bug report by Werner Stahel). o The undocumented limit of 8191 bytes on comments (from # to the end of the line) in R code has been removed. o qgamma() warns if used with shape < 1e-10, when it may be unreliable. (PR#12324) o Installing a source package was not using the package's declared encoding (if any) as a default encoding for the help.search() database in Meta/hsearch.rds. This could cause packages with a default encoding to have some of their entries rejected by help.search() in a multi-byte locale (such as a UTF-8 locale). o duplicated() and unique() now handle 'incomparables' better, and avoid occasional segfaults (PR#12551). o plot(isoreg(x, y)) now plots the points correctly when 'x' is unssorted. o data.frame(row.names=NULL) once again behaves differently from the default (as documented). CHANGES IN R VERSION 2.7.1 NEW FEATURES o tools::texi2dvi() has a new argument 'texinputs' to allow the TeX and bibtex input paths to be specified (even on MiKTeX). o dev.copy2pdf() gains an 'out.type' argument to allow it to be used with cairo_pdf() or quartz(type = "pdf"). o poly() has additional checks against user error (as in PR#11243). o The Mac OS quartz() device draws contiguous lines much faster. o A field containing just a sign is no longer regarded as numeric (it was on all platforms in 2.7.0, but not on most in earlier versions of R). Similarly, '.' is now always non-numeric. o CITATION files are now read in Latin-1: quite a few were failing if used in a multibyte locale such as UTF-8. o The DESCRIPTION file of a package can specify an 'OS_type' field as either 'unix' or 'windows' to confine installation to that OS type. o HoltWinters() now uses optimize() rather than optim for one-parameter problems which should be more reliable (PR#11469). o axis() now respects the setting of par("xpd") when clipping. o The 'factor' method of format() now preserves names, dims and dimnames in the same way as for character and numeric inputs. (PR#11512) o read.DIF(*, transpose=TRUE) now allows to correctly read DIF files produced by some versions of Excel. DEPRECATED & DEFUNCT o The use of unserialize() on character strings is deprecated: that was a format used in R < 2.4.0. o The use of embedded nuls in character strings is deprecated: They will no longer be allowed in R 2.8.0. UTILITIES o R CMD check checks for possible check directories in the sources -- in mid-2008 there were about 20 examples on CRAN. o R CMD build tries harder to clean up the inst/doc directory from the remnants of earlier builds. It also removes any directories with extension .Rcheck, and files .DS_Store and ._* (created by tar on Mac OS X under some circumstances: it now sets environment variables to ask for such files not to be created by that tar.) BUG FIXES o Encoding<- on NA_character_ converted it to "NA". o Adobe Symbol was missing from the encodings in tools::charset_to_Unicode. o diag(matrix(x, 0, 0)) now returns a 0-length vector of the correct mode, instead of always numeric. o The parser sometimes accepted invalid quoted strings in a UTF-8 locale. o plot.default(x, y) now dispatches to Axis() methods whether y is NULL or not. o On Mac OS X, the Cocoa Quartz window could close without warning under certain circumstances (specific autorelease pool flush). o Plotting symbols with separate border and fill colours (e.g., plot(pch = 21)) now works with transparent 'col', but opaque or semi-transparent 'bg'. Previously, if 'col' was transparent then 'bg' was ignored and nothing was drawn. o file.path() did not work correctly in 2.7.0 if the components had different encodings. o merge() failed if there were no common columns and one of the inputs had zero rows. o expand.grid() failed if an input had length 0. o match() does again truncate strings at embedded nuls (as newly documented in 2.7.0). o Because of a typo, 'pointsize' in png(type="cairo") (and jpeg, bmp, tiff) devices was being interpreted in pixels not bigpoints. o is() was wrong for some S3 class objects with class of length greater than one. o undoc() / codoc() were not checking all S4 methods in some cases. o Use of textConnection(NULL, mode="w") could segfault. o Use of strwidth/height(units="user") (the default) is again an error before a user coordinate system has been set on the device, rather than giving nonsensical values (the effect of r31367). o Rare string width calculations in package grid were not interpreting the string encoding correctly. o hasMethods(f, env) {without specified 'package'} now works better. o A missing PROTECT could cause segfaults on string comparisons. (PR#11421) o str(structure(1, classID = "Pooh")) now works fine. o A missing PROTECT could cause segfaults in if() if coercion of the condition was required or a warning was to be given. o plot() now uses a sensible default main title. o validObject() called with complete=TRUE did not use inherited validity methods for slot classes. o Several bugs fixed in as(): the initial method lookup was not using the table with inherited methods (so inheritance had to be recomputed each time); coerce() should not be called directly--it can insert invalid inherited methods; the constructed as() methods were not retaining the function's environment. o influence.measures() now computes the same Cook's distance approximations as cooks.distance(). o plot(, which=5) uses more correct Cook's distance contours; (fix to fix to PR#9316). o pdf() and postscript() were not working correctly in 2.7.0 with UTF-8 encoded data in a non-UTF-8 MBCS (e.g. EUC-JP on Unix, CJK locales on Windows). o conformMethod(), called by setMethod(), now checks better about argument names in wrong order. Whereas it only warns currently, it is planned to become an error in the future. o The predict() method for prcomp() had an incorrect check for the number of columns of 'newdata' if the columns were not named. o The axis() function now distinguishes between setting "at" to NULL or a zero-length vector, treating the latter as a request for no ticks. This corrects the handling of the "x" parameter to rug(). o glob2rx("*[*") now produces a correct regular expression. o The canvas is no longer painted on copy or save in Cocoa Quartz. o identify() in Quartz can now be terminated by either using popup menu equivalent (Ctrl-click or second mouse button) or by pressing the key. The latter was documented but did not work. o tools:::.check_package_depends() {called from 'R CMD check'} now also works correctly when directory-name != package-name. o Source references were sometimes off by a line. o The quartz() parameter 'antialias' is no longer ignored. o The Quartz device is now trying hard to remove anti-aliasing effects for rasterized backends in plots that use adjacent, borderless rectangles such as image(). o The srcfilecopy() function now adds a timestamp to the object it creates. o parse() would lose a token when run on stdin(). o socketConnection() was using internally the class "socket" and not "sockconn", which caused a conflict with make.socket(). (PR#11515) o Quartz is now trying harder to find the proper font for a given family which resolves font issues on Mac OS X 10.4. Full font names and PostScript names can be used interchangeably. (Note, however that italic/oblique font faces of Helvetica are not included in the Mac OS X 10.4 system). o qf() no longer gives NaN when one of df1 and df2 is large and the other is infinite (including if both are infinite); it is more accurate e.g. for qf(1e-18, 2,4). o qbeta(-1e10, 50, 40, log.p=TRUE) no longer hangs. o Cocoa Quartz backend autodetection of display DPI was not correct for screens rotated by 90 or 270 degrees. o selectMethod("coerce", .) now uses a correct default for 'useInherited', and hence no longer may mess up the method cache. o show() now also works on "unregistered" S3 class objects. o formatC(*, format="fg", flag="#") is no longer dropping trailing zeros. o read.table(file = stdin()) with invalid input could leave the connection in an invalid state and hence cause a later segfault. (PR#11627) o read.DIF() did not obey the default 'stringsAsFactors = TRUE'. o The 'noquote' method for c() now works correctly with three or more arguments. o symbol() in plotmath expressions works again with non-ASCII input on devices that use UTF-8 for the symbol font. CHANGES IN R VERSION 2.7.0 SIGNIFICANT USER-VISIBLE CHANGES o The default graphics device in non-interactive use is now pdf() rather than postscript(). [PDF viewers are now more widely available than PostScript viewers.] The default width and height for pdf() and bitmap() have been changed to 7 (inches) to match the screen devices. o Most users of the X11() device will see a new device that has different fonts, anti-aliasing of lines and fonts and supports semi-transparent colours. o Considerable efforts have been made to make the default output from graphics devices as similar as possible (and in particular close to that from postscript/pdf). Many devices were misinterpreting 'pointsize' in some way, for example as being in device units (pixels) rather than in points. o Packages which include graphics devices need to be re-installed for this version of R, with recently updated versions. NEW FEATURES o The apse code used by agrep() has been updated to version 0.16, with various bug fixes. agrep() now supports multibyte character sets. o any() and all() avoid coercing zero-length arguments (which used a surprising amount of memory) since they cannot affect the answer. Coercion of other than integer arguments now gives a warning as this is often a mistake (e.g. writing all(pr) > 0 instead of all(pr > 0) ). o as.Date(), as.POSIXct() and as.POSIXlt() now convert numeric arguments (days or seconds since some epoch) provided the 'origin' argument is specified. o New function as.octmode() to create objects such as file permissions. o as.POSIXlt() is now generic, and it and as.POSIXct() gain a '...' argument. The character/factor methods now accept a 'format' argument (analogous to that for as.Date). o New function browseVignettes() lists available vignettes in an HTML browser with links to PDF, Rnw, and R files. o There are new capabilities "aqua" (for the AQUA GUI and quartz() device on Mac OS X) and "cairo" (for cairo-based graphics devices). o New function checkNEWS() in package 'tools' that detects common errors in NEWS file formatting. o deparse() gains a new argument 'nlines' to limit the number of lines of output, and this is used internally to make several functions more efficient. o deriv() now knows the derivatives of digamma(x), trigamma(x) and psigamma(x, deriv) (wrt to x). o dir.create() has a new argument 'mode', used on Unix-alikes (only) to set the permissions on the created directory. o Where an array is dropped to a length-one vector by drop() or [, drop = TRUE], the result now has names if exactly one of the dimensions was named. (This is compatible with S.) Previously there were no names. o The 'incomparables' argument to duplicated(), unique() and match() is now implemented, and passed to match() from merge(). o dyn.load() gains a 'DLLpath' argument to specify the path for dependent DLLs: currently only used on Windows. o The spreadsheet edit() methods (and used by fix()) for data frames and matrices now warn when classes are discarded. When editing a data frame, columns of unknown type (that is not numeric, logical, character or factor) are now converted to character (instead of numeric). o file.create() has a new argument 'showWarnings' (default TRUE) to show an informative warning when creation fails, and dir.create() warns under more error conditions. o New higher-order functions Find(), Negate() and Position(). o [dpqr]gamma(*, shape = 0) now work as limits of 'shape -> 0', corresponding to the point distribution with all mass at 0. o An informative warning (in addition to the error message) will be given when the basic, extended or perl mode of grep(), strsplit() and friends fails to compile the pattern. o More study is done of perl=TRUE patterns in grep() and friends when length(x) > 10: this should improve performance on long vectors. o grep(), strsplit() and friends with fixed=TRUE or perl=TRUE work in UTF-8 and preserve the UTF-8 encoding for UTF-8 inputs where supported. o help.search() now builds the database about 3x times faster. o iconv() now accepts "UTF8" on all platforms (many did, but not e.g. libiconv as used on Windows). o identity() convenience function to be used for programming. o In addition to warning when 'pkgs' is not found, install.packages() now reports if it finds a valid package with only a case mismatch in the name. o intToUtf8() now marks the Encoding of its output. o The function is() now works with S3 inheritance; that is, with objects having multiple strings in the class attribute. o Extensions to condition number computation for matrices, notably complex ones are provided, both in kappa() and the new rcond(). o list.files() gains a 'ignore.case' argument, to allow case-insensitive matching on some Windows/MacOS file systems. o ls.str() and lsf.str() have slightly changed arguments and defaults such that ls.str() {no arguments} works when debugging. o Under Unix, utils::make.packages.html() can now be used directly to set up linked HTML help pages, optionally without creating the package listing and search database (which can be much faster). o new.packages() now knows about the front-end package gnomeGUI (which does not install into a library). o optim(*, control = list(...)) now warns when '...' contains unexpected names, instead of silently ignoring them. o The options "browser" and "editor" may now be set to functions, just as "pager" already could. o packageDescription() makes use of installed metadata where available (for speed, e.g. in make.packages.html()). o pairwise.t.test() and pairwise.wilcox.test() now more explicitly allow paired tests. In the former case it is now flagged as an error if both 'paired' and 'pool.SD' are set TRUE (formerly, 'paired' was silently ignored), and one-sided tests are generated according to 'alternative' also if 'pool.SD' is TRUE. o paste() and file.path() are now completely internal, for speed. (This speeds up make.packages.html(packages=FALSE) severalfold, for example.) o paste() now sets the encoding on the result under some circumstances (see ?paste). o predict.loess() now works when loess() was fitted with transformed explanatory variables, e.g, loess(y ~ log(x) + log(z)). o print()'s new argument 'row.names' allows to suppress printing rownames. o print() and str() now also "work" for 'logLik' vectors longer than one. o Progress-bar functions txtProgressBar(), tkProgressBar() in package tcltk and winProgressBar() (Windows only). o readChar() gains an argument 'useBytes' to allow it to read a fixed number of bytes in an MBCS locale. o readNEWS() has been moved to the tools package. o round() and signif() now do internal argument matching if supplied with two arguments and at least one is named. o New function showNonASCII() in package tools to aid detection of non-ASCII characters in .R and .Rd files. o The [dpq]signrank() functions now typically use considerably less memory than previously, thanks to a patch from Ivo Ugrina. o spec.ar() now uses frequency(x) when calculating the frequencies of the estimated spectrum, so that for monthly series the frequencies are now per year (as for spec.pgram) rather than per month as before. o spline() gets an 'xout' argument, analogously to approx(). o sprintf() now does all the conversions needed in a first pass if length(fmt) == 1, and so can be many times faster if called with long vector arguments. o [g]sub(useBytes = FALSE) now sets the encoding on changed elements of the result when working on an element of known encoding. (This was previously done only for perl = TRUE.) o New function Sys.chmod(), a wrapper for 'chmod' on platforms which support it. (On Windows it handles only the read-only bit.) o New function Sys.umask(), a wrapper for 'umask' on platforms which support it. o New bindings ttk*() in package tcltk for the 'themed widgets' of Tk 8.5. The tcltk demos make use of these widgets where available. o write.table(d, row.names=FALSE) is faster when 'd' has millions of rows; in particular for a data frame with automatic row names. (Suggestion from Martin Morgan.) o The parser limit on string size has been removed. o If a NEWS file is present in the root of a source package, it is installed (analogously to LICENSE, LICENCE and COPYING). o Rd conversion to 'example' now quotes aliases which contain spaces. o The handling of DST on dates outside the range 1902-2037 has been improved. Dates after 2037 are assumed to have the same DST rules as currently predicted for the 2030's (rather than the 1970s), and dates prior to 1902 are assumed to have no DST and the same offset as in 1902 (if known, otherwise as in the 1970s). o On platforms where we can detect that mktime sets errno (e.g. Solaris and the code used on Windows but not Linux nor Mac OS X), 1969-12-31 23:59:59 GMT is converted from POSIXlt to POSIXct as -1 and not NA. o The definition of 'whitespace' used by the parser is slightly wider: it includes Unicode space characters on Windows and in UTF-8 locales on machines which use Unicode wide characters. o The src/extra/intl sources have been updated to those from gettext 0.17. o New flag --interactive on Unix-alikes forces the session to be interactive (as --ess does on Windows). o x[] <- NULL is always a no-op: previously type-checking was done on the replacement value and so this failed, whereas we now assume NULL can be promoted to any zero-length vector-like object. Other cases of a zero-length index are done more efficiently. o There is a new option in Rd markup of \donttest{} to mark example code that should be run by example() but not tested (e.g. because it might fail in some locales). o The error handler in the parser now reports line numbers for more syntax errors (MBCS and Unicode encoding errors, line length and context stack overflows, and mis-specified argument lists to functions). o The "MethodsList" objects originally used for method selection are being phased out. New utilities provide simpler alternatives (see ?findMethods), and direct use of the mangled names for the objects is now deprecated. o Creating new S4 class and method definitions in an environment that could not be identified (as package, namespace or global) previously generated an error. It now results in creating and using an artificial package name from the current date/time, with a warning. See ?getPackageName. o Unix-alikes now give a warning on startup if locale settings fail. (The Windows port has long done so.) o Parsing and scanning of numerical constants is now done by R's own C code. This ensures cross-platform consistency, and mitigates the effects of setting LC_NUMERIC (within base R it only applies to output -- packages may differ). The format accepted is more general than before and includes binary exponents in hexadecimal constants: see ?NumericConstants for details. o Dependence specifications for R or packages in the Depends field in a DESCRIPTION file can now make use of operators < > == and != (in addition to <= and >=): such packages will not be installable nor loadable in R < 2.7.0. There can be multiple mentions of R or a package in the Depends field in a DESCRIPTION file: only the first mention will be used in R < 2.7.0. GRAPHICS CHANGES o The default graphics devices in interactive and non-interactive sessions are now configurable via environment variables R_INTERACTIVE_DEVICE and R_DEFAULT_DEVICE respectively. o New function dev.new() to launch a new copy of the default graphics device (and taking care if it is "pdf" or "postscript" not to trample on the file of an already running copy). o dev.copy2eps() uses dev.displaylist() to detect screen devices, rather than list them in the function. o New function dev.copy2pdf(), the analogue of dev.copy2eps(). o dev.interactive() no longer treats a graphics device as interactive if it has a display list (but devices can still register themselves on the list of interactive devices). o The X11() and windows() graphics devices have a new argument 'title' to set the window title. o X11() now has the defaults for all of its arguments set by the new function X11.options(), inter alia replacing options "gamma", "colortype" and "X11fonts". o ps.options() now warns on unused option 'append'. xfig() no longer takes default arguments from ps.options(). (This was not documented prior to 2.6.1 patched.) pdf() now takes defaults from the new function pdf.options() rather that from ps.options() (and the latter was not documented prior to 2.6.1 patched). The defaults for all arguments other than 'file' in postscript() and pdf() can now be set by ps.options() or pdf.options() o New functions setEPS() and setPS() as wrappers to ps.options() to set appropriate defaults for figures for inclusion in other documents and for spooling to a printer respectively. o The meaning of numeric 'pch' has been extended where MBCSes are supported. Now negative integer values indicate Unicode points, integer values in 32-127 represent ASCII characters, and 128-255 are valid only in single-byte locales. (Previously what happened with negative pch values was undocumented: they were replaced by the current setting of par("pch").) o Graphics devices can say if they can rotate text well (e.g. postscript() and pdf() can) and if so the device's native text becomes the default for contour labels rather than using Hershey fonts. o The setting of the line spacing (par("cra")[2]) on the X11() and windows() devices is now comparable with postscript() etc, and roughly 20% smaller than before (it used to depend on the locale for X11). (So is the pictex() device, now 20% larger.) This affects the margin size in plots, and should result in better-looking plots. o There is a per-device setting for whether new frames need confirmation. This is controlled by either par("ask") or grid.prompt() and affects all subsequent plots on the device using base or grid graphics. o There is a new version of the X11() device based on cairo graphics which is selected by type "cairo" or "nbcairo", and is available on machines with cairo installed and preferably pango (which most machines with gtk+ >= 2.8 will have). This version supports translucent colours and normally does a better job of font selection so it has been possible to display (e.g.) English, Polish, Russian and Japanese text on a single X11() window. It is the default where available. There is a companion function, savePlot(), to save the current plot to a PNG file. On Unix-alikes, devices jpeg() and png() also accept type = "cairo", and with that option do not need a running X server. The meaning of capabilities("jpeg") and capabilities("png") has changed to reflect this. On MacOS X, there is a further type = "quartz". The default type is selected by the new option "bitmapType", and is "quartz" or "cairo" where available. Where cairo 1.2 or later is supported, there is a svg() device to write SVG files, and cairo_pdf() and cairo_ps() devices to write (possibly bitmap) PDF and postscript files via cairo. Some features require cairo >= 1.2, and some which are nominally supported under 1.2 seem to need 1.4 to work well. o There are new bmp() and tiff() devices. o New function devSize() to report the size of the current graphics device surface (in inches or device units). This gives the same information as par("din"), but independent of the graphics subsystem. o New base graphics function clip() to set the clipping region (in user coordinates). o New functions grconvertX() and grconvertY() to convert between coordinate systems in base graphics. o identify() recycles its 'labels' argument if necessary. o stripchart() is now a generic function, with default and formula methods defined. Additional graphics parameters may be included in the call. Formula handling is now similar to boxplot(). o strwidth() and strheight() gain 'font' and 'vfont' arguments and accept in-line pars such as 'family' in the same way as text() does. (Longstanding wish of PR#776) o example(ask=TRUE) now applies to grid graphics (e.g. from lattice) as well as to base graphics. o Option "device.ask.default" replaces "par.ask.default" now it applies also to grid.prompt(). o plot.formula() only prompts between plots for interactive devices (it used to prompt for all devices). o When plot.default() is called with y=NULL it now calls Axis() with the 'y' it constructs rather than use the default axis. DEPRECATED & DEFUNCT o In package installation, SaveImage: yes is defunct and lazyloading is attempted instead. o $ on an atomic vector or S4 object is now defunct. o Partial matching in [[ is now only performed if explicitly requested (by exact=FALSE or exact=NA). o Command-line completion has been moved from package 'rcompgen' to package 'utils': the former no longer exists as a separate package in the R distribution. o The S4 pseudo-classes "single" and double have been removed. (The S4 class for a REALSXP is "numeric": for back-compatibility as(x, "double") coerces to "numeric".) o gpar(gamma=) in the grid package is now defunct. o Several S4 class definition utilities, get*(), have been said to be deprecated since R 1.8.0; these are now formally deprecated. Ditto for removeMethodsObject(). o Use of the graphics headers Rgraphics.h and Rdevices.h is deprecated, and these will be unavailable in R 2.8.0. (They are hardly used except in graphics devices, for which there is an updated API in this version of R.) o options("par.ask.default") is deprecated in favour of "device.ask.default". o The 'device-independent' family "symbol" is deprecated as it was highly locale- and device-dependent (it only did something useful in single-byte locales on most devices) and font=5 (base) or fontface=5 (grid) did the job it was intended to do more reliably. o gammaCody() is now formally deprecated. o Two low-level functions using MethodsList metadata objects (mlistMetaName() and getAllMethods()) are deprecated. o Setting par(gamma=) is now deprecated, and the windows() device (the only known example) no longer allows it. o The C macro 'allocString' will be removed in 2.8.0 -- use 'mkChar', or 'allocVector' directly if really necessary. INSTALLATION o Tcl/Tk >= 8.3 (released in 2000) is now required to build package tcltk. o configure first tries TCL_INCLUDE_SPEC and TK_INCLUDE_SPEC when looking for Tcl/Tk headers. (The existing scheme did not work for the ActiveTcl package on Mac OS X.) o The Windows build only supports Windows 2000 or later (XP, Vista, Server 2003 and Server 2008). o New option --enable-R-static-lib installs libR.a which can be linked to a front-end via 'R CMD config --ldflags'. The tests/Embedding examples now work with a static R library. o Netscape (which was discontinued in Feb 2008) is no longer considered when selecting a browser. o xdg-open (the freedesktop.org interface to kfmclient/gnome-open/...) is considered as a possible browser, after real browsers such as firefox, mozilla and opera. o The search for tclConfig.sh and tkConfig.sh now only looks in directories with names containing $(LIBnn) in the hope of finding the version for the appropriate architecture (e.g. x86_64 or i386). o libtool has been updated to version 2.2. o Use of --with-system-zlib, --with-system-bzlib or --with-system-pcre now requires version >= 1.2.3, 1.0.5, 7.6 respectively, for security. UTILITIES o Rdconv now removes empty sections including alias and keyword entries, with a note. o Keyword entries are no longer mandatory in Rd files. o R CMD INSTALL now also installs tangled versions of all vignettes. o R CMD check now warns if spaces or non-ASCII characters are used in file paths, since these are not in general portable. o R CMD check (via massage-examples.pl) now checks all examples with a 7 inch square device region on A4 paper, for locale-independence and to be similar to viewing examples on an on-screen device. If a package declares an encoding in the DESCRIPTION file, the examples are assumed to be in that encoding when running the tests. (This avoids errors in running latin1 examples in a UTF-8 locale.) o R CMD check uses pdflatex (if available) to check the typeset version of the manual, producing PDF rather than DVI. (This is a better check since the package reference manuals on CRAN are in PDF.) o R CMD Rd2dvi gains a --encoding argument to be passed to R CMD Rdconv, to set the default encoding for conversions. If this is not supplied and the files are package sources and the DESCRIPTION file contains an Encoding field, that is used for the default encoding. o available.packages() (and hence install.packages() etc) now supports subdirectories in a repository, and tools::write_PACKAGES() can now produce PACKAGES files including subdirectories. o The default for 'stylepath' in Sweave's (default) RweaveLatex driver can be set by the environment variable SWEAVE_STYLEPATH_DEFAULT: see ?RweaveLatex. C-LEVEL FACILITIES o Both the Unix and Windows interfaces for embedding now make use of 'const char *' declarations where appropriate. o Rprintf() and REprintf() now use 'const char *' for their format argument -- this should reduce warnings when called from C++. o There is a new description of the interface for graphics devices in the 'R Internals' manual, and several new entry points. The API has been updated to version R_GE_version = 5, and graphics devices will need to be updated accordingly. o Graphics devices can now select to be sent text in UTF-8, even if the current locale is not UTF-8 (and so enable text entered in UTF-8 to be plotted). This is used by postscript(), pdf() and the windows() family of devices, as well as the new cairo-based devices. o More Lapack routines are available (and declared in R_Ext/Lapack.h), notably for (reciprocal) condition number estimation of complex matrices. o Experimental utility R_has_slot supplementing R_do_slot. o There is a new public interface to the encoding info stored on CHARSXPs, getCharCE and mkCharCE using the enumeration type cetype_t. o A new header 'R_ext/Visibility.h' contains some definitions for controlling the visibility of entry points, and how to control visibility is now documented in 'Writing R Extensions'. BUG FIXES o pt(x, df) is now even more accurate in some cases (e.g. 12 instead of 8 significant digits), when x^2 << df, thanks to a remark from Ian Smith, related to PR#9945. o co[rv](use = "complete.obs") now always gives an error if there are no complete cases: they used to give NA if method = "pearson" but an error for the other two methods. (Note that this is pretty arbitrary, but zero-length vectors always give an error so it is at least consistent.) Since sd(na.rm=TRUE) and var(na.rm=TRUE) both call cov(use = "complete.obs"), this applies also to them. cor(use="pair") used to give diagonal 1 even if the variable was completely missing for the rank methods but NA for the Pearson method: it now gives NA in all cases. cor(use="pair") for the rank methods gave a matrix result with dimensions > 0 even if one of the inputs had 0 columns. o Supplying edit.row.names = TRUE when editing a matrix without row names is now an error and not a segfault. (PR#10500) o The error handler in the parser reported unexpected & as && and | as ||. o ps.options(reset = TRUE) had not reset for a long time. o paste() and file.path() no longer allow NA_character_ for their 'sep' and 'collapse' arguments. o by() failed for 1-column matrices and dataframes. (PR#10506) However, to preserve the old behaviour, the default method when operating on a vector still passes subsets of the vector to FUN, and this is now documented. o Better behaviour of str.default() for non-default 'strict.width' (it was calling str() rather than str.default() internally); also, more useful handling of options("str"). o wilcox.test(exact=FALSE, conf.int=TRUE) could fail in some extreme two-sample problems. (Reported by Wolfgang Huber.) o par(pch=) would accept a multi-byte string but only use the first byte. This would lead to incorrect results in an MBCS locale if a non-ASCII character was supplied. o There are some checks for valid C-style formats in, e.g. png(filename=). (PR#10571) o vector() was misinterpreting some double 'length' values, e.g, NaN and NA_real_ were interpreted as zero. Also, invalid types of 'length' were interpreted as -1 and hence reported as negative. (length<- shared the code and hence the same misinterpretations.) o A basic class "S4" was added to correspond to the "S4" object type, so that objects with this type will print, etc. The class is VIRTUAL, since all actual S4 objects must have a real class. o Classes with no slots that contain only VIRTUAL classes are now VIRTUAL, as was intended but confused by having an empty S4 object as prototype. ## backed out temporarily ## o format.AsIs() discarded dimnames, causing dataframes with matrix variables to be printed without using the column names, unlike what happens in S-PLUS (Tim Hesterberg, PR#10730). o xspline() and grid::grid.xspline() work in device coordinates and now correct for anisotropy in the device coordinate system. o grid.locator() now indicates to the graphics device that it is is in 'graphics input' mode (as locator() and identify() always have). This means that devices can now indicate the 'graphics input' mode by e.g. a change of cursor. o Locales without encoding specification and non-UTF-8 locales now work properly on Mac OS X. Note that locales without encoding specification always use UTF-8 encoding in Mac OS X (except for specials "POSIX" and "C") - this is different from other operating systems. o iconv() now correctly handles to="" and from="" on Mac OS X. o In diag()'s argument list, drop the explicit default (' = n') for 'ncol' which is ugly when making diag() generic. o S4 classes with the same name from different packages were not recognized because of a bug in caching the new definition. o jpeg() and png() no longer maintain a display list, as they are not interactive devices. o Using attr(x, "names") <- value (instead of the correct names<-) with 'value' a pairlist (instead of the correct character vector) worked incorrectly. (PR#10807) o Using [<- to add a column to a data frame dropped other attributes whereas [[<- and $<- did not: now all preserve attributes. (PR#10873) o File access functions such as file.exists(), file.info(), dirname() and unlink() now treat an NA filename as a non-existent file and not the file "NA". o r(), the random number generators, are now more consistent in warning when NA's (specifically NaN's) are generated. o rnorm(n, mu = Inf) now returns rep(Inf, n) instead of NaN; similar changes are applied to rlnorm(), rexp(), etc. o [l]choose() now warns when rounding non-integer 'k' instead of doing so silently. (May help confused users such as PR#10766.) o gamma() was warning incorrectly for most negative values as being too near a negative integer. This also affected other functions making use of its C-level implementation. o dumpMethod() and dumpMethods() now work again. o package.skeleton() now also works for code_files with only metadata (e.g. S4 setClass) definitions; it handles S4 classes and methods, producing documentation and NAMESPACE exports if requested. o Some methods package utilities (implicitGeneric(), makeGeneric()) will be more robust in dealing with primitive functions (not a useful idea to call them with primitives, though) o Making a MethodsList from a function with no methods table will return an empty list, rather than cause an error (questionably a bug, but caused some obscure failures). o setAs() now catches 2 arguments in the method definition, if they do not match the arguments of coerce(). o S4 methods with missing arguments in the definition are handled correctly when non-signature arguments exist, and check for conflicting local names in the method definition. o qgamma() and qchisq() could be inaccurate for small p, e.g. qgamma(1.2e-10, shape = 19) was 2.52 rather than 2.73. o dbeta(.., ncp) is now more accurate for large ncp, and typically no longer underflows for give.log = TRUE. o coerce() is now a proper S4 object and so prints correctly. o @ now checks it is being applied to an S4 object, and if not gives a warning (which will become an error in 2.8.0). o dump() and friends now warn that all S4 objects (even those based on vectors) are not source()able, with a stronger wording. o read.dcf(all = TRUE) was leaking connections. o scan() with a non-default separator could skip nul bytes, including those entered as \0 with allowEscapes=TRUE. This was different from the default separator. o determinant(matrix(,0,0)) now returns a correct "det" result; also value 1 or 0 depending on 'logarithm', rather than numeric(0). o Name space 'grDevices' was not unloading its DLL when the name space was unloaded. o getNativeSymbolInfo() was unaware of non-registered Fortran names, because one of the C support routines ignored them. o load() again reads correctly character strings with embedded nuls. (This was broken in 2.6.x, but worked in earlier versions.) ************************************************** * * * 2.6 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 2.6.2 patched BUG FIXES o src/extra/pcre has been updated to PCRE 7.6 (bugfix release). o unlink(..., recursive=TRUE) no longer crashes on some platforms if a directory cannot be opened. o Loading in 2.6.2 a saved workspace could give an unimportant warning in a non-UTF-8 multibyte locale (in particular a CJK locale on Windows) which is now suppressed. o print() methods are more consistent in returning the original argument invisibly. o Using the X11 data editor (e.g. via edit(), fix() or View()) could crash if the 'End' key was used and all the columns would have fitted into the window. o Creating a new page on an X11() device (by plot.new() or grid.newpage()) did not flush out the XClearWindow call, so the X11 window might not be refreshed immediately. o libtool has been updated to version 1.5.26, which avoids many spurious configure warnings on Darwin/Mac OS X. o l10n_info() now recognizes how Darwin/Mac OS X reports Latin-1 locales (as charset ISO8859-1 rather than ISO-8859-1). o Checking examples which used grid (e.g. via lattice) without attaching grid no longer give errors from grid_plot_hook(). o kappa(m, exact=TRUE) no longer wrongly uses 'exact=FALSE' when m is an 'lm' or 'qr' object because the kappa.tri(x, exact=TRUE) now works correctly. o help(topic, offline=TRUE) misbehaved when there were multiple matches to 'topic'. (PR#10859) o The 'multilib' changes on Linux broke the use of sub-architectures without a main architecture. o source(echo=TRUE) would skip lines consisting entirely of the letter t. (PR#10923) o bzip2 has been updated to 1.0.5 (security fix). CHANGES IN R VERSION 2.6.2 NEW FEATURES o colnames(DF) is now also fast for large dataframes DF with automatic row.names. Note that the correct usage is names(DF). (PR#10470) o tools::texi2dvi() works around the failure of 'texi2dvi --quiet' to be quiet in texinfo 4.11. o On Linux, parallel 32/64-bit installations are supported using multilib. BUG FIXES o A compilation problem on one system where glob was not found has been corrected. (PR#10468) o The "profile.nls" method of plot() was losing the x axis labels. o array() computed the total number of entries in the array before coercing the dimensions to integer. (Reported by Allen McIntosh.) o persp() misreported errors in the y parameter. (Reported by Allen McIntosh.) o source("clipboard", echo=TRUE) and file("clipboard", open="rt") gave spurious errors. (Reported by Fernando Saldanha.) o attributes<-() stripped any existing attributes before checking that all elements of the right-hand side had names. o rbinom(n, size, *) gave NaN when 'size > .Machine$integer.max'. o print.summary.lm() is now consistent in the capitalization of "R-squared". o confint() misreported on some rank-deficient lm() models. (PR#10496) This could also occur in the default method. o \code{\var{}} was not rendered correctly to latex in Rd files for non-alphabetic arguments . o In 2.6.1, curve(*, add=TRUE) used a wrong default 'xlim' when x coordinates were logged. o The Java-based search in help.start() now only requires a JVM >= 1.4 (2.6.1 accidentally required >= 1.5). o The default method for range() was omitting 'na.rm' for non-numeric objects such as those of class "Date". (PR#10508) o cut(x, breaks=) misbehaved on a constant vector of negative values. o bxp(), the plotting engine of boxplot(), no longer plots staple ticks multiple times. (PR#10499) o The automatic detection of the domain for message translation was not working correctly for messages in message(), warning() and stop() in packages other than 'base'. o The profile.nls() function misbehaved when encountering non-convergence of the "port" algorithm. o Under certain rare circumstances in R 2.6.x, log(), round() and trunc() could alter their arguments in the caller. This involved passing of empty '...' arguments, and was spotted when using apply(x, 2, log). o par() no longer warns unnecessarily when asked to set new=FALSE on an unused graphics device. o plot.formula() was not passing on '...' when used with a one-sided formula. plot.formula() was not accepting expressions for annotations passed to title(). (PR#10525) o pchisq(x, df=0, ncp=L) now returns the correct limit exp(-L/2) for x=0 and is no longer returning NaN for x > 0, L < 80. (PR#10551) o Non-ASCII characters were only working correctly in Hershey fonts if these were specified by the 'vfont' argument to text() and not if specified as a font family. o There were several errors in Hershey$allowed, but the help page listed the allowed combinations correctly. o text() no longer attempts to use 'vfont' with an expression for 'labels' (it was documented not to work). o fisher.test(simulate.p.value = TRUE) gave incorrect answers in some extremely degenerate problems. (PR#10558) o src/extra/pcre has been updated to PCRE 7.5 (bugfix release). o capture.output() completes an incomplete final line of output when file = NULL. (PR#10534) o capture.output() now returns invisibly if output is written to a file/connection. o format.AsIs() did not remove the "AsIs" class and so could go into an infinite loop. o summary.mlm() lost the names of the coefficients when there was only one. o Rdconv was not marking examples files with an encoding if this was known from the package's DESCRIPTION file. o readChar() from a raw vector was reading a number of bytes, not characters. o slotNames() was erroneously treating classes that extend "character" as strings. o R no longer ignores SIGPIPE signals even in processes launched by system(). Instead PR#1959 is handled by a simple error handler which will give an error message in circumstances where none was given before. o The AIC() S4 generic in package stats4 no longer disables dispatch of S3 methods for AIC(). o The conflicts check in library() excluded all S4 generics, even where they were unrelated to the function masked. It is now more selective (although still too generous to S4 generics). o proc.time() was missing a protect and could misbehave if provoked by gctorture(). (PR#10600) o The cut() and hist() methods for dates and datetimes are now more accurate for intervals of "months" and "years", thanks to Marc Schwarz. o url()/download.file() could segfault if the HTTP interaction involved a redirect to an address starting with '/' on the same server. o Memory allocations used in format() and in an internal utility function could be off by one byte. (PR#10635) o isoreg(x, y) no longer segfaults when y has NAs. o split(x, g) always returns a list as documented. (It used to return NULL for a zero-length 'x'.) o tapply(x, g, ...) misbehaved if the args were of zero length. (PR#10644) o hist.POSIXt(*, xaxt = "n") no longer suppresses the y-axis. o strptime() crashed under certain locales on Mac OS X. o gregexpr() no longer segfaults when "" is given as the search pattern. Thanks to Herve Pages for the bug report. o matplot(x, *) with default 'pch' did not plot columns from column number 37 on (because the default pch was NA for those). (PR#10676) o print.htest() lost output when used within sink(file, split=TRUE). o Setting par(col.main=) also set par("col") to the same colour. o Anonymous fifos were broken (again). CHANGES IN R VERSION 2.6.1 NEW FEATURES o The "data.frame" and "factor" methods for [[ now support the 'exact' argument introduced in 2.6.0. o plot.lm() gains a new argument 'cex.caption' to allow the size of the captions to be controlled. o A series of changes make the CHARSXP cache introduced in 2.6.0 faster (and in some cases many times faster) in sessions with a large number (e.g. a million) of unique character strings, and also if there are many empty strings. o embedFonts(), bitmap() and dev2bitmap() explicitly turn off auto-rotation in Ghostscript when generating PDF. o The canonical architecture is no longer checked when loading packages using a non-empty sub-architecture, since it is possible to (e.g.) build packages for i386-pc-linux-gnu on both that architecture and on x86_64-unknown-linux-gnu. o Deparsing will (if option warnIncomplete is set) warn on strings longer than the parser limit (8192 bytes). o url() now uses the UserAgent header in http transactions in the same way as download.file() (making use of option "HTTPUserAgent"). BUG FIXES o iconv() is again able to translate character strings with embedded nuls (such as those in UCS-2). o new.packages() and update.packages() failed when called on an empty library, since old.packages() threw an error. old.packages() now returns NULL (as documented) in that case. o Builds on Mac OS X 10.4 or higher now allocate enough space in the binary headers to relocate dependent libraries into the framework. o R CMD build now computes the exclusion list on the copy it makes: this avoids problems if the original sources contain symbolic links (which are resolved in the copy). Thanks to Michael Lawrence for diagnosis and patch. o object.size() had slightly too low a size for objects of type "S4". o symbol() in plotmath expressions was only accepting valid character strings, which made it impossible to specify symbols such as aleph (obtained by symbol("\300")) in a UTF-8 locale. o An event handling issue caused autorepeat functions to misbehave with tcltk (notably scrollbars). o plot(sin, -5, 5) gives ylab 'sin(x)' again, where it resulted in 'x(x)' in 2.6.0. Further, plot(sin) again plots from [0,1] also in cases where a previously used coordinate system differs. o curve() with unspecified 'from', 'to' and 'xlim' now reuses the previous x limits, and not slightly larger ones. o It was intended that R code filenames in packages should start with an ASCII letter or digits (and R CMD INSTALL uses that), but the test used in R CMD build ([A-Za-z0-9]) was locale-specific (and excluded t to y in Estonian, for example). (PR#10351) o 'R CMD build' could misbehave when faced with files with CRLF line endings *and* no line ending on the final line of the file, removing the last byte of the file. o DF[i, j] failed in 2.6.0 if j was a logical vector selecting a single column. o Unix x11() would fail if a valid 'display' was specified but DISPLAY was unset. (PR#10379) o postscript() was not always ignoring .Postscript.Options in the workspace (where it should not have occurred). o help.search() would give an error if it found a badly installed package, even if 'package' was not specified. o tclServiceMode() (package tcltk) now works under Unix-alikes. (Although documented, it used only to work under Windows.) o As Mac OS X 10.5.x comes with incompatible /bin/sh shell, we force SHELL=/bin/bash (which is ok) in that case. [Only for 2.6.x: another solution is used in 2.7.0.] o Deliberately using malformed source attributes no longer causes deparsing/printing of functions to crash R. (PR#10437) o R CMD check and R CMD INSTALL now work with (some) directory names containing spaces. o choose(n, k) gave incorrect values for negative n and small k. o plot.ts(x,y) could use wrong default labels; fixed thanks to Antonio, Fabio di Narzo. o reshape() got column names out of sync with contents in some cases; found by Antonio, Fabio Di Narzo. o ar(x) for short 'x' (i.e. length <= 10) could fail because the default 'order.max' was >= length(x) which is non-sensical. o Keyboard events in getGraphicsEvent() could cause stack imbalance errors. (PR#10453) CHANGES IN R VERSION 2.6.0 SIGNIFICANT USER-VISIBLE CHANGES o integrate(), nlm(), nlminb(), optim(), optimize() and uniroot() now have '...' much earlier in their argument list. This reduces the chances of unintentional partial matching but means that the later arguments must be named in full. o The default type for nchar() is now "chars". This is almost always what was intended, and differs from the previous default only for non-ASCII strings in a MBCS locale. There is a new argument 'allowNA', and the default behaviour is now to throw an error on an invalid multibyte string if type="chars" or type="width". o Connections will be closed if there is no R object referring to them. A warning is issued if this is done, either at garbage collection or if all the connection slots are in use. NEW FEATURES o abs(), sign(), sqrt(), floor(), ceiling(), exp() and the gamma, trig and hyperbolic trig functions now only accept one argument even when dispatching to a Math group method (which may accept more than one argument for other group members). o abbreviate() gains a 'method' argument with a new option "both.sides" which can make shorter abbreviations. o aggregate.data.frame() no longer changes the group variables into factors, and leaves alone the levels of those which are factors. (Inter alia grants the wish of PR#9666.) o The default 'max.names' in all.names() and all.vars() is now -1 which means unlimited. This fixes PR#9873. o as.vector() and the default methods of as.character(), as.complex(), as.double(), as.expression(), as.integer(), as.logical() and as.raw() no longer duplicate in most cases where the object is unchanged. (Beware: some code has been written that invalidly assumes that they do duplicate, often when using .C/.Fortran(DUP=FALSE).) o as.complex(), as.double(), as.integer(), as.logical() and as.raw() are now primitive and internally generic for efficiency. They no longer dispatch on S3 methods for as.vector() (which was never documented). as.real() and as.numeric() remain as alternative names for as.double(). expm1(), log(), log1p(), log2(), log10(), gamma(), lgamma(), digamma() and trigamma() are now primitive. (Note that logb() is not.) The Math2 and Summary groups (round, signif, all, any, max, min, sum, prod, range) are now primitive. See under METHODS PACKAGE below for some consequences for S4 methods. o apropos() now sorts by name and not by position on the search path. o attr() gains an 'exact = TRUE' argument to disable partial matching. o bxp() now allows 'xlim' to be specified. (PR#9754) o C(f, SAS) now works in the same way as C(f, treatment), etc. o chol() is now generic. o dev2bitmap() has a new option to go via PDF and so allow semi-transparent colours to be used. o dev.interactive() regards devices with the displaylist enabled as interactive, and packages can register the names of their devices as interactive via deviceIsInteractive(). o download.packages() and available.packages() (and functions which use them) now support in 'repos' or 'contriburl' either file: plus a general path (including drives on a UNC path on Windows) or a file:/// URL in the same way as url(). o dQuote() and sQuote() are more flexible, with rendering controlled by the new option 'useFancyQuotes'. This includes the ability to have TeX-style rendering and directional quotes (the so-called 'smart quotes') on Windows. The default is to use directional quotes in UTF-8 locales (as before) and in the Rgui console on Windows (new). o duplicated() and unique() and their methods in base gain an additional argument 'fromLast'. o fifo() no longer has a default 'description' argument. fifo("") is now implemented, and works in the same way as file(""). o file.edit() and file.show() now tilde-expand file paths on all interfaces (they used to on some and not others). o The find() argument is now named 'numeric' and not 'numeric.': the latter was needed to avoid warnings about name clashes many years ago, but partial matching was used. o stats:::.getXlevels() confines attention to factors since some users expected R to treat unclass() as a numeric vector. o grep(), strsplit() and friends now warn if incompatible sets of options are used, instead of silently using the documented priority. o gsub()/sub() with perl = TRUE now preserves attributes from the argument x on the result. o is.finite() and is.infinite() are now S3 and S4 generic. o jpeg(), png(), bmp() (Windows), dev2bitmap() and bitmap() have a new argument 'units' to specify the units of 'width' and 'height'. o levels() is now generic (levels<- has been for a long time). o Loading serialized raw objects with load() is now considerably faster. o New primitive nzchar() as a faster alternative to nchar(x) > 0 (and avoids having to convert to wide chars in a MBCS locale and hence consider validity). o The way old.packages() and hence update.packages() handle packages with different versions in multiple package repositories has been changed. The first package encountered was selected, now the one with highest version number. o optim(method = "L-BFGS-B") now accepts zero-length parameters, like the other methods. Also, method = "SANN" no longer attempts to optimize in this case. o New options 'showWarnCalls' and 'showErrorCalls' to give a concise traceback on warnings and errors. showErrorCalls=TRUE is the default for non-interactive sessions. Option 'showNCalls' controls how abbreviated the call sequence is. o New options 'warnPartialMatchDollar', 'warnPartialMatchArgs' and 'warnPartialMatchAttr' to help detect the unintended use of partial matching in $, argument matching and attr() respectively. o A device named as a character string in options(device =) is now looked for in the grDevices name space if it is not visible from the global environment. o pmatch(x, y, duplicates.ok = TRUE) now uses hashing and so is much faster for large x and y when most matches are exact. o qr() is now generic. o It is now a warning to have an non-integer object for .Random.seed: this indicates a user had been playing with it, and it has always been documented that users should only save and restore it. o New higher-order functions Reduce(), Filter() and Map(). o [g]regexpr() gain an 'ignore.case' argument for consistency with grep(). (This does change the positional matching of arguments, but no instances of positional matching beyond the second were found.) o relist() utility, an S3 generic with several methods, providing an 'inverse' for unlist(); thanks to a code proposal from Andrew Clausen. o require() now returns invisibly. o The interface to reshape() has been revised, allowing some simplified forms that did not work before, and somewhat improved error handling. A new argument 'sep' has been introduced to replace simple usages of 'split' (the old features are retained). o rmultinom() uses a high-precision accumulator where available, and so is more likely to give the same result on different platforms (although it is still possible to get different results, and the result may differ from previous versions of R). o row() and col() now work on matrix-like objects such as data frames, not just matrices. o Rprof() allows smaller values of 'interval' on machines that support it: for example modern Linux systems support interval = 0.001. o sample() now requires its first argument 'x' to be numeric (in the sense of is.numeric()) as well as of length 1 and >= 1 before it is regarded as shorthand for 1:x. o sessionInfo() now provides details about package name spaces that are loaded but not attached. The output of sessionInfo has been improved to make it easier to read when it is inadvertently wrapped after being pasted into an email message. o setRepositories() has a new argument 'ind' to allow selections to be made programmatically. o sprintf() no longer has a output string length limit. o storage.mode<- is now primitive, and hence makes fewer copies of an object (none if the mode is unchanged). It is a little less general than mode<-, which remains available. (See also the entry under DEFUNCT below.) o sweep() gains an argument 'check.margin = TRUE' which warns about mismatched dimensions. o The mathematical annotation facility (plotmath) now recognises a symbol() function which forces the font to be a symbol font. This allows access to all characters in the Adobe Symbol encoding within plotmath expressions. o For OSes that cannot unset environment variables, Sys.unsetenv() sets the value to "", with a warning. o New function Sys.which(), an interface to 'which' on Unix-alikes and an emulation on Windows. o On Unix-alikes, system(, intern = TRUE) reports on very long lines that may be truncated, giving the line number of the content being read. o termplot() has a default for 'ask' that uses dev.interactive(). It allows 'ylim' to be set, or computed to cover all the plots to be made (the new default) or computed for each plot (the previous default). o uniroot(f, *) is slightly faster for non-trivial f() because it computes f(lower) and f(upper) only once, and it has new optional arguments 'f.lower' and 'f.upper' by which the caller can pass these. o unlink() is now internal, using common POSIX code on all platforms. o unsplit() now works with lists of dataframes. o The vcov() methods for classes "gls" and "nlme" have migrated to package 'nlme'. o vignette() has a new argument 'all' to choose between showing vignettes in attached packages or in all installed packages. o New function within(), which is like with(), except that it returns modified versions back of lists and data frames. o X11(), postscript() (and hence bitmap()), xfig(), jpeg(), png() and the Windows devices win.print(), win.metafile() and bmp() now warn (once at first use) if semi-transparent colours are used (rather than silently treating them as fully transparent). o New function xspline() to provide base graphics support of X-splines (cf grid.xspline). o New function xyTable() does the 2D gridding "computations" used by sunflowerplot(). o Rd conversion to HTML and CHM now makes use of classes, which are set in the stylesheets. Editing R.css will change the styles used for \env, \option, \pkg etc. (CHM styles are set at compilation time.) o The documented arguments of '%*%' have been changed to be x and y, to match S and the implicit S4 generic. o If members of the Ops group (the arithmetic, logical and comparison operators) and '%*%' are called as functions, e.g. '>'(x, y), positional matching is always used. (It used to be the case that positional matching was used for the default methods, but names would be matched for S3 and S4 methods and in the case of '!' the argument name differed between S3 and S4 methods.) o Imports environments of name spaces are named (as "imports:foo"), and so are known e.g. to environmentName(). o Package 'stats4' uses lazy-loading not SaveImage (which is now deprecated). o Installing help for a package now parses the .Rd file only once, rather than once for each type. o PCRE has been updated to version 7.2. o bzip2 has been updated to version 1.0.4. o gettext has been updated to version 0.16.1. o There is now a global CHARSXP cache, R_StringHash. CHARSXPs are no longer duplicated and must not be modified in place. Developers should strive to only use mkChar (and mkString) for creating new CHARSXPs and avoid use of allocString. A new macro, CallocCharBuf, can be used to obtain a temporary char buffer for manipulating character data. This patch was written by Seth Falcon. o The internal equivalents of as.complex, as.double, as.integer and as.logical used to handle length=1 arguments now accept character strings (rather than report that this is 'unimplemented'). o Lazy-loading a package is now substantially more efficient (in memory saved and load time). o Various performance improvements lead to a 45% reduction in the startup time without 'methods' (and one-sixth with - 'methods' now takes 75% of the startup time of a default session). o The [[ subsetting operator now has an argument 'exact' that allows programmers to disable partial matching (which will in due course become the default). The default value is exact=NA which causes a warning to be issued when partial matching occurs. When exact = TRUE, no partial matching will be performed. When exact = FALSE, partial matching can occur and no warning will be issued. This patch was written by Seth Falcon. o Many of the C-level warning / error messages (e.g. from subscripting) have been re-worked to give more detailed information on either the location or the cause of the problem. o The S3 and S4 Math groups have been harmonized. Functions log1p(), expm1(), log10() and log2() are members of the S3 group, and sign(), log1p(), expm1(), log2(), cummax(), cummin(), digamma(), trigamma() and trunk() are members of the S4 group. gammaCody() is no longer in the S3 Math group. They are now all primitive. o The initialization of the random-number stream makes use of the sub-second part of the current time where available. Initialization of the 1997 Knuth TAOCP generator is now done in R code, avoiding some C code whose licence status has been questioned. o The reporting of syntax errors has been made more user- friendly. METHODS PACKAGE o Packages using 'methods' have to have been installed in R 2.4.0 or later (when various internal representations were changed). o Internally generic primitives no longer dispatch S4 methods on S3 objects. o load() and restoring a workspace attempt to detect and warn on the loading of pre-2.4.0 S4 objects. o Making functions primitive changes the semantics of S4 dispatch: these no longer dispatch on classes based on types but do dispatch whenever the function in the base name space is called. This applies to as.complex(), as.integer(), as.logical(), as.numeric(), as.raw(), expm1(), log(), log1p(), log2(), log10(), gamma(), lgamma(), digamma() and trigamma(), as well as the Math2 and Summary groups. Because all members of the group generics are now primitive, they are all S4 generic and setting an S4 group generic does at last apply to all members and not just those already made S4 generic. as.double() and as.real() are identical to as.numeric(), and now remain so even if S4 methods are set on any of them. Since 'as.numeric' is the traditional name used in S4, currently methods must be exported from a NAMESPACE for 'as.numeric' only. o The S4 generic for '!' has been changed to have signature (x) (was (e1)) to match the documentation and the S3 generic. setMethod() will fix up methods defined for (e1), with a warning. o The "structure" S4 class now has methods that implement the concept of structures as described in the Blue Book--that element-by-element functions and operators leave structure intact unless they change the length. The informal behavior of R for vectors with attributes was inconsistent. o The implicitGeneric() function and relatives have been added to specify how a function in a package should look when methods are defined for it. This will be used to ensure that generic versions of functions in R core are consistent. See ?implicitGeneric. o Error messages generated by some of the functions in the methods package provide the name of the generic to provide more contextual information. o It is now possible to use setGeneric(useAsDefault = FALSE) to define a new generic with the name of a primitive function (but having no connection with the primitive). o showMethods() has a "smart" default for 'inherited' such that showMethods(, incl = TRUE) becomes a useful short cut. DEPRECATED & DEFUNCT o $ on an atomic vector now gives a warning that it is 'invalid'. It remains deprecated, but may be removed in R >= 2.7.0. o storage.mode(x) <- "real" and storage.mode(x) <- "single" are defunct: use instead storage.mode(x) <- "double" and mode(x) <- "single". o In package installation, SaveImage: yes is deprecated in favour of LazyLoad: yes. o seemsS4Object (methods package) is deprecated in favour of isS4(). o It is planned that [[exact=TRUE]] will become the default in R 2.7.0. UTILITIES o checkS3methods() (invoked by R CMD check) now checks the arguments of methods for primitive members of the S3 group generics. o R CMD check now does a recursive copy on the 'tests' directory. o R CMD check now warns on non-ASCII .Rd files without an \encoding field, rather than just on ones that are definitely not from an ISO-8859 encoding. This agrees with the long-standing stipulation in 'Writing R Extensions', and catches some packages with UTF-8 man pages. o R CMD check now warns on DESCRIPTION files with a non-portable Encoding field, or with non-ASCII data and no Encoding field. o R CMD check now loads all the 'Suggests' and 'Enhances' dependencies to reduce warnings about non-visible objects, and also emulates standard functions (such as shell()) on alternative R platforms. o R CMD check now (by default) attempts to latex the vignettes rather than just weave and tangle them: this will give a NOTE if there are latex errors. o R CMD check computations no longer ignore Rd \usage entries for functions for extracting or replacing parts of an object, so S3 methods should use the appropriate \method{} markup. o R CMD check now checks for CR (as well as CRLF) line endings in C/C++/Fortran source files, and for non-LF line endings in Makefile[.in] and Makevars[.in] in the package 'src' directory. R CMD build will correct non-LF line endings in source files and in the make files mentioned. o Rdconv now warns about unmatched braces rather than silently omitting sections containing them. (Suggestion by Bill Dunlap, PR#9649) Rdconv now renders (rather than ignores) \var{} inside \code{} markup in latex conversion. R CMD Rdconv gains a --encoding argument to set the default encoding for conversions. o The list of CRAN mirrors now has a new (manually maintained) column "OK" which flags mirrors that seem to be OK, only those are used by chooseCRANmirror(). The now exported function getCRANmirrors() can be used to get all known mirrors or only the ones that are OK. o R CMD SHLIB gains arguments --clean and --preclean to clean up intermediate files after and before building. o R CMD config now knows about FC and FCFLAGS (used for F9x compilation). o R CMD Rdconv now does a better job of rendering quotes in titles in HTML, and \sQuote and \dQuote into text on Windows. C-LEVEL FACILITIES o New utility function alloc3DArray similar to allocMatrix. o The entry point R_seemsS4Object in Rinternals.h has not been needed since R 2.4.0 and has been removed. Use IS_S4_OBJECT instead. o Applications embedding R can use R_getEmbeddingDllInfo() to obtain DllInfo for registering symbols present in the application itself. o The instructions for making and using standalone libRmath have been moved to the R Installation and Administration manual. o CHAR() now returns (const char *) since CHARSXPs should no longer be modified in place. This change allows compilers to warn or error about improper modification. Thanks to Herve Pages for the suggestion. o acopy_string is a (provisional) new helper function that copies character data and returns a pointer to memory allocated using R_alloc. This can be used to create a copy of a string stored in a CHARSXP before passing the data on to a function that modifies its arguments. o asLogical, asInteger, asReal and asComplex now accept STRSXP and CHARSXP arguments, and asChar accepts CHARSXP. o New entry point R_GE_str2col listed in R_ext/GraphicsEngine.h for external graphics device developers. o doKeybd and doMouseevent are now exported in GraphicsDevice.h. o R_alloc now has first argument of type 'size_t' to support 64-bit platforms (e.g. Win64) with a 32-bit 'long' type. o The type of the last two arguments of getMatrixDimnames (non-API but mentioned in R-exts.texi and in Rinternals.h) has been changed to 'const char **' (from char **). o R_FINITE now always resolves to the function call R_finite in packages (rather than sometimes substituting isfinite). This avoids some issues where R headers are called from C++ code using features tested on the C compiler. o The advice to include R headers from C++ inside extern "C" {} has been changed. It is nowadays better *not* to wrap the headers, as they include other headers which on some OSes should not be wrapped. o Rinternals.h no longer includes a substantial set of C headers. All but ctype.h and errno.h are included by R.h which is supposed to be used before Rinternals.h. o Including C system headers can be avoided by defining NO_C_HEADERS before including R headers. This is intended to be used from C++ code, and you will need to include C++ equivalents such as before the R headers. INSTALLATION o The 'test-Lapack' test is now part of 'make check'. o The 'stat' system call is now required, along with 'opendir' (which had long been used but not tested for). ('make check' would have failed in earlier versions without these calls.) o 'evince' is now considered as a possible PDF viewer. o 'make install-strip' now also strips the DLLs in the standard packages. o Perl 5.8.0 (released in July 2002) or later is now required. (R 2.4.0 and later have in fact required 5.6.1 or later.) o The C function 'finite' is no longer used: we expect a C99 compiler which will have 'isfinite'. (If that is missing, we test separately for NaN, Inf and -Inf.) o A script/executable 'texi2dvi' is now required on Unix-alikes: it is part of the texinfo distribution. o Files texinfo.tex and txi-en.tex are no longer supplied in doc/manual (as the latest versions have an incompatible licence). You will need to ensure that your texinfo and/or TeX installations supply them. o wcstod is now required for MBCS support. o There are some experimental provisions for building on Cygwin. PACKAGE INSTALLATION o The encoding declared in the DESCRIPTION file is now used as the default encoding for .Rd files. o A standard for specifying package license information in the DESCRIPTION License field was introduced, see 'Writing R Extensions'. In addition, files LICENSE or LICENCE in a package top-level source directory are now installed (so putting copies into the 'inst' subdirectory is no longer necessary). o install.packages() on a Unix-alike now updates doc/html/packages.html only if packages are installed to .Library (by that exact name). o R CMD INSTALL --clean now runs SHLIB --clean to do the clean up (unless there is a src/Makefile), and this will remove $(OBJECTS) (which might have been redefined in Makevars). R CMD INSTALL --preclean cleans up the sources after a previous installation (as if that had used --clean) before attempting to install. R CMD INSTALL will now run R CMD SHLIB in the 'src' directory if src/Makevars is present, even if there are no source files with known extensions. o If there is a file src/Makefile, src/Makevars is now ignored (it could be included by src/Makefile if desired), and it is preceded by etc/Makeconf rather than share/make/shlib.mk. Thus the makefiles read are R_HOME/etc/Makeconf, src/Makefile in the package and then any personal Makevars files. o R CMD SHLIB used to support the use of 'OBJS' in Makevars, but this was changed to 'OBJECTS' in 2001. The undocumented alternative of 'OBJS' has finally been removed. o R CMD check no longer issues a warning about no data sets being present if a lazyload db is found (as determined by the presence of Rdata.rdb, Rdata.rds, and Rdata.rdx in the 'data' subdirectory. BUG FIXES o charmatch() and pmatch() used to accept non-integer values for 'nomatch' even though the return value was documented to be integer. Now 'nomatch' is coerced to integer (rather than the result being coerced to the type of 'nomatch'). o match.call() no longer 'works' outside a function unless 'definition' is supplied. (Under some circumstances it used to 'work', matching itself.) o The formula methods of boxplot, cdplot, pairs and spineplot now attach 'stats' so that model.frame() is visible where they evaluate it. o Date-time objects are no longer regarded as numeric by is.numeric(). o methods("Math") did not work if 'methods' was not attached. o readChar() read an extra empty item (or more than one) beyond the end of the source; in some conditions it would terminate early when reading an item of length 0. o Added a promise evaluation stack so interrupted promise evaluations can be restarted. o R.version[1:10] now nicely prints. o In the methods package, prototypes are now inherited for the .Data "slot"; i.e., for classes that contain one of the basic data types. o [[i, j]] now works if 'i' is character. o write.dcf() no longer writes NA fields (PR#9796), and works correctly on empty descriptions. o pbeta(x, log.p = TRUE) now has improved accuracy in many cases, and so have functions depending on it such as pt(), pf() and pbinom(). o mle() had problems with the L-BFGS-B in the no-parameter case and consequentially also when profiling 1-parameter models (fix thanks to Ben Bolker). o Two bugs fixed in methods that in involve the "..." argument in the generic function: previously failed to catch methods that just dropped the "..."; and use of callGeneric() with no arguments failed in some circumstances when "..." was a formal argument. o sequence() now behaves more reasonably, although not back-compatibly for zero or negative input. o nls() now allows more peculiar but reasonable ways of being called, e.g., with data=list() or a model without variables. o match.arg() was not behaving as documented when several.ok=TRUE (PR#9859), gave spurious warnings when 'arg' had the wrong length and was incorrectly documented (exact matches are returned even when there is more than one partial match). o The data.frame method for split<-() was broken. o The test for -D__NO_MATH_INLINES was badly broken and returned true on all non-glibc platforms and false on all glibc ones (whether they were broken or not). o LF was missing after the last prompt when --quiet was used without --slave. Use --slave when no final LF is desired. o Fixed bug in initialisation code in 'grid' package for determining the boundaries of shapes. Problem reported by Hadley Wickham; symptom was error message: "Polygon edge not found". o str() is no longer slow for large POSIXct objects. Its output is also slightly more compact for such objects; implementation via new optional argument 'give.head'. o strsplit(*, fixed=TRUE), potentially iconv() and internal string formatting is now faster for large strings, thanks to report PR#9902 by John Brzustowski. o de.restore() gave a spurious warning for matrices (Ben Bolker) o plot(fn, xlim=c(a,b)) would not set "from" and "to" properly when plotting a function. The argument lists to curve() and plot.function() have been modified slightly as part of the fix. o julian() was documented to work with POSIXt origins, but did not work with POSIXlt ones. (PR#9908) o Dataset HairEyeColor has been corrected to agree with Friendly (2000): the change involves the breakdown of the Brown hair / Brown eye cell by Sex, and only totals over Sex are given in the original source. o Trailing spaces are now consistently stripped from \alias{} entries in .Rd files, and this is now documented. (PR#9915) o .find.packages(), packageDescription() and sessionInfo() assumed that attached environments named "package:foo" were package environments, although misguided users could use such a name in attach(). o spline() and splinefun() with method = "periodic" could return incorrect results when length(x) was 2 or 3. o getS3method() could fail if the method name contained a regexp metacharacter such as "+". o help() now uses the name and not the value of the vector unless it has length exactly one, so e.g. help(letters) now gives help on 'letters'. (Related to PR#9927) o Ranges in chartr() now work better in CJK locales, thanks to Ei-ji Nakama. ************************************************** * * * 2.5 SERIES NEWS * * * ************************************************** CHANGES IN R VERSION 2.5.1 patched INSTALLATION o doc/manual now includes the texinfo support file epsf.tex which basic TeX installations often omit. BUG FIXES o Attempting to do in-memory serialization of an object requiring more than 1Gb might have failed. o Using formals<- on a function whose body was NULL worked incorrectly. (PR#9758) o logb() is now strictly a wrapper for log(), so if S4 methods are set on log(), logb() will also dispatch on them. o conflicts(where=) did not work correctly. (PR#9760) o log(x, base) was intended to handle complex 'base' even for real 'x', but there was a typo in the code to do so. o Syntax errors would sometimes misreport the error context. o qt(p, df=1) is now also correct for very small p. (PR#9804) qt(p, df=2) ditto; also is more accurate for 0 < |p - 0.5| << 1. qt(*, log.p=TRUE) now is finite and monotone (again!) where possible. o Several functions including those making use of printCoefmat(), layout() and sortedXyData() now work correctly with non-default settings of options("OutDec"). o S4 method dispatch for group generics (and %*%) failed to pass arguments to methods as promises and so in some circumstances methods could change their arguments. (Seen for the 'Math' group with package Matrix.) o The print() method for "ts" now handles quarterly and monthly series which do not start at the beginning of a quarter or month respectively. o Deserializing raw objects saved using save(..., ascii=TRUE) now works correctly. o ISOLatin7 encoding for postscript/PDF has been corrected. (PR#9845) o rbind(x,y) and cbind(x,y) did not dispatch properly when x and y had multiple S3-style classes. o The workaround for seeking on > 2Gb files did not work correctly on Unix-alike 32-bit systems. (PR#9883) o We had identical(NaN, NA_real_) != identical(NA_real_, NaN), spotted by Petr Savicky. CHANGES IN R VERSION 2.5.1 NEW FEATURES o density(1:20, bw = "SJ") now works as bw.SJ() now tries a larger search interval than the default (lower, upper) if it does not find a solution within the latter. o The output of library() (no arguments) is now sorted by library trees in the order of .libPaths() and not alphabetically. o R_LIBS_USER and R_LIBS_SITE feature possible expansion of specifiers for R version specific information as part of the startup process. o C-level warning calls now print a more informative context, as C-level errors have for a while. o There is a new option "rl_word_breaks" to control the way the input line is tokenized in the readline-based terminal interface for object- and file-name completion. This allows it to be tuned for people who use their space bar vs those who do not. The default now allows filename-completion with +-* in the filenames. o If the srcfile argument to parse() is not NULL, it will be added to the result as a "srcfile" attribute. o It is no longer possible to interrupt lazy-loading (which was only at all likely when lazy-loading environments), which would leave the object being loaded in an unusable state. This is a temporary measure: error-recovery when evaluating promises will be tackled more comprehensively in 2.6.0. INSTALLATION o 'make check' will work with --without-iconv, to accommodate building on AIX where the system iconv conflicts with libiconv and is not compatible with R's requirements. o There is support for 'DESTDIR': see the R-admin manual. o The texinfo manuals are now converted to HTML with a style sheet: in recent versions of makeinfo the markup such as @file was being lost in the HTML rendering. o The use of inlining has been tweaked to avoid warnings from gcc >= 4.2.0 when compiling in C99 mode (which is the default from configure). BUG FIXES o as.dendrogram() failed on objects of class "dendrogram". o plot(type ="s") (or "S") with many (hundreds of thousands) of points could overflow the stack. (PR#9629) o Coercing an S4 classed object to "matrix" (or other basic class) failed to unset the S4 bit. o The 'useS4' argument of print.default() had been broken by an unrelated change prior to 2.4.1. This allowed print() and show() to bounce badly constructed S4 objects between themselves indefinitely. o Prediction of the seasonal component in HoltWinters() was one step out at one point in the calculations. decompose() incorrectly computed the 'random' component for a multiplicative fit. o Wildcards work again in unlink() on Unix-alikes (they did not in 2.5.0). o When qr() used pivoting, the coefficient names in qr.coef() were not pivoted to match. (PR#9623) o UseMethod() could crash R if the first argument was not a character string. o R and Rscript on Unix-alikes were not accepting spaces in -e arguments (even if quoted). o Hexadecimal integer constants (e.g. 0x10L) were not being parsed correctly on platforms where the C function atof did not accept hexadecimal prefixes (as required by C99, but not implemented in MinGW as used by R on Windows). (PR#9648) o libRlapack.dylib on Mac OS X had no version information and sometimes an invalid identification name. o Rd conversion of \usage treated '\\' as a single backslash in all but latex: it now acts consistently with the other verbatim-like environments (it was never 'verbatim' despite the documentation). \code{\.} is now rendered as '\.' in all formats, as documented (it was not the case for latex conversion). codoc() (and checkDocStyle() and checkDocUsage()) now apply the same transformations to \usage as Rd conversion does, so {, % and \\ in strings in usages will now be related correctly to the help files. o rbind() failed if the only data frame had 0 rows. (PR#9657) o [i, j] could sometimes select the wrong column when j is numeric if there are duplicate column names. o sample(x, size, replace=TRUE, prob) had a memory leak if 10000 < size <= 100000. o x <- cbind(1:2); rownames(x) <- factor(c("A",NA)) now longer segfaults. o R CMD BATCH no longer assumes Sys.unsetenv() is supported (it is not on older Solaris systems). o median() returned a logical result when it was 'NA': it now returns an NA of appropriate type (e.g. integer or double). o grep(fixed = TRUE, perl = TRUE) ignored 'fixed', although it was documented to ignore 'perl' Same for [g]regexpr and [g]sub. o getNamespaceExports("base") works again. o runmed(c(), 1) no longer segfaults. o qr.coef(QR, b) failed for an LAPACK-produced QR if b was integer or for an over-determined system. qr.solve() for an under-determined system produces a solution with 0 and not NA for columns which are unused. o segments() was not handling full transparency correctly in PDF. (PR#9694) Nor was arrows(). o callGeneric() inside a method with extra arguments {and hence currently defined via .local()} now works. o [g]sub(fixed=TRUE, useBytes=FALSE) could substitute in the wrong place in an MBCS locale. gregexpr() could give incorrect answers in MBCS locales for perl = TRUE or fixed = TRUE (unless useBytes = TRUE). o The legacy quartz() device no longer crashes in locator() if the user attempts to close the window. o "CGGStackRestore: gstack underflow" warning is no longer shown in legacy quartz() device. o formatC() now limits 'digits' to 50 to avoid problems in C-level sprintf in some OSes. o seq.int(x, y, by=z) gave 'x' (and not an error) if 0 > (y-x)/z > -1. o promptClass() now lists methods, including those for generics in other attached packages. o Connection-related functions such as readBin() no longer crash when supplied with a non-connection object. o as.character.srcref() didn't handle bad srcref objects cleanly. o predict.nls() no longer requires 'newdata' to contain exactly the variable names needed to fit the model: variables used on the LHS only are no longer required and further variables are allowed. o plot.hclust() had a 'out by one' error, and ignored the last object when computing the window region (and could overrun arrays). o deriv() was creating results with double (and not integer) dims. o The unserialize code (e.g. as called by load()) looked for a function findPackageEnv() to set a saved package environment. This was missing, but is now supplied. o [cr]bind could segfault when creating a list matrix result. (Reported by Martin Morgan.) o besselI(x, nu, exp=TRUE) and besselY(x, nu) could give wrong answers for nu < 0. (Reported by Hiroyuki Kawakatsu.) o [g]sub could confuse a trailing byte '\' for a backreference in MBCSs where '\' can occur as a trailing byte (not UTF-8 nor EUC-JP, but SJIS and the CJK character sets used on Windows). (PR#9751) CHANGES IN R VERSION 2.5.0 USER-VISIBLE CHANGES o apropos(x) and find(x) now both only work for character 'x', and hence drop all non-standard evaluation behaviour. o Data frames can have 'automatic' row names which are not converted to dimnames by as.matrix(). (Consequently, e.g., t(.) for such data frames has NULL column names.) This change leads to memory reductions in several places, but can break code which assumes character dimnames for data frames derived from matrices. No existing R object is regarded as having 'automatic' row names, and it may be beneficial to recreate such objects via read.table() or data.frame(). o Using $ on an atomic vector now raises a warning, as does use on an S4 class for which a method has not been defined. o The Unix-alike readline terminal interface now does command-completion for R objects, incorporating the functionality formerly in package 'rcompletion' by Deepayan Sarkar. This can be disabled by setting the environment variable R_COMPLETION=FALSE when starting R (e.g. in ~/.Renviron). (Note that when this is enabled, filename completion no longer works for file paths containing R operators such as '+' and '-'.) NEW FEATURES o abbreviate() no longer has an 8191 byte limit on the size of strings it can handle. o abs(x) now returns integer for integer or logical arguments. o apropos() has a new argument 'ignore.case' which defaults to TRUE, potentially matching more than previously, thanks to a suggestion by Seth Falcon. o args(), str() and print() now give the argument lists of primitive functions. o as.matrix() gains the '...' argument that several packages have assumed it always had (and S-PLUS has). o Manipulation of integers as roman numerals via as.roman() in package utils. o attr() no longer treats name = NA_character_ as meaning name = "NA". o binom.test() now allows a 'fuzz' for calculated integer values in its x and n arguments. o boxplot(*, notch = TRUE) now warns when notches are outside hinges; related to PR#7690. o New function callCC() providing a downward-only version of Scheme's call with current continuation. o capabilities() now has a "profmem" entry indicating whether R has been compiled with memory profiling. o colnames<-() and rownames<-() now handle data frames explicitly, so calling colnames<- on a data frame no longer alters the representation of the row names. o commandArgs() has a new 'trailingOnly' argument to be used in conjunction with --args. o contour() now passes graphical parameters in '...' to axis() and box(). o New data set 'crimtab' on Student(1908)'s 3000 criminals. o cut.default() has a new argument 'ordered_result'. o .deparseOpts() has two new options: "keepNA" to ensure that different types (logical, integer, double, character and complex) of NAs are distinguished, and "S_compatible" to suppress the use of R-specific features such as 123L and to deparse integer values of a double vector with a trailing decimal point. The 'keepInteger' option now uses the suffix 'L' rather than as.integer() where possible (unless all entries are NA or "S_compatible" is also set). Other deparse options can now be added to "all" (which has not for some time actually switched on all options). Integer sequences m:n are now deparsed in that form. o deparse() and dput() now include "keepInteger" and "keepNA" in their defaults for the 'control' argument. o detach() now takes another argument, unload, which indicates whether or not to unload the package and then only cleans up the S4 methods if the package successfully unloads. o There are new constants NA_integer_, NA_real_, NA_complex_ and NA_character_ to denote NAs of those types, and they will be used in deparsing in place of as.integer(NA) etc unless .deparseOpts() includes "S_compatible". o dev.print() now recognizes 'screen devices' as all those with an enabled display list, rather than a hard-coded set. o Objects of class "difftime" are now handled more flexibly. The units of such objects can now be accessed via a units() function, which also has a replacement form, and there are conversion methods to and from numeric, which also allow the specification of units. Objects of this class can also be stored in data frames now. A format() method has been added, and the print method was revised. o New function environmentName() to give the print name of environments such as "namespace:base". This is now used by str(). o New function env.profile() provides R level access to summary statistics on environments. In a related patch, new.env() now allows the user to specify an initial size for a hashed environment. o file() can read the X11 clipboard selection as "X11_clipboard" on suitable X11-using systems. o file("stdin") is now recognized, and refers to the process's 'stdin' file stream whereas stdin() refers to the console. These may differ, for example for a GUI console, an embedded application of R or if --file= has been used. o file_test() is now also available in package utils. (It is now private in package tools.) o file.show() gains an 'encoding' argument. o New functions formatUL() and formatOL() in package utils for formatting unordered (itemize) and ordered (enumerate) lists. o The statistics reported when gcinfo(TRUE) are now of the amounts used (in Mb) and not of the amounts free (which are not really relevant when there are no hard limits, only gc trigger points). o New function get_all_vars() to retrieve all the (untransformed) variables that the default method of model.frame() would use to create the model frame. o interaction() has a new argument 'lex.order'. o initialize() (in methods) now tries to be smarter about updating the new instance in place, thereby reducing copying. o install.packages(dependencies = NA) is a new default, which is to install essential dependencies when installing from repositories to a single library. As a result of this change, update.packages() will install any new dependencies of the packages it is updating (alongside the package in the same library tree). If 'lib' is not specified or is specified of length one and the chosen location is not a writable directory, install.packages() offers to create a personal library directory for you if one does not already exist, and to install there. o is.atomic, is.call, is.character, is.complex, is.double (== is.real), is.environment, is.expression, is.function, is.integer, is.list, is.logical, is.null, is.object, is.pairlist, is.recursive, is.single and is.symbol (== is.name) are no longer internally S3 generic, nor can S4 methods be written for them. The "factor" methods of is.integer and is.numeric have been replaced by internal code. o Added is.raw() for completeness. o l10n_info() also reports if the current locale is Latin-1. o levels<-(), names() and names<-() now dispatch internally for efficiency and so no longer have S3 default methods. o .libPaths() now does both tilde and glob expansion. o Functions lm(), glm() loess(), xtabs() and the default method of model.frame() coerce their 'formula' argument (if supplied) to a formula. o max(), min() and range() now work with character vectors. o message() has a new argument 'appendLF' to handle messages with and without newlines. There is a new message class packageStartupMessage() that can be suppressed separately. o A new function, method.skeleton() writes a skeleton version of a call to setMethod() to a file, with correct arguments and format, given the name of the function and the method signature. o mode<- and storage.mode<- do slightly less copying. o nls.control(* , printEval = FALSE, warnOnly = FALSE) are two new options to help better analyze (non-)convergence of nls(), thanks to Kate Mullen. nls() and summary(nls()) now contain more information and also print information about convergence. o options(device = ) now accepts a function object as well as the name of a function. o pdf() supports new values for 'paper' of "US" (same as "letter"), "a4r" and "USr" (the latter two meaning rotated to landscape). postscript() also accepts paper = "US". o persp() now respects the graphical pars 'cex.axis', 'cex.lab', 'font.axis' and 'font.lab'. o New faster internal functions pmax.int() and pmin.int() for inputs which are atomic vectors without classes (called by pmax/pmin where applicable). pmin/pmax are now more likely to work with classed objects: they work with POSIXlt datetimes, for example. o postscript() now by default writes grey colors (including black and white) via 'setgray', which gives more widely acceptable output. There are options to write pure RGB, CMYK or gray via the new argument 'colormodel'. o rbind.data.frame() now ignores all zero-row inputs, as well as zero-column inputs (which it used to do, undocumented). This is because read.table() can create zero-row data frames with NULL columns, and those cannot be extended. o readChar() and writeChar() can now work with a raw vector. o read.table(), write.table() and allies have been moved to package utils. o rgb() now accepts the red, green and blue components in a single matrix or data frame. o New utility function RShowDoc() in package 'utils' to find and display manuals and other documentation files. o New .row_names_info() utility function finds the number of rows efficiently for data frames; consequently, dim.data.frame() has become very fast for large data frames with 'automatic' row names. o RSiteSearch() now also allows to search postings of the 'R-devel' mailing list. o screeplot() is now (S3) generic with a default method, thanks to a patch from Gavin Simpson. o Experimental 'verbose' argument for selectMethod(). Might be replaced later by a better interface for method selection inspection. o Added links to source files to the parsing routines, so that source() can now echo the original source and comments (rather than deparsing). This affects example() and Sweave() as well. o stack() and unstack() have been moved to package utils. o strptime() now sets the "tzone" attribute on the result if tz != "". o str.default() typically prints fewer entries of logical vectors. o The RweaveLatex driver for Sweave() now supports two new options: expand=FALSE, to show chunk references in the output, and concordance=TRUE, to output the concordance between input and output lines. o system() now takes the same set of arguments on all platforms, with those which are not applicable being ignored with a warning. Unix-alikes gain 'input' and 'wait', and Windows gains 'ignore.stderr'. o system.time() and proc.time() now return an object of class "proc_time" with a print() method that returns a POSIX-like format with names. o Sys.getenv() has a new argument 'unset' to allow unset and set to "" to be distinguished (if the OS does). The results of Sys.getenv() are now sorted (by name). o New function Sys.glob(), a wrapper for the POSIX.2 function glob(3) to do wildcard expansion (on systems which have it, plus an emulation on Windows). o Sys.setenv() is a new (and preferred) synonym for Sys.putenv(). The internal C code uses the POSIX-preferred 'setenv' rather than 'putenv' where the former is available. o New function Sys.unsetenv() to remove environment variables (on systems where unsetenv is implemented or putenv can remove variables, such as on Windows). o text(), mtext(), strheight(), strwidth(), legend(), axis(), title(), pie(), grid.text() and textGrob() all attempt to coerce non-language annotation objects (in the sense of is.object) to character vectors. This is principally intended to cover factors and POSIXt and Date objects, and is done via the new utility function as.graphicsAnnot() in package grDevices. o tcltk:tk_select.list() now chooses the width to fit the widest item. o {re,un}tracemem() are now primitives for efficiency and so migrate from 'utils' to 'base'. o union(), interect(), setdiff() and setequal() now coerce their arguments to be vectors (and they were documented only to apply to vectors). o uniroot() now works if the zero occurs at one of the ends of the interval (suggestion of Tamas Papp). o There is a new function View() for viewing matrix-like objects in a spreadsheet, which can be left up whilst R is running. o New function withVisible() allows R level access to the visibility flag. o zip.file.extract() has been moved to package utils. o A few more cases of subassignment work, e.g. [] <- and [] <- , with suitable coercion of the LHS. o There is a warning if \ is used unnecessarily in a string when being parsed, e.g. "\." where probably "\\." was intended. ("\." is valid, but the same as ".".) Thanks to Bill Dunlap for the suggestion. o Introduced the suffix L for integer literals to create integer rather than numeric values, e.g. 100L, 0x10L, 1e2L. o Set the parser to give verbose error messages in case of syntax errors. o The class "LinearMethodsList" has been extended and will be used to create list versions of methods, derived from the methods tables (environments). The older recursive "MethodsList" class will be deprecated (by the release of 2.5.0 if possible). o There are more flexible ways to specify the default library search path. In addition to R_LIBS and .Library, there are .Library.site (defaults to R_HOME/site-library) and R_L