Rev 47243 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
Dear Emacs, please make this -*-Text-*- mode!*************************************************** ** 2.8 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.8.1NEW FEATURESo sum() now has a method for "difftime" objects (via the Summarygroup).max(), min() and range() applied to "difftime" object(s) nowreturn a result in the common units of the objects, if thereis one.o installed.packages() is now tolerant of malformed DESCRIPTIONfiles in installed packages (it ignores them, with a warning).o qt() now works for 0 < df < 1.o For consistency with matrix() and array(), dimnames(x) <-list() removes the dimnames (as assigning NULL would do).It was previously an error.o nlminb() copies names from 'start' to the parameter vectorused (for consistency with optim()).o legend() gains a 'title.col' argument: the title colour waspreviously set from the first element of 'text.col' (whichremains the default).o In an Rd file, use of top-level \itemize{} inside a \value{}block is unnecessary and almost always gave a faultyconversion. Most cases are now detected and corrected, butgive a warning as such code will not work correctly in earlierversins of R.Also, use of \code{} inside a code block such as \examples{}will give a erroneous conversion that is now detected andwarned against.o Autoflushing of stdout is turned on when Rd processing, sowarnings/error are likely to appear in the right place inredirected output (such as that from R CMD check).UTILITIESo R_PDFLATEXCMD is added to the environment variables set by'R CMD' and is used by R CMD Rd2dvi.R_LATEXCMD, R_PDFLATEXCMD, R_MAKEINDEXCMD and R_DVIPSCMDdefault to 'latex', 'pdflatex', 'makeindex' and 'dvips'respectively if no suitable executable was found at configuretime (since they might well be available at run time,particularly for binary installations of R). This affectsR CMD Rd2dvi and help(offline=TRUE).R CMD Rd2dvi now gives an explicit error message if latex (orpdflatex) fails.R CMD Rd2dvi gains a --no-index argument: processing somespecial characters on PDF indices gave errors which used to beignored.DEPRECATED & DEFUNCTo R CMD INSTALL --with-package-versions is deprecated (andsupport has always been incomplete on Windows).So is install.packages(installWithVers = TRUE).o Rd conversion to Sd and Ssgm is now deprecated as we no longerhave any means to check the results (and Sd is long obsolete).BUG FIXESo add1.glm() no longer warns if applied to a binomial glm with afactor response.o aggregate.data.frame() now does something sensible with azero-column 'x' rather than failing with an obscure errormessage. It gives an explicit error message if called with azero-row 'x'.o integrate() now accepts integer results from f(): as documented,but only double was accepted.o contrib.url() produced an incorrect URL for the type"mac.binary".o pairwise.wilcox.test() did not pass on the 'paired' argument(caught by Matthias Kohl)o bmp(), jpeg(), and png() on unix with type="cairo" would segfaulton closure if the output file could not be opened.o tiff() on unix would not write the output file for the first pagewhen multiple pages were plotted.o str(1 + structure(1, class = "test")) no longer recurses indefinitely.o pf(x, .., ncp, lower.tail=FALSE, log=TRUE) is much more accuratefor large x now.o dev2bitmap() failed in 2.8.0 if 'taa' and 'gaa' were both NA.o Under rare circumstances equality tests for character stringscould fail to report equality in 2.8.0 in the same way as2.7.2. (This needed a current encoding of Latin-1 or UTF-8,one string whose encoding was marked as that encoding and onethat was marked as "unknown". In that circumstance the twostrings are not actually known to be equal, but earlierversions of R assumed that "unknown" meant the currentencoding, and this is done once again.)o R CMD config could echo messages from GNU make if called fromwithin a Makefile (as e.g. package Rcpp did), especially fromwithin a parallel make run.o Rounding error could affect window(extend=TRUE) when appliedto monthly series. (PR#13272)o Offline help on a Unix-alike now works even if options"latexcmd" and "dvipscmd" contain spaces(e.g. "dvips -Pmy_printer").Informative error messages are given if running latex or dvipsfail.o Using plot.lm() on a "glm" object since 2.7.1 with which=5caused the Pearson rather than deviance residuals to be usedin which=2 or 3 (including in the default case). (Thanks toEffie Greathouse and Greg Snow.)plot.lm() did not report on omitting observations withleverage one if they also had residual exactly zero. This wasseen in example(occupationalStatus).o deparse(nlines=) no longer pads short results with blanklines. (PR#13299)o legend(xpd=) now restores 'xpd' correctly. (PR#12756)o The "formula" method for lines() now works if 'subset' issupplied and no 'data' argument (as that for points() did).o Sweave() now takes the defaults for the options 'pdf.version'and 'pdf.encoding' of its RweaveLatex driver from pdf.options().o prettyNum(x, drop0trailing=TRUE) treated "1.1e20" as "1.1e2"and hence str() did as well, in 2.8.0 only.o dchisq(x, df, ncp) no longer hangs for large x and ncp > 0,and is more accurate in some cases (PR#13309).o installed.packages(lib.loc = D, priority="NA") now also works whenD contains a single package. (PR#13332)o legend(...., merge=TRUE) now warns and has no effect in thecase where no line segments are drawn. (PR#13340)o transform.data.frame() works better when two or more columns areadded.o Deparsing argument lists with non-syntactic names (e.g. that fortransform()) now uses backticks rather than double quotes toproduce syntactically valid output.o matrix() failed to check for 0-length 'dimnames': it nowtreats them as NULL (as array did). (PR#13361)o 0^NA is now NA, not Inf, consistent with x^NA, x != 1.o anova.mlm() did not work if T had only one row (includinge.g. the case M = ~1).o axis.POSIXct() mislabelled for some time ranges of a few hours(reported by Martin Becker).o mantelhaen.test() with 'exact=FALSE' was not respecting'alternative'. It now does one-sided tests similarly toprop.test().o anova.mlm() had trouble with some designs where near-zero rows ofthe tranformation matrix were not removed (caught by Nils Skutara).o Rd conversion was handling expressions like'\item{foo}{see \eqn{x}}' (with one argument to \eqnimmediately followed by a right brace) incorrectly, sometimesgiving a spurious warning about 'missing text'.o R CMD INSTALL used the C locale to install the DESCRIPTIONfile, and so escaped non-ASCII characters in packages with adeclared encoding of "latin1" or "UTF-8". (However, theinstalled DESCRIPTION file was rarely used since the dumpedmetadata are available.)o xspline() now respects inline par settings.It and grid.xspline() now handle the special case of only twocontrol points, and splines with control points that arelocated well outside the device (e.g., a zoomed view of alarger curve). (Both cases were giving the error "reachedMAXNUMPTS").o In setClass("C", contains="list"); x <- new("C", 1:3), x[2:3] nowremains of class "C". So does rep(x, 2) or rep.int(x, 3).o median.default() now also works for "numeric"-like vectors.o The pdf() device can now handle the case where an image uses avery large number of colours with different levels ofsemi-transparency (alpha-values). It used to segfault.(Also PR#13264.)o window() failed to apply a fuzz to 'start' or 'end' and sosometimes warned incorrectly for time series with 'freq' not apower of two (e.g. 12 or 24).o unique.default() now preserves the "tzone" attribute on"POSIXct" objects.o If all the packages had dependency lists of equal lengths,occasionally install.packages() would compute an incorrectsort order.o col(x, as.factor=TRUE) and row(x, as.factor=TRUE) would failif x had no column (row) names. It was documentedincorrectly, and now returns a matrix factor.o setRepositories() failed if "pkgType" was set to"mac.binary.leopard".o formals<-() changed the body of the function if this was alength-one list.o body<-() failed if the function had no arguments. It nowwarns if discarding elements from a 'value' of type "expression".o qr.coef() failed in the complex case for non-square systems.(PR#13305)o plot.dendrogram(horizontal=TRUE) did not not plot 'edgetext'at the correct locations. (PR#13313)o The starting point for plot.acf(ci.type="ma") was lag 0 when itshould have been lag 1. (PR#13071)o There was an obscure bug with srcrefs, which could put theparser into a condition giving "Error: bad value" on any inputCHANGES IN R VERSION 2.8.0SIGNIFICANT USER-VISIBLE CHANGESo var(), cov(), cor(), sd() etc now by default (when 'use' is notspecified) return NA in many cases where they signalled anerror before.NEW FEATURESo abbreviate() gains an optional argument 'strict' allowing cheapand fast strict abbrevation.o The "lm" methods of add1(), anova() and drop1() warn if they aremis-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 supportsanti-aliasing.o Box.test() gains a 'fitdf' argument to adjust the degrees offreedom if applied to residuals.o browseURL() has a new argument 'encodeIfNeeded' to useURLencode() in cases where it seems likely that would behelpful. (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 <numeric(1)> 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'. Thisreturns NA instead of signalling an error for NA observations.Another new option is 'use = "na.or.complete"' which is the defaultfor 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 screendevices if getOption("device") is a function (as well as by name).o dev.new() gains a '...' argument which can be used to passnamed arguments which will be used if appropriate to thedevice selected.o dimnames(x) <- value extends 'value' if it a list and tooshort, and 'x' is an array. This allows constructions such asdimnames(x)[[1]] <- 1:3 to work whether or not 'x' already hasdimnames.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-helpaccording to "the rules". It is built on the new utility,create.post() on which also bug.report() is based now; boththanks to a contribution by Heather Turner.o help.search() now assumes that non-ASCII items are in latin1if that makes sense (all known examples on CRAN are).o HoltWinters() and decompose() use a (statistically) moreefficient computation for seasonal fits (they used to wasteone period).o intToUtf8() and intToBits() now accept numeric vectors,truncating them to integers.o is.unsorted() gains an argument 'strictly'. It now works forclassed objects with a >= or > method (as incorrectlydocumented earlier).o library() no longer warns about the masking objects that areidentical(.,.) to those they mask.o lockBinding(), unlockBinding(), lockEnvironment() andmakeActiveBinding() now all return invisibly (they alwaysreturn 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 viathe 'REPORT' control argument, thanks to code proposals byThomas Petzoldt.o The 'factory-fresh' defaults for options("device") have beenchanged to refer to the devices as functions in the grDevicesnamespace and not as names. This makes it more likely thatthe incorrect (since R 2.5.0) assumption in packages thatget(getOption("device"))() will work will catch users of thosepackages.o pch=16 now has no border (for consistency with 15, 17, 18) andhence is now different from pch=19.o pdf() has new arguments 'useDingbats' (set this to FALSE for usewith broken viewers) and 'colormodel'. It now only referencesthe ZapfDingbats font if it is used (for small opaque circles).The default PDF version is now 1.4, since viewers that do notaccept that are now rare.Different viewers were rendering consecutive text() calls on apdf() device in different ways where translucency wasinvolved. The PDF generated has been changed to force eachcall to be rendered separately (which is the way xpdf orghostscript was rendering, but Acrobat was forming atransparency group), which is consistent with other graphicsdevices supporting semi-transparency.o plot.dendrogram() has new arguments (xlim, ylim) which allowszooming into a hiearchical clustering dendrogram.o plot.ecdf() now defaults to pch=19 so as to better convey theleft-closed line segments.o plot.histogram() gains an 'ann' argument. (Wish from Ben Bolker.)o plot(<lm_obj>) now warns when it omits points with leverage onefrom 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 univariatet-statistics rather than a confidence region for all theparameters (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() allowraw 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' toread.table(): this allows the latter's default to be used.o readBin(), writeBin(), readChar() and writeChar() now open aconnection which was not already open in an appropriate binarymode rather than the default mode.readLines(), cat() and sink() now open a connection which wasnot already open in an appropriate text mode rather than thedefault mode.o readCitationFile() (and hence citation) now reads a package'sCITATION file in the package's declared encoding (if there is one).o The behaviour of readLines() for incomplete final lines onbinary-mode connections has been changed to be like blockingrather than non-blocking text-mode connections.o A new reorder.character() method has been added. This allowsuse 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 theresults are more likely to be correct to representation error.o rug() now uses axis()'s new arguments from 2.7.2, hence nolonger draws an axis line.o save() (optionally, but by default) checks for the existenceof objects before opening the file/connection (wish ofPR#12543).o segments(), arrows() and rect() allow zero-lengthcoordinates. (Wish of PR#11192)o set.seed(kind=NULL) now takes 'kind' from a saved seed if theworkspace has been restored or .Random.seed has been set insome other way. Previously it took the 'currently used' value,which was "default" unless random numbers had been used inthe current session. Similarly for the values reported byRNGkind(). (Related to PR#12567.)set.seed() gains a 'normal.kind' argument.o setEPS() and setPS() gain '...' to allow other arguments to bepassed to ps.options(), including overriding 'width' and 'height'.o setTimeLimit() function to set limits on the CPUand/or elapsed time for each top-level computation, andsetSessionLimit() to set limits for the rest of the session.o splinefun() has a new method = "monoH.FC" for monotone Hermitespline interpolation.o sprintf() optionally supports the %a/%A notation of C99 (if theplatform does, including under Windows).o str()'s default method gains a 'formatNum' function argument whichis used for formatting numeric vectors. Note that this is veryslightly not backward compatible.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 teststatistics, and gains a 'tol' argument to allow highlycorrelated responses to be explored (with probable loss ofaccuracy). Similar changes have been made to anova.mlm() andanova.mlmlist().o Sweave() now writes concordance information inside a\Sconcordance LaTeX macro, which allows it to be inserted intoPDF output.o system.time() now uses lazy evaluation rather thaneval/substitute, which results in more natural scoping. (PR#11169)o In table(), 'exclude=NULL' now does something also for factorarguments. A new 'useNA' argument allows you to controlwhether to add NA levels unconditionally or only when presentin data. A new convenience function addNA() gives similarfunctionality by adding NA levels to individual factors.o unlink() tries the literal pattern if it does not match withwildcards interpreted -- this helps with e.g. unlink("a[b")which previously needed to be unlink("a\\[b").o update.packages() gains an argument 'oldPkgs', wherenew.packages() and old.packages() get 'instPkgs'. These allowconsideration of only subsets of packages instead of allinstalled ones.o which(b) is somewhat faster now, notably for named vectors, thanksto a suggestion by Henrik Bengtsson.o New generic function xtfrm() as an auxiliary helper forsort(), order() and rank(). This should return a numericvector that sorts in the same way as its input. The defaultmethod supports any class with ==, > and is.na() methods butspecific methods can be much faster.As a side-effect, rank() will now work better on classedobjects, although possibly rather slowly.o X11() and capabilities("X11") now catch some X11 I/O errors thatpreviously terminated R. These were rare and have only beseen 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 astring now gives a truncation warning (unlessoptions("warnEscapes") is false).o The user environment and profile files can now be specified viaenvironment variables 'R_ENVIRON_USER' and 'R_PROFILE_USER',respectively.o ?pkg::topic and ?pkg:::topic now find help on 'topic' frompackage '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 forUnicode) for collation, enabled by configure option --with-ICUon a Unix-alike and by a setting in MkRules on Windows.Function icuSetCollate() allows the collation rules (includingthe locale) to be tuned. [Experimental]o If S4 method dispatch is on and S4 objects are found asattributes, show() rather than print() is used to print theS4 attributes.o Starting package tcltk without access to Tk (e.g. no availabledisplay) is now a warning rather than an error, as Tclwill still be usable. (On most platforms it was possible toinhibit Tk by not having DISPLAY set, but not on Windows norMac OS X builds with --with-aqua.)o Using $ on a non-subsettable object (such as a function) isnow an error (rather than returning NULL).o Hexadecimal numerical constants (such as 0xab.cdp+12) may nowcontain a decimal point.o PCRE has been updated to version 7.8 (mainly bug fixes).NEW FEATURES IN PACKAGE 'methods'o S3 classes that are registered by a call to setOldClass() nowhave the S3 class as a special slot, and therefore so doany S4 classes that contain them. This mechanism is used tosupport S4 classes that extend S3 classes, to the extentpossible. See ?Classes, ?setOldClass, and ?S3Class.The treatment of special pseudo-classes "matrix", "array", and"ts" as S4 classes has also been modified to be moreconsistent and, within limitations imposed by specialtreatment of these objects in the base code, to allow otherclasses 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 canbe supplied to setOldClass() when the S3 class has knownattributes of known class.setOldClass() now saves all the S3 inheritance, allowing thecalls to be built up in stages, rather than including all theS3 classes in each call. Also allows as(x,"S3") to generatevalid S3 inheritance from the stored definition. See ?S3.o S4 methods may now be defined corresponding to "...", bycreating a generic function that has "..." as its signature.A method will be selected and called if all the argumentsmatching "..." are from this class or a subclass. See ?dotsMethods.o New functions S3Part() and S3Class() provide access to thecorresponding S3 object and class for S4 classes that extendeither an S3 class or a basic R object type.o show(<class definition>) now also shows the class name.INSTALLATIONo If sub-architectures are used, a copy of Rscript is installedin ${R_HOME}/bin/exec${R_ARCH} (since that in ${R_HOME}/binand /usr/bin might be overwritten in a subsequent installation).PACKAGE INSTALLATIONo LazyLoad: yes is now the default, so packages wanting to avoidlazy loading must set 'LazyLoad: no' (or an equivalent value) inthe DESCRIPTION file.o R CMD INSTALL will now fail if it finds a non-executable'configure' script in the package -- this usually indicates afile system with insufficient permissions. If anon-executable 'cleanup' script is found and either--clean or --preclean is used, a warning is given.DEPRECATED & DEFUNCTo Use in packages of the graphics headers Rdevices.h andRgraphics.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: usefont=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() aredefunct.o Use of a non-integer .Random.seed is now an error. (R itselfhas never generated such values, but user code has, andR >= 2.6.0 has given a warning.)o methods::allGenerics() is deprecated.o In package installation, SaveImage: yes is now ignored, andany 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' andvariants.o Use of allocVector(CHARSXP ...) is deprecated and gives a warning.UTILITIESo The default for 'stylepath' in Sweave's (default) RweaveLatexdriver is now FALSE rather than TRUE ifSWEAVE_STYLEPATH_DEFAULT is unset : see ?RweaveLatex.To support this, tools::texi2dvi adds the R 'texmf' directoryto the input search path.o R CMD Rd2dvi now previews PDF output (as was documented) ifR_PDFVIEWER is set (as it will normally be on a Unix-alike butnot on Windows, where the file association is used by default).o R CMD check checks for binary executable files (which should notappear in a source package), using a suitable 'file' ifavailable, else by name.o R CMD check now also uses codetools' checks on the body of S4methods.C-LEVEL FACILITIESo R_ReadConsole will now be called with a buffer size of 4096bytes (rather than 1024): maintainers of alternativefront-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 FIXESo @ now gives an error (and not just a warning) if it is beingapplied 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 allsatisfy isS4(object). Previously, prototypes not of objecttype 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 checkmore 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 <NA> levels now workscorrectly again.o Repainting of open X11 View() windows is now done whilst anX11 dataentry window is in use.o Indexing of data frames with NA column names and a numeric orlogical column index works again even if columns with NA namesare selected.o on.exit() has been fixed to use lexical scope in determiningwhere to evaluate the exit action when the on.exit expressionappears in a function argument.o rank() now consistently returns a double result forties.method = "average" and an integer result otherwise.Previously the storage mode depended on 'na.last' and if anyNAs were present.o The "lm" methods of add1(), and drop1() now also work on a modelfit 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 automaticprinting, by using methods::show() for S4 objects.o Several bugs fixed in `?` with topics: it previously died tryingto 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 globalenvironment, not in baseenv() where other classes will not befound.o Class inheritance using explicit coerce= methods via setIs()failed to coerce the argument in method dispatch. With thisfixed, a mechanism was needed to prohibit such inheritancewhen it would break the generic function (e.g.,initialize). See ?setIs and ?setGeneric.o RSiteSearch() encodes its query (it seems this is occasionallyneeded on some platforms, but encoding other fields is harmful).o 'incomparables' in match() was looking up indices in the wrongtable.o write.dcf() did not escape "." according to Debian policy(PR#12816).o col2rgb() sometimes opened a graphics device unnecessarily, andcol2rgb(NA) did not return a transparent color, as documented.o pdf(family="Japan") [and other CIDfonts] no longer seg.faultswhen writing "western" text strings.o as.list() applied to an environment now forces promises andreturns values.o Promises capturing calls to sys.parent() and friends did notwork properly when evaluated via method dispatch for internalS3 generics.o The default "pkgType" option for non-CRAN builds of R on Mac OS Xis now correctly "source" as documented.o The default R_LIBS_USER path in AQUA builds now matches theMac-specifc path used by the Mac GUI: ~/Library/R/x.y/libraryo splinefun() with natural splines incorrectly evaluated derivativesto the left of the first knot. (PR#13132, fix thanks toBerwin Turlach)o anova(glm(..., y=FALSE)) now works. (PR#13098)o cut.Date(x, "weeks") could fail if x has only one unique valuewhich fell on a week boundary. (PR#13159)*************************************************** ** 2.7 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.7.2 patchedBUG FIXESo within(<dataframe>, { ... }) now also works when '...' removesmore than one column.o Attempting to open an X11() device on a non-existent displaywhen one is already open on another display now gives awarning 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 ifused to set a new position. (PR#12640)o quartz() would segfault if asked to create a file for bitmapoutput which could not be created. This applied also to thetype="quartz" versions of bmp(), jpeg(), png() and tiff().o dnbinom(0, size, mu = <large>) suffered from cancellation in 2.7.2only.CHANGES IN R VERSION 2.7.2NEW FEATURESo sprintf() returns elements of the result in UTF-8 when theformat or any character input has a corresponding elementdeclared as UTF-8. Similarly for paste(), elements of theresult are in UTF-8 when any input to that element is declaredas UTF-8.o axis() has new arguments 'col.ticks' and 'lwd.ticks' to allowthe colour and line width of ticks to be set separately fromthat of the line (e.g. to set one or the other to transparentor zero width).o legend() has a new argument 'box.col' to set the colour of theenclosing box.o legend() gains a 'xpd' argument to make it easier to place alegend in the margins or outer margins.o stripchart() now passes '...' to title() (as well as toplot.default() and axis()). (Wish of PR#12202)o help.search() has new argument 'searchEngine' to godirectly to the search form: this is needed by users ofFirefox 3 to workaround a bug in interpreting the searchresults pages.BUG FIXESo Plotmath computed the glyph metrics for the wrong character (andperhaps for a non-existent one) if this was a single-bytecharacter 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 <data.frame>[, ch] gives an error (again!) when ch is a string notexactly matching the column names, thanks to an oral bug report byMatthew Dowle.o data.frame(x=1:2, y=3:4, row.names=c("a","NA"))[c(2,NA),] hascorrect row names c("NA,"NA.1") again.o The GUI data editor for dataframes did not handle escapecharacters in entries properly. (PR#11897)o PCRE has been updated to 7.7 (bugfix release).o package.skeleton() wrongly warned about invalid code_files nameswhen these were not in the current directory.o shapiro.test(c(0,0,1)) now has P value >= 0 (instead of barelynegative).o assign() now warns if given a character vector of length > 1,rather than silently taking the first element.o rcond(<exactly singular matrix>) now gives 0 instead of an error.o There was a memory leak in C function ucstoutf8 used by somegraphics devices.o Plots of profile.mle() objects (package 'stats4') weremisbehaving when the 'which' argument had been used in theircalculation.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'sclose control now works better on some window managers.o Calling lapply() was not handling method dispatch correctly foris.numeric(), is.matrix(), is.array(), log() and the Math2group. This affected data.matrix() which incorrectly regarded"Date" and "POSIXct" objects as numeric, and has been adjustedto do so as exceptions.o package.skeleton() was not looking for non-function objects inits 'environment' argument.o nls() was only finding its 'weights' argument in the case whenall the variables in the formula were of the same length andhence that model.frame() could be used.It was silently ignoring 'subset' and 'na.action' except inthat case. Now they are ignored only if 'data' is a list andvariables 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 whensetting 'alpha' for the profile.o within() was not handling correctly expressions that producedNULL columns. (PR#11131)o dev.print() and dev.copy2{eps,pdf}() now ensure that the currentdevice is restored as the active device even if an erroroccurs. (PR#9801)o as.Date() could fail to convert character strings representingdays 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 areversed 'x' axis was incorrect. (PR#12019)o The use of multiple packages in 'LinkingTo' works again, andnow works when the dependent packages are in the library to beinstalled to (but not in the library path seen by R --vanilla).o bxp() (and hence boxplot) now respects in-line graphicalparameters '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-columndata frame and no column is created.o pchisq(x, df=0) was always one even for x < 0; similarly forpgamma(x, alpha=0).o add1() and drop1() now return a P-value of NaN in cases withdf=0 for test="Chisq" (they gave NaN until pchisq was alteredin R 2.6.2).o The default methods of drop1() and add1() now re-evaluate in theobject'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 # tothe end of the line) in R code has been removed.o qgamma() warns if used with shape < 1e-10, when it may beunreliable. (PR#12324)o Installing a source package was not using the package's declaredencoding (if any) as a default encoding for the help.search()database in Meta/hsearch.rds. This could cause packages witha default encoding to have some of their entries rejected byhelp.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 fromthe default (as documented).CHANGES IN R VERSION 2.7.1NEW FEATURESo tools::texi2dvi() has a new argument 'texinputs' to allow theTeX and bibtex input paths to be specified (even on MiKTeX).o dev.copy2pdf() gains an 'out.type' argument to allow it to beused 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 earlierversions of R). Similarly, '.' is now always non-numeric.o CITATION files are now read in Latin-1: quite a few werefailing if used in a multibyte locale such as UTF-8.o The DESCRIPTION file of a package can specify an 'OS_type' fieldas either 'unix' or 'windows' to confine installation to thatOS type.o HoltWinters() now uses optimize() rather than optim forone-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 anddimnames in the same way as for character and numeric inputs.(PR#11512)o read.DIF(*, transpose=TRUE) now allows to correctly read DIF filesproduced by some versions of Excel.DEPRECATED & DEFUNCTo 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.UTILITIESo R CMD check checks for possible check directories in thesources -- in mid-2008 there were about 20 examples on CRAN.o R CMD build tries harder to clean up the inst/doc directoryfrom the remnants of earlier builds.It also removes any directories with extension .Rcheck, andfiles .DS_Store and ._* (created by tar on Mac OS X under somecircumstances: it now sets environment variables to ask forsuch files not to be created by that tar.)BUG FIXESo Encoding<- on NA_character_ converted it to "NA".o Adobe Symbol was missing from the encodings intools::charset_to_Unicode.o diag(matrix(x, 0, 0)) now returns a 0-length vector of thecorrect mode, instead of always numeric.o The parser sometimes accepted invalid quoted strings in a UTF-8locale.o plot.default(x, y) now dispatches to Axis() methods whethery is NULL or not.o On Mac OS X, the Cocoa Quartz window could close without warningunder 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 opaqueor semi-transparent 'bg'. Previously, if 'col' wastransparent then 'bg' was ignored and nothing was drawn.o file.path() did not work correctly in 2.7.0 if the componentshad different encodings.o merge() failed if there were no common columns and one of theinputs had zero rows.o expand.grid() failed if an input had length 0.o match() does again truncate strings at embedded nuls (as newlydocumented 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 lengthgreater 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 anerror before a user coordinate system has been set on thedevice, rather than giving nonsensical values (the effect ofr31367).o Rare string width calculations in package grid were notinterpreting the string encoding correctly.o hasMethods(f, env) {without specified 'package'} now works better.o A missing PROTECT could cause segfaults on stringcomparisons. (PR#11421)o str(structure(1, classID = "Pooh")) now works fine.o A missing PROTECT could cause segfaults in if() if coercion ofthe condition was required or a warning was to be given.o plot(<table>) now uses a sensible default main title.o validObject() called with complete=TRUE did not use inheritedvalidity methods for slot classes.o Several bugs fixed in as(): the initial method lookup was notusing the table with inherited methods (so inheritance had tobe recomputed each time); coerce() should not be calleddirectly--it can insert invalid inherited methods; theconstructed as() methods were not retaining the function'senvironment.o influence.measures(<glm-object>) now computes the sameCook's distance approximations as cooks.distance().o plot(<glm>, 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 withUTF-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 aboutargument 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 forthe number of columns of 'newdata' if the columns were not named.o The axis() function now distinguishes between setting "at" toNULL or a zero-length vector, treating the latter as a requestfor no ticks. This corrects the handling of the "x" parameterto 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 popupmenu equivalent (Ctrl-click or second mouse button) or by pressingthe <Esc> key. The latter was documented but did not work.o tools:::.check_package_depends() {called from 'R CMD check'} nowalso 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-aliasingeffects for rasterized backends in plots that use adjacent,borderless rectangles such as image().o The srcfilecopy() function now adds a timestamp to the object itcreates.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 givenfamily which resolves font issues on Mac OS X 10.4. Full fontnames and PostScript names can be used interchangeably. (Note,however that italic/oblique font faces of Helvetica are notincluded in the Mac OS X 10.4 system).o qf() no longer gives NaN when one of df1 and df2 is large andthe other is infinite (including if both are infinite); it is moreaccurate 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 notcorrect 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 trailingzeros.o read.table(file = stdin()) with invalid input could leave theconnection in an invalid state and hence cause a latersegfault. (PR#11627)o read.DIF() did not obey the default 'stringsAsFactors = TRUE'.o The 'noquote' method for c() now works correctly with three ormore arguments.o symbol() in plotmath expressions works again with non-ASCIIinput on devices that use UTF-8 for the symbol font.CHANGES IN R VERSION 2.7.0SIGNIFICANT USER-VISIBLE CHANGESo The default graphics device in non-interactive use is nowpdf() rather than postscript(). [PDF viewers are nowmore widely available than PostScript viewers.]The default width and height for pdf() and bitmap() have beenchanged to 7 (inches) to match the screen devices.o Most users of the X11() device will see a new device that hasdifferent fonts, anti-aliasing of lines and fonts andsupports semi-transparent colours.o Considerable efforts have been made to make the default outputfrom graphics devices as similar as possible (and inparticular close to that from postscript/pdf). Many deviceswere misinterpreting 'pointsize' in some way, for example asbeing in device units (pixels) rather than in points.o Packages which include graphics devices need to be re-installedfor this version of R, with recently updated versions.NEW FEATURESo The apse code used by agrep() has been updated to version0.16, with various bug fixes.agrep() now supports multibyte character sets.o any() and all() avoid coercing zero-length arguments (whichused a surprising amount of memory) since they cannot affectthe answer.Coercion of other than integer arguments now gives a warningas this is often a mistake (e.g. writing all(pr) > 0 insteadof all(pr > 0) ).o as.Date(), as.POSIXct() and as.POSIXlt() now convert numericarguments (days or seconds since some epoch) provided the'origin' argument is specified.o New function as.octmode() to create objects such as filepermissions.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 anHTML 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 graphicsdevices).o New function checkNEWS() in package 'tools' that detects commonerrors in NEWS file formatting.o deparse() gains a new argument 'nlines' to limit the number oflines of output, and this is used internally to make severalfunctions 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 ofthe dimensions was named. (This is compatible with S.)Previously there were no names.o The 'incomparables' argument to duplicated(), unique() andmatch() is now implemented, and passed to match() from merge().o dyn.load() gains a 'DLLpath' argument to specify the path fordependent DLLs: currently only used on Windows.o The spreadsheet edit() methods (and used by fix()) for dataframes and matrices now warn when classes are discarded.When editing a data frame, columns of unknown type (that isnot numeric, logical, character or factor) are now convertedto character (instead of numeric).o file.create() has a new argument 'showWarnings' (default TRUE)to show an informative warning when creation fails, anddir.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) willbe 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 friendswhen length(x) > 10: this should improve performance on longvectors.o grep(), strsplit() and friends with fixed=TRUE or perl=TRUEwork in UTF-8 and preserve the UTF-8 encoding for UTF-8 inputswhere supported.o help.search() now builds the database about 3x times faster.o iconv() now accepts "UTF8" on all platforms (many did, but note.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 packagewith 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, withobjects having multiple strings in the class attribute.o Extensions to condition number computation for matrices, notablycomplex ones are provided, both in kappa() and the new rcond().o list.files() gains a 'ignore.case' argument, to allowcase-insensitive matching on some Windows/MacOS file systems.o ls.str() and lsf.str() have slightly changed arguments anddefaults such that ls.str() {no arguments} works when debugging.o Under Unix, utils::make.packages.html() can now be used directlyto set up linked HTML help pages, optionally without creatingthe package listing and search database (which can be muchfaster).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 '...' containsunexpected 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 whereavailable (for speed, e.g. in make.packages.html()).o pairwise.t.test() and pairwise.wilcox.test() now more explicitlyallow paired tests. In the former case it is now flagged as anerror if both 'paired' and 'pool.SD' are set TRUE (formerly,'paired' was silently ignored), and one-sided tests are generatedaccording 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 somecircumstances (see ?paste).o predict.loess() now works when loess() was fitted withtransformed explanatory variables, e.g, loess(y ~ log(x) + log(z)).o print(<data.frame>)'s new argument 'row.names' allows to suppressprinting rownames.o print() and str() now also "work" for 'logLik' vectors longer thanone.o Progress-bar functions txtProgressBar(), tkProgressBar() inpackage tcltk and winProgressBar() (Windows only).o readChar() gains an argument 'useBytes' to allow it to read afixed 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 ifsupplied with two arguments and at least one is named.o New function showNonASCII() in package tools to aid detectionof non-ASCII characters in .R and .Rd files.o The [dpq]signrank() functions now typically use considerablyless memory than previously, thanks to a patch from IvoUgrina.o spec.ar() now uses frequency(x) when calculating thefrequencies of the estimated spectrum, so that for monthlyseries 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 iflength(fmt) == 1, and so can be many times faster if calledwith long vector arguments.o [g]sub(useBytes = FALSE) now sets the encoding on changedelements of the result when working on an element of knownencoding. (This was previously done only for perl = TRUE.)o New function Sys.chmod(), a wrapper for 'chmod' on platformswhich support it. (On Windows it handles only the read-onlybit.)o New function Sys.umask(), a wrapper for 'umask' on platformswhich 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 whereavailable.o write.table(d, row.names=FALSE) is faster when 'd' has millions ofrows; 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, itis installed (analogously to LICENSE, LICENCE and COPYING).o Rd conversion to 'example' now quotes aliases which containspaces.o The handling of DST on dates outside the range 1902-2037 hasbeen improved. Dates after 2037 are assumed to have the sameDST rules as currently predicted for the 2030's (rather thanthe 1970s), and dates prior to 1902 are assumed to have no DSTand the same offset as in 1902 (if known, otherwise as in the1970s).o On platforms where we can detect that mktime sets errno(e.g. Solaris and the code used on Windows but not Linux norMac OS X), 1969-12-31 23:59:59 GMT is converted from POSIXltto POSIXct as -1 and not NA.o The definition of 'whitespace' used by the parser is slightlywider: it includes Unicode space characters on Windows and inUTF-8 locales on machines which use Unicode wide characters.o The src/extra/intl sources have been updated to those fromgettext 0.17.o New flag --interactive on Unix-alikes forces the session to beinteractive (as --ess does on Windows).o x[<zero-length>] <- NULL is always a no-op: previouslytype-checking was done on the replacement value and so thisfailed, whereas we now assume NULL can be promoted to anyzero-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 markexample 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 formore syntax errors (MBCS and Unicode encoding errors, linelength and context stack overflows, and mis-specified argumentlists to functions).o The "MethodsList" objects originally used for method selectionare being phased out. New utilities provide simpleralternatives (see ?findMethods), and direct use of the manglednames for the objects is now deprecated.o Creating new S4 class and method definitions in an environmentthat could not be identified (as package, namespace or global)previously generated an error. It now results in creating andusing 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 settingsfail. (The Windows port has long done so.)o Parsing and scanning of numerical constants is now done by R'sown C code. This ensures cross-platform consistency, andmitigates the effects of setting LC_NUMERIC (within base R itonly applies to output -- packages may differ).The format accepted is more general than before and includesbinary exponents in hexadecimal constants: see?NumericConstants for details.o Dependence specifications for R or packages in the Dependsfield in a DESCRIPTION file can now make use of operators< > == and != (in addition to <= and >=): such packages willnot be installable nor loadable in R < 2.7.0.There can be multiple mentions of R or a package in the Dependsfield in a DESCRIPTION file: only the first mention will beused in R < 2.7.0.GRAPHICS CHANGESo The default graphics devices in interactive andnon-interactive sessions are now configurable via environmentvariables R_INTERACTIVE_DEVICE and R_DEFAULT_DEVICErespectively.o New function dev.new() to launch a new copy of the defaultgraphics device (and taking care if it is "pdf" or"postscript" not to trample on the file of an already runningcopy).o dev.copy2eps() uses dev.displaylist() to detect screendevices, 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 asinteractive if it has a display list (but devices can stillregister 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 thenew 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 notdocumented prior to 2.6.1 patched).The defaults for all arguments other than 'file' inpostscript() and pdf() can now be set by ps.options() orpdf.options()o New functions setEPS() and setPS() as wrappers to ps.options()to set appropriate defaults for figures for inclusion in otherdocuments and for spooling to a printer respectively.o The meaning of numeric 'pch' has been extended where MBCSes aresupported. Now negative integer values indicate Unicodepoints, 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 wasundocumented: they were replaced by the current setting ofpar("pch").)o Graphics devices can say if they can rotate text well(e.g. postscript() and pdf() can) and if so the device'snative text becomes the default for contour labels rather thanusing Hershey fonts.o The setting of the line spacing (par("cra")[2]) on the X11() andwindows() devices is now comparable with postscript() etc, androughly 20% smaller than before (it used to depend on thelocale for X11). (So is the pictex() device, now 20% larger.)This affects the margin size in plots, and should result inbetter-looking plots.o There is a per-device setting for whether new frames needconfirmation. This is controlled by either par("ask") orgrid.prompt() and affects all subsequent plots on the deviceusing base or grid graphics.o There is a new version of the X11() device based on cairographics which is selected by type "cairo" or "nbcairo", andis available on machines with cairo installed and preferablypango (which most machines with gtk+ >= 2.8 will have). Thisversion supports translucent colours and normally does abetter job of font selection so it has been possible todisplay (e.g.) English, Polish, Russian and Japanese text ona single X11() window. It is the default where available.There is a companion function, savePlot(), to save the currentplot to a PNG file.On Unix-alikes, devices jpeg() and png() also accepttype = "cairo", and with that option do not need a runningX server. The meaning of capabilities("jpeg") andcapabilities("png") has changed to reflect this. On MacOS X,there is a further type = "quartz". The default type isselected by the new option "bitmapType", and is "quartz" or"cairo" where available.Where cairo 1.2 or later is supported, there is a svg() deviceto write SVG files, and cairo_pdf() and cairo_ps() devices towrite (possibly bitmap) PDF and postscript files via cairo.Some features require cairo >= 1.2, and some which arenominally 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 currentgraphics device surface (in inches or device units). Thisgives the same information as par("din"), but independent ofthe graphics subsystem.o New base graphics function clip() to set the clipping region (inuser coordinates).o New functions grconvertX() and grconvertY() to convert betweencoordinate systems in base graphics.o identify() recycles its 'labels' argument if necessary.o stripchart() is now a generic function, with default andformula methods defined. Additional graphics parameters maybe included in the call. Formula handling is nowsimilar to boxplot().o strwidth() and strheight() gain 'font' and 'vfont' arguments andaccept 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. fromlattice) as well as to base graphics.o Option "device.ask.default" replaces "par.ask.default" now itapplies also to grid.prompt().o plot.formula() only prompts between plots for interactivedevices (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 & DEFUNCTo In package installation, SaveImage: yes is defunct andlazyloading is attempted instead.o $ on an atomic vector or S4 object is now defunct.o Partial matching in [[ is now only performed if explicitlyrequested (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 separatepackage 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-compatibilityas(x, "double") coerces to "numeric".)o gpar(gamma=) in the grid package is now defunct.o Several S4 class definition utilities, get*(), have been saidto 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 isdeprecated, and these will be unavailable in R 2.8.0.(They are hardly used except in graphics devices, for whichthere 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 washighly locale- and device-dependent (it only did somethinguseful in single-byte locales on most devices) and font=5(base) or fontface=5 (grid) did the job it was intended to domore 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.INSTALLATIONo Tcl/Tk >= 8.3 (released in 2000) is now required to buildpackage tcltk.o configure first tries TCL_INCLUDE_SPEC and TK_INCLUDE_SPECwhen looking for Tcl/Tk headers. (The existing scheme didnot 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 canbe linked to a front-end via 'R CMD config --ldflags'.The tests/Embedding examples now work with a static Rlibrary.o Netscape (which was discontinued in Feb 2008) is no longerconsidered when selecting a browser.o xdg-open (the freedesktop.org interface tokfmclient/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 indirectories with names containing $(LIBnn) in the hope offinding 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.6respectively, for security.UTILITIESo Rdconv now removes empty sections including alias and keywordentries, 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 areused in file paths, since these are not in general portable.o R CMD check (via massage-examples.pl) now checks all exampleswith a 7 inch square device region on A4 paper, forlocale-independence and to be similar to viewing examples onan on-screen device.If a package declares an encoding in the DESCRIPTION file,the examples are assumed to be in that encoding when runningthe tests. (This avoids errors in running latin1 examples in aUTF-8 locale.)o R CMD check uses pdflatex (if available) to check the typesetversion of the manual, producing PDF rather than DVI. (Thisis a better check since the package reference manuals on CRANare in PDF.)o R CMD Rd2dvi gains a --encoding argument to be passed toR CMD Rdconv, to set the default encoding for conversions.If this is not supplied and the files are package sources andthe DESCRIPTION file contains an Encoding field, that is usedfor the default encoding.o available.packages() (and hence install.packages() etc) nowsupports subdirectories in a repository, andtools::write_PACKAGES() can now produce PACKAGES filesincluding subdirectories.o The default for 'stylepath' in Sweave's (default) RweaveLatexdriver can be set by the environment variableSWEAVE_STYLEPATH_DEFAULT: see ?RweaveLatex.C-LEVEL FACILITIESo Both the Unix and Windows interfaces for embedding now makeuse of 'const char *' declarations where appropriate.o Rprintf() and REprintf() now use 'const char *' for their formatargument -- this should reduce warnings when called from C++.o There is a new description of the interface for graphicsdevices in the 'R Internals' manual, and several new entrypoints. 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, evenif the current locale is not UTF-8 (and so enable text enteredin UTF-8 to be plotted). This is used by postscript(), pdf()and the windows() family of devices, as well as the newcairo-based devices.o More Lapack routines are available (and declared in R_Ext/Lapack.h),notably for (reciprocal) condition number estimation of complexmatrices.o Experimental utility R_has_slot supplementing R_do_slot.o There is a new public interface to the encoding info stored onCHARSXPs, getCharCE and mkCharCE using the enumeration typecetype_t.o A new header 'R_ext/Visibility.h' contains some definitions forcontrolling the visibility of entry points, and how to controlvisibility is now documented in 'Writing R Extensions'.BUG FIXESo pt(x, df) is now even more accurate in some cases (e.g. 12 insteadof 8 significant digits), when x^2 << df, thanks to a remark fromIan Smith, related to PR#9945.o co[rv](use = "complete.obs") now always gives an error if thereare no complete cases: they used to give NA ifmethod = "pearson" but an error for the other two methods.(Note that this is pretty arbitrary, but zero-length vectorsalways 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 variablewas completely missing for the rank methods but NA for thePearson method: it now gives NA in all cases.cor(use="pair") for the rank methods gave a matrix result withdimensions > 0 even if one of the inputs had 0 columns.o Supplying edit.row.names = TRUE when editing a matrix withoutrow 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_ fortheir 'sep' and 'collapse' arguments.o by() failed for 1-column matrices and dataframes. (PR#10506)However, to preserve the old behaviour, the default methodwhen operating on a vector still passes subsets of the vectorto 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 someextreme two-sample problems. (Reported by Wolfgang Huber.)o par(pch=) would accept a multi-byte string but only use thefirst byte. This would lead to incorrect results in an MBCSlocale 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, invalidtypes of 'length' were interpreted as -1 and hence reported asnegative. (length<- shared the code and hence the samemisinterpretations.)o A basic class "S4" was added to correspond to the "S4" objecttype, so that objects with this type will print, etc. Theclass is VIRTUAL, since all actual S4 objects must have a realclass.o Classes with no slots that contain only VIRTUAL classes are nowVIRTUAL, as was intended but confused by having an empty S4object as prototype. ## backed out temporarily ##o format.AsIs() discarded dimnames, causing dataframes with matrixvariables to be printed without using the column names, unlikewhat happens in S-PLUS (Tim Hesterberg, PR#10730).o xspline() and grid::grid.xspline() work in device coordinatesand now correct for anisotropy in the device coordinatesystem.o grid.locator() now indicates to the graphics device that it isis 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 localesnow work properly on Mac OS X. Note that locales withoutencoding specification always use UTF-8 encoding in Mac OS X(except for specials "POSIX" and "C") - this is different fromother 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 notrecognized because of a bug in caching the new definition.o jpeg() and png() no longer maintain a display list, as theyare not interactive devices.o Using attr(x, "names") <- value (instead of the correctnames<-) with 'value' a pairlist (instead of the correctcharacter vector) worked incorrectly. (PR#10807)o Using [<- to add a column to a data frame dropped otherattributes whereas [[<- and $<- did not: now all preserveattributes. (PR#10873)o File access functions such as file.exists(), file.info(),dirname() and unlink() now treat an NA filename as anon-existent file and not the file "NA".o r<foo>(), the random number generators, are now more consistentin 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 ofdoing so silently. (May help confused users such as PR#10766.)o gamma() was warning incorrectly for most negative values as beingtoo near a negative integer. This also affected otherfunctions making use of its C-level implementation.o dumpMethod() and dumpMethods() now work again.o package.skeleton() now also works for code_files with onlymetadata (e.g. S4 setClass) definitions; it handles S4 classes andmethods, producing documentation and NAMESPACE exports if requested.o Some methods package utilities (implicitGeneric(), makeGeneric())will be more robust in dealing with primitive functions (not auseful idea to call them with primitives, though)o Making a MethodsList from a function with no methods table willreturn an empty list, rather than cause an error (questionablya bug, but caused some obscure failures).o setAs() now catches 2 arguments in the method definition, ifthey do not match the arguments of coerce().o S4 methods with missing arguments in the definition are handledcorrectly when non-signature arguments exist, and check forconflicting 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 nolonger 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 notgives a warning (which will become an error in 2.8.0).o dump() and friends now warn that all S4 objects (even thosebased 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. Thiswas 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 thename space was unloaded.o getNativeSymbolInfo() was unaware of non-registered Fortrannames, 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 patchedBUG FIXESo src/extra/pcre has been updated to PCRE 7.6 (bugfix release).o unlink(..., recursive=TRUE) no longer crashes on some platformsif a directory cannot be opened.o Loading in 2.6.2 a saved workspace could give an unimportantwarning in a non-UTF-8 multibyte locale (in particular a CJKlocale on Windows) which is now suppressed.o print() methods are more consistent in returning the originalargument 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 columnswould have fitted into the window.o Creating a new page on an X11() device (by plot.new() orgrid.newpage()) did not flush out the XClearWindow call, sothe X11 window might not be refreshed immediately.o libtool has been updated to version 1.5.26, which avoidsmany spurious configure warnings on Darwin/Mac OS X.o l10n_info() now recognizes how Darwin/Mac OS X reportsLatin-1 locales (as charset ISO8859-1 rather than ISO-8859-1).o Checking examples which used grid (e.g. via lattice) withoutattaching grid no longer give errors from grid_plot_hook().o kappa(m, exact=TRUE) no longer wrongly uses 'exact=FALSE' when mis an 'lm' or 'qr' object because the kappa.tri(x, exact=TRUE)now works correctly.o help(topic, offline=TRUE) misbehaved when there were multiplematches to 'topic'. (PR#10859)o The 'multilib' changes on Linux broke the use ofsub-architectures without a main architecture.o source(echo=TRUE) would skip lines consisting entirely of theletter t. (PR#10923)o bzip2 has been updated to 1.0.5 (security fix).CHANGES IN R VERSION 2.6.2NEW FEATURESo colnames(DF) is now also fast for large dataframes DF withautomatic row.names. Note that the correct usage isnames(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 usingmultilib.BUG FIXESo A compilation problem on one system where glob was not foundhas 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 beforecoercing the dimensions to integer. (Reported by Allen McIntosh.)o persp() misreported errors in the y parameter. (Reported by AllenMcIntosh.)o source("clipboard", echo=TRUE) and file("clipboard", open="rt")gave spurious errors. (Reported by Fernando Saldanha.)o attributes<-() stripped any existing attributes before checkingthat 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{<name>}} was not rendered correctly to latex in Rdfiles for non-alphabetic arguments <name>.o In 2.6.1, curve(*, add=TRUE) used a wrong default 'xlim' when xcoordinates were logged.o The Java-based search in help.start() now only requires aJVM >= 1.4 (2.6.1 accidentally required >= 1.5).o The default method for range() was omitting 'na.rm' fornon-numeric objects such as those of class "Date". (PR#10508)o cut(x, breaks=<n>) misbehaved on a constant vector of negativevalues.o bxp(), the plotting engine of boxplot(), no longer plots stapleticks multiple times. (PR#10499)o The automatic detection of the domain for message translationwas not working correctly for messages in message(), warning()and stop() in packages other than 'base'.o The profile.nls() function misbehaved when encounteringnon-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. Thisinvolved passing of empty '...' arguments, and was spottedwhen using apply(x, 2, log).o par() no longer warns unnecessarily when asked to set new=FALSEon an unused graphics device.o plot.formula() was not passing on '...' when used with aone-sided formula.plot.formula() was not accepting expressions for annotationspassed to title(). (PR#10525)o pchisq(x, df=0, ncp=L) now returns the correct limit exp(-L/2) forx=0 and is no longer returning NaN for x > 0, L < 80. (PR#10551)o Non-ASCII characters were only working correctly in Hersheyfonts if these were specified by the 'vfont' argument totext() and not if specified as a font family.o There were several errors in Hershey$allowed, but the helppage listed the allowed combinations correctly.o text() no longer attempts to use 'vfont' with an expressionfor 'labels' (it was documented not to work).o fisher.test(simulate.p.value = TRUE) gave incorrect answersin 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 ofoutput when file = NULL. (PR#10534)o capture.output() now returns invisibly if output is written toa file/connection.o format.AsIs() did not remove the "AsIs" class and so could gointo an infinite loop.o summary.mlm() lost the names of the coefficients when therewas only one.o Rdconv was not marking examples files with an encoding ifthis 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 launchedby system(). Instead PR#1959 is handled by a simple errorhandler which will give an error message in circumstanceswhere none was given before.o The AIC() S4 generic in package stats4 no longer disablesdispatch of S3 methods for AIC().o The conflicts check in library() excluded all S4 generics, evenwhere they were unrelated to the function masked. It is nowmore selective (although still too generous to S4 generics).o proc.time() was missing a protect and could misbehave ifprovoked by gctorture(). (PR#10600)o The cut() and hist() methods for dates and datetimes are nowmore accurate for intervals of "months" and "years", thanks toMarc Schwarz.o url()/download.file() could segfault if the HTTP interactioninvolved a redirect to an address starting with '/' on thesame server.o Memory allocations used in format() and in an internal utilityfunction 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 toreturn 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 searchpattern. Thanks to Herve Pages for the bug report.o matplot(x, *) with default 'pch' did not plot columns from columnnumber 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.1NEW FEATURESo The "data.frame" and "factor" methods for [[ now supportthe 'exact' argument introduced in 2.6.0.o plot.lm() gains a new argument 'cex.caption' to allow thesize of the captions to be controlled.o A series of changes make the CHARSXP cache introduced in 2.6.0faster (and in some cases many times faster) in sessions witha 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 offauto-rotation in Ghostscript when generating PDF.o The canonical architecture is no longer checked when loadingpackages using a non-empty sub-architecture, since it ispossible to (e.g.) build packages for i386-pc-linux-gnu on boththat architecture and on x86_64-unknown-linux-gnu.o Deparsing will (if option warnIncomplete is set) warn onstrings longer than the parser limit (8192 bytes).o url() now uses the UserAgent header in http transactions inthe same way as download.file() (making use of option"HTTPUserAgent").BUG FIXESo iconv() is again able to translate character strings withembedded nuls (such as those in UCS-2).o new.packages() and update.packages() failed when called on anempty 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 spacein the binary headers to relocate dependent libraries into theframework.o R CMD build now computes the exclusion list on the copy itmakes: this avoids problems if the original sources containsymbolic links (which are resolved in the copy). Thanks toMichael 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 validcharacter strings, which made it impossible to specify symbolssuch as aleph (obtained by symbol("\300")) in a UTF-8 locale.o An event handling issue caused autorepeat functions tomisbehave with tcltk (notably scrollbars).o plot(sin, -5, 5) gives ylab 'sin(x)' again, where it resultedin 'x(x)' in 2.6.0. Further, plot(sin) again plots from[0,1] also in cases where a previously used coordinate systemdiffers.o curve() with unspecified 'from', 'to' and 'xlim' now reuses theprevious x limits, and not slightly larger ones.o It was intended that R code filenames in packages should startwith an ASCII letter or digits (and R CMD INSTALL uses that),but the test used in R CMD build ([A-Za-z0-9]) waslocale-specific (and excluded t to y in Estonian, forexample). (PR#10351)o 'R CMD build' could misbehave when faced with files with CRLFline endings *and* no line ending on the final line of thefile, removing the last byte of the file.o DF[i, j] failed in 2.6.0 if j was a logical vector selecting asingle column.o Unix x11() would fail if a valid 'display' was specified butDISPLAY was unset. (PR#10379)o postscript() was not always ignoring .Postscript.Options inthe workspace (where it should not have occurred).o help.search() would give an error if it found a badlyinstalled 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, weforce SHELL=/bin/bash (which is ok) in that case. [Only for2.6.x: another solution is used in 2.7.0.]o Deliberately using malformed source attributes no longercauses deparsing/printing of functions to crash R. (PR#10437)o R CMD check and R CMD INSTALL now work with (some) directorynames 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 toAntonio, Fabio di Narzo.o reshape() got column names out of sync with contents in somecases; found by Antonio, Fabio Di Narzo.o ar(x) for short 'x' (i.e. length <= 10) could fail because thedefault 'order.max' was >= length(x) which is non-sensical.o Keyboard events in getGraphicsEvent() could cause stackimbalance errors. (PR#10453)CHANGES IN R VERSION 2.6.0SIGNIFICANT USER-VISIBLE CHANGESo integrate(), nlm(), nlminb(), optim(), optimize() and uniroot()now have '...' much earlier in their argument list. Thisreduces the chances of unintentional partial matching butmeans that the later arguments must be named in full.o The default type for nchar() is now "chars". This is almostalways what was intended, and differs from the previous defaultonly for non-ASCII strings in a MBCS locale. There is a newargument 'allowNA', and the default behaviour is now to throwan error on an invalid multibyte string if type="chars" ortype="width".o Connections will be closed if there is no R object referring tothem. A warning is issued if this is done, either at garbagecollection or if all the connection slots are in use.NEW FEATURESo abs(), sign(), sqrt(), floor(), ceiling(), exp() and the gamma,trig and hyperbolic trig functions now only accept oneargument even when dispatching to a Math group method (whichmay 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 variablesinto factors, and leaves alone the levels of those which arefactors. (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 caseswhere the object is unchanged. (Beware: some code has beenwritten that invalidly assumes that they do duplicate, oftenwhen using .C/.Fortran(DUP=FALSE).)o as.complex(), as.double(), as.integer(), as.logical() andas.raw() are now primitive and internally generic forefficiency. They no longer dispatch on S3 methods foras.vector() (which was never documented). as.real() andas.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 searchpath.o attr() gains an 'exact = TRUE' argument to disable partialmatching.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 allowsemi-transparent colours to be used.o dev.interactive() regards devices with the displaylist enabledas interactive, and packages can register the names of theirdevices as interactive via deviceIsInteractive().o download.packages() and available.packages() (and functionswhich use them) now support in 'repos' or 'contriburl' eitherfile: plus a general path (including drives on a UNC path onWindows) or a file:/// URL in the same way as url().o dQuote() and sQuote() are more flexible, with renderingcontrolled by the new option 'useFancyQuotes'. This includesthe ability to have TeX-style rendering and directional quotes(the so-called 'smart quotes') on Windows. The default is touse directional quotes in UTF-8 locales (as before) and in theRgui console on Windows (new).o duplicated() and unique() and their methods in base gain anadditional 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 allinterfaces (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 clashesmany years ago, but partial matching was used.o stats:::.getXlevels() confines attention to factors since someusers expected R to treat unclass(<a factor>) as a numericvector.o grep(), strsplit() and friends now warn if incompatible setsof options are used, instead of silently using the documentedpriority.o gsub()/sub() with perl = TRUE now preserves attributes from theargument x on the result.o is.finite() and is.infinite() are now S3 and S4 generic.o jpeg(), png(), bmp() (Windows), dev2bitmap() and bitmap() havea 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 considerablyfaster.o New primitive nzchar() as a faster alternative tonchar(x) > 0 (and avoids having to convert to wide chars ina MBCS locale and hence consider validity).o The way old.packages() and hence update.packages() handlepackages with different versions in multiple packagerepositories has been changed. The first package encounteredwas 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 longerattempts to optimize in this case.o New options 'showWarnCalls' and 'showErrorCalls' to give aconcise traceback on warnings and errors. showErrorCalls=TRUEis 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 useof partial matching in $, argument matching and attr()respectively.o A device named as a character string in options(device =) is nowlooked for in the grDevices name space if it is not visiblefrom the global environment.o pmatch(x, y, duplicates.ok = TRUE) now uses hashing and so ismuch 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 saveand restore it.o New higher-order functions Reduce(), Filter() and Map().o [g]regexpr() gain an 'ignore.case' argument for consistency withgrep(). (This does change the positional matchingof arguments, but no instances of positional matching beyondthe second were found.)o relist() utility, an S3 generic with several methods, providingan 'inverse' for unlist(); thanks to a code proposal fromAndrew Clausen.o require() now returns invisibly.o The interface to reshape() has been revised, allowing somesimplified forms that did not work before, and somewhatimproved error handling. A new argument 'sep' has beenintroduced to replace simple usages of 'split' (the oldfeatures are retained).o rmultinom() uses a high-precision accumulator where available,and so is more likely to give the same result on differentplatforms (although it is still possible to get differentresults, and the result may differ from previous versions of R).o row() and col() now work on matrix-like objects such as dataframes, not just matrices.o Rprof() allows smaller values of 'interval' on machines thatsupport it: for example modern Linux systems supportinterval = 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 >= 1before it is regarded as shorthand for 1:x.o sessionInfo() now provides details about package name spacesthat are loaded but not attached. The output of sessionInfohas been improved to make it easier to read when it isinadvertently wrapped after being pasted into an emailmessage.o setRepositories() has a new argument 'ind' to allow selectionsto be made programmatically.o sprintf() no longer has a output string length limit.o storage.mode<- is now primitive, and hence makes fewer copiesof an object (none if the mode is unchanged). It is a littleless general than mode<-, which remains available. (See alsothe entry under DEFUNCT below.)o sweep() gains an argument 'check.margin = TRUE' which warnsabout mismatched dimensions.o The mathematical annotation facility (plotmath) now recognisesa symbol() function which forces the font to be a symbol font.This allows access to all characters in the Adobe Symbolencoding 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' onUnix-alikes and an emulation on Windows.o On Unix-alikes, system(, intern = TRUE) reports on very longlines that may be truncated, giving the line number of thecontent being read.o termplot() has a default for 'ask' that uses dev.interactive().It allows 'ylim' to be set, or computed to cover all theplots 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 itcomputes f(lower) and f(upper) only once, and it has new optionalarguments '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 topackage 'nlme'.o vignette() has a new argument 'all' to choose between showingvignettes in attached packages or in all installed packages.o New function within(), which is like with(), except that itreturns 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 areused (rather than silently treating them as fullytransparent).o New function xspline() to provide base graphics support ofX-splines (cf grid.xspline).o New function xyTable() does the 2D gridding "computations" used bysunflowerplot().o Rd conversion to HTML and CHM now makes use of classes, whichare set in the stylesheets. Editing R.css will change thestyles used for \env, \option, \pkg etc. (CHM styles are setat compilation time.)o The documented arguments of '%*%' have been changed to be xand y, to match S and the implicit S4 generic.o If members of the Ops group (the arithmetic, logical andcomparison operators) and '%*%' are called as functions,e.g. '>'(x, y), positional matching is always used. (It usedto be the case that positional matching was used for thedefault methods, but names would be matched for S3 and S4methods and in the case of '!' the argument name differedbetween 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 nowdeprecated).o Installing help for a package now parses the .Rd file onlyonce, 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. CHARSXPsare no longer duplicated and must not be modified in place.Developers should strive to only use mkChar (and mkString) forcreating new CHARSXPs and avoid use of allocString. A newmacro, CallocCharBuf, can be used to obtain a temporary charbuffer for manipulating character data. This patch waswritten by Seth Falcon.o The internal equivalents of as.complex, as.double, as.integerand as.logical used to handle length=1 arguments now acceptcharacter strings (rather than report that this is'unimplemented').o Lazy-loading a package is now substantially more efficient (inmemory saved and load time).o Various performance improvements lead to a 45% reductionin 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' thatallows programmers to disable partial matching (which will indue course become the default). The default value is exact=NAwhich causes a warning to be issued when partial matchingoccurs. When exact = TRUE, no partial matching will beperformed. When exact = FALSE, partial matching can occur andno warning will be issued. This patch was written by SethFalcon.o Many of the C-level warning / error messages (e.g. fromsubscripting) have been re-worked to give more detailedinformation on either the location or the cause of theproblem.o The S3 and S4 Math groups have been harmonized. Functionslog1p(), expm1(), log10() and log2() are members of the S3group, and sign(), log1p(), expm1(), log2(), cummax(),cummin(), digamma(), trigamma() and trunk() are members of theS4 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 thesub-second part of the current time where available.Initialization of the 1997 Knuth TAOCP generator is now donein R code, avoiding some C code whose licence status has beenquestioned.o The reporting of syntax errors has been made more user-friendly.METHODS PACKAGEo Packages using 'methods' have to have been installed in R 2.4.0or later (when various internal representations were changed).o Internally generic primitives no longer dispatch S4 methods onS3 objects.o load() and restoring a workspace attempt to detect and warn onthe loading of pre-2.4.0 S4 objects.o Making functions primitive changes the semantics of S4dispatch: these no longer dispatch on classes based on typesbut do dispatch whenever the function in the base name space iscalled.This applies to as.complex(), as.integer(), as.logical(),as.numeric(), as.raw(), expm1(), log(), log1p(), log2(),log10(), gamma(), lgamma(), digamma() and trigamma(), aswell 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 doesat last apply to all members and not just those already madeS4 generic.as.double() and as.real() are identical to as.numeric(), andnow 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 awarning.o The "structure" S4 class now has methods that implement theconcept of structures as described in the Blue Book--thatelement-by-element functions and operators leave structureintact unless they change the length. The informal behaviorof R for vectors with attributes was inconsistent.o The implicitGeneric() function and relatives have been added tospecify how a function in a package should look when methods aredefined for it. This will be used to ensure that generic versionsof functions in R core are consistent. See ?implicitGeneric.o Error messages generated by some of the functions in the methodspackage provide the name of the generic to provide morecontextual information.o It is now possible to use setGeneric(useAsDefault = FALSE) todefine 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 thatshowMethods(<genfun>, incl = TRUE) becomes a useful short cut.DEPRECATED & DEFUNCTo $ 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" aredefunct: use instead storage.mode(x) <- "double" andmode(x) <- "single".o In package installation, SaveImage: yes is deprecated infavour of LazyLoad: yes.o seemsS4Object (methods package) is deprecated in favour of isS4().o It is planned that [[exact=TRUE]] will become the default inR 2.7.0.UTILITIESo checkS3methods() (invoked by R CMD check) now checks thearguments of methods for primitive members of the S3 groupgenerics.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 definitelynot from an ISO-8859 encoding. This agrees with thelong-standing stipulation in 'Writing R Extensions', andcatches some packages with UTF-8 man pages.o R CMD check now warns on DESCRIPTION files with a non-portableEncoding 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, andalso emulates standard functions (such as shell()) onalternative R platforms.o R CMD check now (by default) attempts to latex the vignettesrather than just weave and tangle them: this will give a NOTEif there are latex errors.o R CMD check computations no longer ignore Rd \usage entries forfunctions for extracting or replacing parts of an object, so S3methods should use the appropriate \method{} markup.o R CMD check now checks for CR (as well as CRLF) line endings inC/C++/Fortran source files, and for non-LF line endings inMakefile[.in] and Makevars[.in] in the package 'src'directory. R CMD build will correct non-LF line endings insource files and in the make files mentioned.o Rdconv now warns about unmatched braces rather than silentlyomitting sections containing them. (Suggestion by BillDunlap, 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 defaultencoding 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 thoseare used by chooseCRANmirror(). The now exported functiongetCRANmirrors() can be used to get all known mirrors or onlythe ones that are OK.o R CMD SHLIB gains arguments --clean and --preclean to clean upintermediate files after and before building.o R CMD config now knows about FC and FCFLAGS (used for F9xcompilation).o R CMD Rdconv now does a better job of rendering quotes intitles in HTML, and \sQuote and \dQuote into text on Windows.C-LEVEL FACILITIESo New utility function alloc3DArray similar to allocMatrix.o The entry point R_seemsS4Object in Rinternals.h has not beenneeded since R 2.4.0 and has been removed. Use IS_S4_OBJECTinstead.o Applications embedding R can use R_getEmbeddingDllInfo() toobtain DllInfo for registering symbols present in theapplication itself.o The instructions for making and using standalone libRmath havebeen moved to the R Installation and Administration manual.o CHAR() now returns (const char *) since CHARSXPs should nolonger be modified in place. This change allows compilers towarn or error about improper modification. Thanks to HervePages for the suggestion.o acopy_string is a (provisional) new helper function thatcopies character data and returns a pointer to memoryallocated using R_alloc. This can be used to create a copy ofa string stored in a CHARSXP before passing the data on to afunction that modifies its arguments.o asLogical, asInteger, asReal and asComplex now accept STRSXPand CHARSXP arguments, and asChar accepts CHARSXP.o New entry point R_GE_str2col listed in R_ext/GraphicsEngine.hfor 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 support64-bit platforms (e.g. Win64) with a 32-bit 'long' type.o The type of the last two arguments of getMatrixDimnames (non-APIbut mentioned in R-exts.texi and in Rinternals.h) has beenchanged to 'const char **' (from char **).o R_FINITE now always resolves to the function call R_finite inpackages (rather than sometimes substituting isfinite). Thisavoids some issues where R headers are called from C++ codeusing 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 theheaders, as they include other headers which on some OSesshould 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 supposedto be used before Rinternals.h.o Including C system headers can be avoided by defining NO_C_HEADERSbefore including R headers. This is intended to be used fromC++ code, and you will need to include C++ equivalents such as<cmath> before the R headers.INSTALLATIONo 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 standardpackages.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 C99compiler which will have 'isfinite'. (If that is missing, wetest 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 indoc/manual (as the latest versions have an incompatiblelicence). You will need to ensure that your texinfo and/orTeX installations supply them.o wcstod is now required for MBCS support.o There are some experimental provisions for building on Cygwin.PACKAGE INSTALLATIONo The encoding declared in the DESCRIPTION file is now used asthe default encoding for .Rd files.o A standard for specifying package license information in theDESCRIPTION License field was introduced, see 'Writing RExtensions'. In addition, files LICENSE or LICENCE in a packagetop-level source directory are now installed (so putting copiesinto the 'inst' subdirectory is no longer necessary).o install.packages() on a Unix-alike now updatesdoc/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 cleanup (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 aprevious installation (as if that had used --clean) beforeattempting to install.R CMD INSTALL will now run R CMD SHLIB in the 'src' directoryif src/Makevars is present, even if there are no source fileswith 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 ispreceded by etc/Makeconf rather than share/make/shlib.mk.Thus the makefiles read are R_HOME/etc/Makeconf, src/Makefilein the package and then any personal Makevars files.o R CMD SHLIB used to support the use of 'OBJS' in Makevars, butthis was changed to 'OBJECTS' in 2001. The undocumentedalternative of 'OBJS' has finally been removed.o R CMD check no longer issues a warning about no data setsbeing present if a lazyload db is found (as determined by thepresence of Rdata.rdb, Rdata.rds, and Rdata.rdx in the 'data'subdirectory.BUG FIXESo charmatch() and pmatch() used to accept non-integer values for'nomatch' even though the return value was documented to beinteger. Now 'nomatch' is coerced to integer (rather than theresult being coerced to the type of 'nomatch').o match.call() no longer 'works' outside a function unless'definition' is supplied. (Under some circumstances it usedto 'work', matching itself.)o The formula methods of boxplot, cdplot, pairs and spineplotnow attach 'stats' so that model.frame() is visible wherethey evaluate it.o Date-time objects are no longer regarded as numeric byis.numeric().o methods("Math") did not work if 'methods' was not attached.o readChar() read an extra empty item (or more than one) beyondthe end of the source; in some conditions it would terminateearly when reading an item of length 0.o Added a promise evaluation stack so interrupted promiseevaluations 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 basicdata types.o <data frame>[[i, j]] now works if 'i' is character.o write.dcf() no longer writes NA fields (PR#9796), and workscorrectly 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() andpbinom().o mle() had problems with the L-BFGS-B in the no-parameter caseand consequentially also when profiling 1-parameter models(fix thanks to Ben Bolker).o Two bugs fixed in methods that in involve the "..." argument inthe generic function: previously failed to catch methods thatjust dropped the "..."; and use of callGeneric() with no argumentsfailed in some circumstances when "..." was a formal argument.o sequence() now behaves more reasonably, although notback-compatibly for zero or negative input.o nls() now allows more peculiar but reasonable ways of being called,e.g., with data=list(<uneven lengths>) or a model without variables.o match.arg() was not behaving as documented whenseveral.ok=TRUE (PR#9859), gave spurious warnings when 'arg'had the wrong length and was incorrectly documented (exactmatches are returned even when there is more than one partialmatch).o The data.frame method for split<-() was broken.o The test for -D__NO_MATH_INLINES was badly broken and returnedtrue 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 fordetermining the boundaries of shapes. Problem reportedby Hadley Wickham; symptom was error message:"Polygon edge not found".o str() is no longer slow for large POSIXct objects. Its outputis also slightly more compact for such objects; implementationvia new optional argument 'give.head'.o strsplit(*, fixed=TRUE), potentially iconv() and internal stringformatting is now faster for large strings, thanks to reportPR#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" properlywhen plotting a function. The argument lists to curve() andplot.function() have been modified slightly as part of thefix.o julian() was documented to work with POSIXt origins, but didnot work with POSIXlt ones. (PR#9908)o Dataset HairEyeColor has been corrected to agree withFriendly (2000): the change involves the breakdown of theBrown hair / Brown eye cell by Sex, and only totals over Sexare 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" werepackage environments, although misguided users could use sucha name in attach().o spline() and splinefun() with method = "periodic" could returnincorrect results when length(x) was 2 or 3.o getS3method() could fail if the method name contained a regexpmetacharacter such as "+".o help(<a character vector>) now uses the name and not thevalue of the vector unless it has length exactly one, soe.g. help(letters) now gives help on 'letters'.(Related to PR#9927)o Ranges in chartr() now work better in CJK locales, thanks toEi-ji Nakama.*************************************************** ** 2.5 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.5.1 patchedINSTALLATIONo doc/manual now includes the texinfo support file epsf.tex whichbasic TeX installations often omit.BUG FIXESo Attempting to do in-memory serialization of an object requiringmore than 1Gb might have failed.o Using formals<- on a function whose body was NULL workedincorrectly. (PR#9758)o logb() is now strictly a wrapper for log(), so if S4 methodsare 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 forreal '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 withnon-default settings of options("OutDec").o S4 method dispatch for group generics (and %*%) failed to passarguments to methods as promises and so in some circumstancesmethods could change their arguments. (Seen for the 'Math'group with package Matrix.)o The print() method for "ts" now handles quarterly and monthlyseries which do not start at the beginning of a quarter ormonth 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 andy had multiple S3-style classes.o The workaround for seeking on > 2Gb files did not work correctlyon 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.1NEW FEATURESo density(1:20, bw = "SJ") now works as bw.SJ() now tries a largersearch interval than the default (lower, upper) if it does notfind a solution within the latter.o The output of library() (no arguments) is now sorted by librarytrees in the order of .libPaths() and not alphabetically.o R_LIBS_USER and R_LIBS_SITE feature possible expansion ofspecifiers for R version specific information as part of thestartup 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 theinput line is tokenized in the readline-based terminalinterface for object- and file-name completion.This allows it to be tuned for people who use their space barvs those who do not. The default now allows filename-completionwith +-* in the filenames.o If the srcfile argument to parse() is not NULL, it will be addedto the result as a "srcfile" attribute.o It is no longer possible to interrupt lazy-loading (which wasonly at all likely when lazy-loading environments), whichwould leave the object being loaded in an unusable state.This is a temporary measure: error-recovery when evaluatingpromises will be tackled more comprehensively in 2.6.0.INSTALLATIONo 'make check' will work with --without-iconv, to accommodatebuilding on AIX where the system iconv conflicts withlibiconv 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 stylesheet: in recent versions of makeinfo the markup such as @filewas being lost in the HTML rendering.o The use of inlining has been tweaked to avoid warnings fromgcc >= 4.2.0 when compiling in C99 mode (which is the defaultfrom configure).BUG FIXESo 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 anunrelated change prior to 2.4.1. This allowed print() andshow() to bounce badly constructed S4 objects betweenthemselves indefinitely.o Prediction of the seasonal component in HoltWinters() was onestep out at one point in the calculations.decompose() incorrectly computed the 'random' component for amultiplicative fit.o Wildcards work again in unlink() on Unix-alikes (they did notin 2.5.0).o When qr() used pivoting, the coefficient names in qr.coef() werenot pivoted to match. (PR#9623)o UseMethod() could crash R if the first argument was not acharacter string.o R and Rscript on Unix-alikes were not accepting spaces in -earguments (even if quoted).o Hexadecimal integer constants (e.g. 0x10L) were not being parsedcorrectly on platforms where the C function atof did notaccept hexadecimal prefixes (as required by C99, but notimplemented in MinGW as used by R on Windows). (PR#9648)o libRlapack.dylib on Mac OS X had no version information andsometimes an invalid identification name.o Rd conversion of \usage treated '\\' as a single backslash inall but latex: it now acts consistently with the otherverbatim-like environments (it was never 'verbatim' despitethe documentation).\code{\.} is now rendered as '\.' in all formats, asdocumented (it was not the case for latex conversion).codoc() (and checkDocStyle() and checkDocUsage()) now applythe same transformations to \usage as Rd conversion does,so {, % and \\ in strings in usages will now be relatedcorrectly to the help files.o rbind() failed if the only data frame had 0 rows. (PR#9657)o <a data.frame>[i, j] could sometimes select the wrong columnwhen j is numeric if there are duplicate column names.o sample(x, size, replace=TRUE, prob) had a memory leak if10000 < size <= 100000.o x <- cbind(1:2); rownames(x) <- factor(c("A",NA)) now longersegfaults.o R CMD BATCH no longer assumes Sys.unsetenv() is supported (itis not on older Solaris systems).o median() returned a logical result when it was 'NA': it nowreturns an NA of appropriate type (e.g. integer or double).o grep(fixed = TRUE, perl = TRUE) ignored 'fixed', although itwas 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 wasinteger or for an over-determined system.qr.solve() for an under-determined system produces asolution 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 hencecurrently defined via .local()} now works.o [g]sub(fixed=TRUE, useBytes=FALSE) could substitute in thewrong place in an MBCS locale.gregexpr() could give incorrect answers in MBCS locales forperl = 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 shownin legacy quartz() device.o formatC() now limits 'digits' to 50 to avoid problems inC-level sprintf in some OSes.o seq.int(x, y, by=z) gave 'x' (and not an error) if0 > (y-x)/z > -1.o promptClass() now lists methods, including those for generics inother attached packages.o Connection-related functions such as readBin() no longer crashwhen 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 exactlythe variable names needed to fit the model: variables used onthe LHS only are no longer required and further variables areallowed.o plot.hclust() had a 'out by one' error, and ignored the lastobject when computing the window region (and could overrunarrays).o deriv() was creating results with double (and not integer) dims.o The unserialize code (e.g. as called by load()) looked for afunction 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 wronganswers for nu < 0. (Reported by Hiroyuki Kawakatsu.)o [g]sub could confuse a trailing byte '\' for a backreferencein MBCSs where '\' can occur as a trailing byte (not UTF-8 norEUC-JP, but SJIS and the CJK character sets used on Windows).(PR#9751)CHANGES IN R VERSION 2.5.0USER-VISIBLE CHANGESo 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 notconverted to dimnames by as.matrix(). (Consequently, e.g.,t(.) for such data frames has NULL column names.) Thischange leads to memory reductions in several places, but canbreak code which assumes character dimnames for data framesderived from matrices.No existing R object is regarded as having 'automatic' rownames, and it may be beneficial to recreate such objects viaread.table() or data.frame().o Using $ on an atomic vector now raises a warning, as does useon an S4 class for which a method has not been defined.o The Unix-alike readline terminal interface now doescommand-completion for R objects, incorporating thefunctionality formerly in package 'rcompletion' by DeepayanSarkar. This can be disabled by setting the environmentvariable R_COMPLETION=FALSE when starting R (e.g. in~/.Renviron). (Note that when this is enabled, filenamecompletion no longer works for file paths containing Roperators such as '+' and '-'.)NEW FEATURESo abbreviate() no longer has an 8191 byte limit on the size ofstrings it can handle.o abs(x) now returns integer for integer or logical arguments.o apropos() has a new argument 'ignore.case' which defaults toTRUE, potentially matching more than previously, thanks to asuggestion by Seth Falcon.o args(), str() and print() now give the argument lists of primitivefunctions.o as.matrix() gains the '...' argument that several packages haveassumed it always had (and S-PLUS has).o Manipulation of integers as roman numerals via as.roman() inpackage utils.o attr() no longer treats name = NA_character_ as meaningname = "NA".o binom.test() now allows a 'fuzz' for calculated integer valuesin its x and n arguments.o boxplot(*, notch = TRUE) now warns when notches are outsidehinges; related to PR#7690.o New function callCC() providing a downward-only version ofScheme's call with current continuation.o capabilities() now has a "profmem" entry indicating whetherR 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 therepresentation of the row names.o commandArgs() has a new 'trailingOnly' argument to be used inconjunction 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 thatdifferent types (logical, integer, double, character andcomplex) of NAs are distinguished, and "S_compatible" tosuppress the use of R-specific features such as 123L and todeparse integer values of a double vector with a trailingdecimal point.The 'keepInteger' option now uses the suffix 'L' rather thanas.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 notfor 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" intheir defaults for the 'control' argument.o detach() now takes another argument, unload, which indicateswhether or not to unload the package and then only cleansup the S4 methods if the package successfully unloads.o There are new constants NA_integer_, NA_real_, NA_complex_ andNA_character_ to denote NAs of those types, and they will beused in deparsing in place of as.integer(NA) etc unless.deparseOpts() includes "S_compatible".o dev.print() now recognizes 'screen devices' as all those withan enabled display list, rather than a hard-coded set.o Objects of class "difftime" are now handled more flexibly. Theunits of such objects can now be accessed via a units()function, which also has a replacement form, and there areconversion methods to and from numeric, which also allow thespecification of units. Objects of this class can also bestored 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 ofenvironments such as "namespace:base".This is now used by str().o New function env.profile() provides R level access to summarystatistics on environments. In a related patch, new.env()now allows the user to specify an initial size for a hashedenvironment.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 embeddedapplication 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 forformatting unordered (itemize) and ordered (enumerate) lists.o The statistics reported when gcinfo(TRUE) are now of the amountsused (in Mb) and not of the amounts free (which are not reallyrelevant 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 ofmodel.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 aboutupdating the new instance in place, thereby reducingcopying.o install.packages(dependencies = NA) is a new default, which isto install essential dependencies when installing fromrepositories to a single library. As a result of this change,update.packages() will install any new dependencies of thepackages it is updating (alongside the package in the samelibrary tree).If 'lib' is not specified or is specified of length one andthe chosen location is not a writable directory,install.packages() offers to create a personal librarydirectory for you if one does not already exist, and toinstall 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 nolonger internally S3 generic, nor can S4 methods be writtenfor them.The "factor" methods of is.integer and is.numeric have beenreplaced 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 forefficiency 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 methodof 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 messageswith and without newlines. There is a new message classpackageStartupMessage() that can be suppressed separately.o A new function, method.skeleton() writes a skeleton version ofa call to setMethod() to a file, with correct arguments andformat, 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 newoptions to help better analyze (non-)convergence of nls(),thanks to Kate Mullen.nls() and summary(nls()) now contain more information and alsoprint information about convergence.o options(device = ) now accepts a function object as well asthe name of a function.o pdf() supports new values for 'paper' of "US" (same as"letter"), "a4r" and "USr" (the latter two meaning rotated tolandscape). 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() forinputs which are atomic vectors without classes (called bypmax/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 blackand white) via 'setgray', which gives more widely acceptableoutput. There are options to write pure RGB, CMYK or gray viathe new argument 'colormodel'.o rbind.data.frame() now ignores all zero-row inputs, as well aszero-column inputs (which it used to do, undocumented). Thisis because read.table() can create zero-row data frames withNULL 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 packageutils.o rgb() now accepts the red, green and blue components in asingle matrix or data frame.o New utility function RShowDoc() in package 'utils' to find anddisplay manuals and other documentation files.o New .row_names_info() utility function finds the number of rowsefficiently 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, thanksto a patch from Gavin Simpson.o Experimental 'verbose' argument for selectMethod(). Might bereplaced later by a better interface for method selectioninspection.o Added links to source files to the parsing routines, so thatsource() can now echo the original source and comments (ratherthan 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 iftz != "".o str.default() typically prints fewer entries of logical vectors.o The RweaveLatex driver for Sweave() now supports two newoptions: expand=FALSE, to show chunk references in the output,and concordance=TRUE, to output the concordance between inputand output lines.o system() now takes the same set of arguments on all platforms,with those which are not applicable being ignored with awarning. Unix-alikes gain 'input' and 'wait', and Windowsgains 'ignore.stderr'.o system.time() and proc.time() now return an object of class"proc_time" with a print() method that returns a POSIX-likeformat with names.o Sys.getenv() has a new argument 'unset' to allow unset and setto "" to be distinguished (if the OS does). The results ofSys.getenv() are now sorted (by name).o New function Sys.glob(), a wrapper for the POSIX.2 functionglob(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' ratherthan 'putenv' where the former is available.o New function Sys.unsetenv() to remove environment variables(on systems where unsetenv is implemented or putenv can removevariables, such as on Windows).o text(), mtext(), strheight(), strwidth(), legend(), axis(),title(), pie(), grid.text() and textGrob() all attempt tocoerce non-language annotation objects (in the sense of is.object)to character vectors. This is principally intended to coverfactors and POSIXt and Date objects, and is done via thenew 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 somigrate from 'utils' to 'base'.o union(), interect(), setdiff() and setequal() now coerce theirarguments to be vectors (and they were documented only toapply to vectors).o uniroot() now works if the zero occurs at one of the ends ofthe interval (suggestion of Tamas Papp).o There is a new function View() for viewing matrix-likeobjects in a spreadsheet, which can be left up whilst R isrunning.o New function withVisible() allows R level access to thevisibility flag.o zip.file.extract() has been moved to package utils.o A few more cases of subassignment work, e.g. <raw>[] <- <list>and <vector>[] <- <expression>, with suitable coercion of the LHS.o There is a warning if \ is used unnecessarily in a string whenbeing parsed, e.g. "\." where probably "\\." was intended.("\." is valid, but the same as ".".) Thanks to Bill Dunlapfor the suggestion.o Introduced the suffix L for integer literals to createinteger rather than numeric values, e.g. 100L, 0x10L, 1e2L.o Set the parser to give verbose error messages in case ofsyntax errors.o The class "LinearMethodsList" has been extended and will beused to create list versions of methods, derived from themethods tables (environments). The older recursive"MethodsList" class will be deprecated (by the release of2.5.0 if possible).o There are more flexible ways to specify the default librarysearch path. In addition to R_LIBS and .Library, there are.Library.site (defaults to R_HOME/site-library) andR_LIBS_USER (defaults to a platform- and version-specificdirectory in ~/R). See ?.libPaths for details.o LAPACK has been updated to version 3.1.0. This should causeonly small changes to the output, but do remember that the signof eigenvectors (and principal components) is indeterminate.o PCRE has been updated to version 7.0.o Several functions handle row names more efficiently:- read.table() and read.DIF() make use of integer row nameswhere appropriate, and avoid at least one copy in assigningthem.- data.frame() and the standard as.data.frame() methods avoidgenerating long dummy row names and then discarding them.- expand.grid() and merge() generate compact 'automatic' rownames.- data.matrix() and as.matrix.data.frame() have a new argument'rownames.force' that by default drops 'automatic' row names.o <data frame>[i, j] is substantially more memory-efficient whenonly a small part of the data frame is selected, especiallywhen (part of) a single column is selected.o Command-line R (and Rterm.exe under Windows) accepts the options'-f filename', '--file=filename' and '-e expression' to followother script interpreters. These imply --no-save unless--save is specified.o Invalid bytes in character strings in an MBCS now deparse/printin the form "\xc1" rather than "<c1>", which means they can beparsed/scanned.o Printing functions (without source attributes) and expressionsnow preserves integers (using the L suffix) and NAs (usingNA_real_ etc where necessary).o The 'internal' objects .helpForCall, .tryHelp and topicName areno longer exported from 'utils'.o The internal regex code has been upgraded to glibc 2.5 (from 2.3.6).o Text help now attempts to display files which have an \encodingsection in the specified encoding via file.show().o R now attempts to keep track of character strings which areknown to be in Latin-1 or UTF-8 and print or plot themappropriately in other locales. This is primarily intendedto make it possible to use data in Western European languagesin both Latin-1 and UTF-8 locales. Currently scan(),read.table(), readLines(), parse() and source() allowencodings to be declared, and console input in suitablelocales is also recognized.New function Encoding() can read or set the declared encodingsfor a character vector.o There have been numerous performance improvements to the dataeditor on both Windows and X11. In particular, resizing thewindow works much better on X11.o Packages graphics and grid no longer require grDevices, asthey might be used only with third-party devices.DEPRECATED & DEFUNCTo symbol.C() and symbol.For() are defunct, and have been replacedby wrappers that give a warning.o Calling a builtin function with an empty argument is now alwaysan error.o The autoloading of ts() is defunct.o The undocumented reserved word GLOBAL.ENV has been removed.(It was yet another way to get the value of the symbol.GlobalEnv.)o The deprecated behaviour of structure() in adding a class whenspecifying with "tsp" or "levels" attributes is now defunct.o unix() is now finally defunct, having been deprecated forat least seven years.o Sys.putenv() is now deprecated in favour of Sys.setenv(),following the POSIX recommendation.o Building R with --without-iconv is deprecated.o Using $ on an atomic vector is deprecated (it was previouslyvalid and documented to return NULL).o The use of storage.mode<- for other than standard types (andin particular for value "single") is deprecated: use mode<-instead.INSTALLATIONo A suitable iconv (e.g. from glibc or GNU libiconv) isrequired. For 2.5.x only you can build R without it byconfiguring using --without-iconv.o There is support again for building on AIX (tested on 5.2 and 5.3)thanks to Ei-ji Nakama.o Autoconf 2.60 or later is used to create 'configure'. Thismakes a number of small changes, and incorporates the changesto the detection of a C99-compliant C compiler backported for2.4.1.o Detection of a Java development environment was added such thatpackages don't need to provide their own Java detection. Newlyadded make variables are JAVAC, JAVAH, JAR and JAVA_CPPFLAGS.R CMD javareconf was updated to look for the correspondingJava tools as well.In addition, Java detection honors user-supplied environmentvariables JAVA_CPPFLAGS, JAVA_LIBS and JAVA_LD_LIBRARY_PATH.o Added workaround for reported non-POSIX sh on OSF1. (PR#9375)o 'make install-strip' now works, stripping the executables andalso the shared libraries and modules on platforms where'libtool' knows how to do so.o Building R as a shared library and standalone nmath nowinstalls pkg-config files 'libR.pc' and 'libRmath.pc' respectively.o Added test for insufficiently complete implementation of sigaction.C-LEVEL FACILITIESo Functions str2type, type2char and type2str are now available inRinternals.h.o Added support for Objective C in R and packages (if available).o R_ParseVector() has a new 4th argument 'SEXP srcfile' allowingsource references to be attached to the returned expression list.o Added ptr_R_WriteConsoleEx callback which allows consoles todistinguish between regular output and errors/warnings.To ensure backward compatibility it is only used ifptr_R_WriteConsole is set to NULL.UTILITIESo Additional Sweave() internal functions are exported to helpwriting new drivers, and RweaveLatexRuncode() is now createdusing a helper function (all from a patch submitted by SethFalcon).o The following additional flags are accessible from R CMD config:OBJC, OBJCFLAGS, JAR, JAVA, JAVAC, JAVAH, JAVA_HOME, JAVA_LIBSand JAVA_CPPFLAGS.o R CMD build now takes the package name from the DESCRIPTIONfile and not from the directory. (PR#9266)o checkS3methods() (and hence R CMD check) now checks agreementwith primitive internal generics, and checks for additionalarguments in methods where the generic does not have a '...'argument.codoc() now knows the argument lists of primitive functions.o R CMD INSTALL and R CMD REMOVE now use as the default library(if -l is not specified) the first library that would be usedif R were run in the current environment (and they run R tofind it).o There is a new front-end Rscript which can be used for #!scripts and similar tasks. See help("Rscript") and 'AnIntroduction to R' for further details.o R CMD BATCH (not Windows) no longer prepends'invisible(options(echo = TRUE))' to the input script. Thiswas the default unless --slave is specified and the latter isno longer overridden.On all OSes it makes use of the -f argument to R, sofile("stdin") can be used from BATCH scripts.On all OSes it reports proc.time() at the end of the scriptunless q() is called with options to inhibit this.o R CMD INSTALL now prepends the installation directory (ifspecified) to the library search path.o Package installation now re-encodes R files and the NAMESPACEfile if the DESCRIPTION file specifies an encoding, and setsthe encoding used for reading files in preparing forLazyData. This will help if a package needs to be used in(say) both latin1 and UTF-8 locales on different systems.o R CMD check now reports on non-ASCII strings in datasets.(These are a portability issue, which can be alleviated bymarking their encoding: see 'Writing R Extensions'.)o Rdiff now converts CRLF endings in the target file, andconverts UTF-8 single quotes in either to ASCII quotes.o New recommended package 'codetools' by Luke Tierney providescode-analysis tools. This can optionally be used by 'R CMDcheck' to detect problems, especially symbols which are notvisible.o R CMD config now knows about LIBnn .o New recommended package 'rcompgen' by Deepayan Sarkarprovides support for command-line completion under the Unixterminal interface (provided readline is enabled) and theWindows Rgui and Rterm front ends.BUG FIXESo gc() can now report quantities of 'Vcells' in excess of 16Gb on64-bit systems (rather than reporting NA).o Assigning class "factor" to an object now requires it hasinteger (and not say double) codes.o structure() ensures that objects with added class "factor" haveinteger codes.o The "formula" and "outer" attributes of datasets 'ChickWeight','CO2', 'DNase', 'Indometh', 'Loblolly', 'Orange' and 'Theoph'now have an empty environment and not the environment used todump the datasets in the package.o Dataset 'Seatbelts' now correctly has class c("mts", "ts").o str() now labels classes on data frames more coherently.o Several 'special' primitives and .Internals could returninvisibly if the evaluation of an argument led to thevisibility flag being turned off. These includedas.character(), as.vector(), call(), dim(), dimnames(),lapply(), rep(), seq() and seq_along(). Others (e.g. dput()and print.default()) could return visibly when this was notintended.o Several primitives such as dim() were not checking the numberof arguments supplied before method dispatch.o Tracing of primitive functions has been corrected. It shouldnow be the case that tracing either works or is not allowedfor all primitive functions. (Problems remain if you make aprimitive into a generic when it is being traced. To be fixedlater.)o max.col() now omits infinite values in determining therelative tolerance.o R CMD Sweave and R CMD Stangle now respond to --help and --versionlike other utilities.o .libPaths() adds only existing directories (as it wasdocumented to, but could add non-directories).o setIs() and setClassUnion() failed to find some existingsubclasses and produced spurious warnings, now fixed.o data.frame() ignored 'row.names' for 0-column data frames, andno longer treats an explicit row.names=NULL differently fromthe default value.o identical() looked at the internal structure of the'row.names' attribute, and not the value visible at R level.o abline(reg) now also correctly works with intercept-only lmmodels, and abline() warns more when it's called illogically.o warning() was truncating messages atgetOption("warning.length") - 1 (not as documented), with noindication. It now appends '[... truncated]'.o Stangle/Sweave were throwing spurious warnings if options'result' or 'strip.white' were unset.o all.equal() was ignoring 'check.attributes' for list andexpression targets, and checking only attributes on raw vectors.Logical vectors were being compared as if they were numeric,(with a mean difference being quoted).o Calculating the number of significant digits in a number wasitself subject to rounding errors for digits >= 16. Thecalculation has been changed to err on the side of slightlytoo few significant digits (but still at least 15) rather thanfar too many. (An example is print(1.001, digits=16).)o unlink() on Unix-alikes failed for paths containing spaces.o substr() and friends treated NA 'start' or 'stop' incorrectly.o merge(x, y, all.y = TRUE) would sometimes incorrectly returnlogical columns for columns only in y when there were nocommon rows.o read.table(fn, col.names=) on an empty file returned NULLcolumns, rather than logical(0) columns (which is what resultsfrom reading a file with just a header).o grid.[xy]axis(label=logical(0)) failed.o expression() was unnecessarily duplicating arguments.o as.expression(<list>) returned a single-element expressionvector, which was not compatible with S: it now copies listselement-by-element.o supsmu(periodic = TRUE) could segfault. (PR#9502, detectionand patch by Bill Dunlap.)o pmax/pmin called with only logical arguments did not coerce tonumeric, although they were documented to do so (as max/mindo).o methods() did not know that cbind() and rbind() are internallygeneric.o dim(x) <- NULL removed the names of x, but this was alwaysundocumented. It is not clear that it is desirable but it isS-compatible and relied on, so is now documented.o which(x, arr.ind = TRUE) did not return a matrix (asdocumented) if 'x' was an array of length 0.o C-level duplicate() truncated CHARSXPs with embedded nuls.o Partial matching of attributes was not working as documentedin some cases if there were more than two partial matches orif "names" was involved.o data(package=character(0)) was not looking in ./data asdocumented.o summary.mlm() failed if some response names were "" (as caneasily happen if cbind() is used).o The postscript() and pdf() drivers shared an encoding listbut used slightly different formats. This caused problems ifboth were used with the same non-default encoding in the samesession. (PR#9517)o The data editor was not allowing Inf, NA and NaN to be enteredin numerical columns. It was intended to differentiatebetween empty cells and NAs, but did not do so: it now doesso for strings.o supsmu() could segfault if all cases had non-finite values.(PR#9519)o plnorm(x, lower.tail=FALSE) was returning the wrong tail forx <= 0. (PR#9520)o which.min() would not report a minimum of +Inf, andanalogously for which.max(). (PR#9522)o 'R CMD check' could fail with an unhelpful error when checkingRd files for errors if there was only one file and that had aserious error. (PR#9459)o try() has been reimplemented using tryCatch() to solve twoproblems with the original implementation: (i) try() would runnon-NULL options("error") expressions for errors within a try, and(ii) try() would catch user interrupts.o str(obj) could fail when obj contained a dendrogram.o Using <data frame>[, <last column>] <- NULL failed (PR#9565)o choose(n, k) could return non-integer values for integer n andsmall k on some platforms.o nclass.scott(x) and nclass.FD(x) no longer return NaN when var(x)or IQR(x) (respectively) is zero.hist() now allows breaks = 1 (which the above patch willreturn), but not breaks = Inf (which gave an obscure error).o strptime("%j") now also works for the first days of Feb-Dec.(PR#9577)o write.table() now recovers better if 'file' is an unopenedconnection. (It used to open it for both the column names andthe data.)o Fixed bug in mosaicplot(sort=) introduced by undocumentedchange in R 2.4.1 (changeset r39655).o contr.treatment(n=0) failed with a spurious error message.(It remains an error.)o as.numeric() was incorrectly documented: it is identical toas.double.o jitter(rep(-1, 3)) gave NaNs. (PR#9580)o max.col() was not random for a row of zeroes. (PR#9542)o ansari.test(conf.int=TRUE, exact=FALSE) failed.o trace() now works on S3 registered methods, by modifying theversion in the S3 methods table.o rep(length=1, each=0) segfaulted.o postscript() could overflow a buffer if used with a long'command' argument.o The internal computations to copy complete attribute lists didnot copy the flag marking S4 objects, so the copies no longerbehaved like S4 objects.o The C code of nlminb() was altering a variable withoutduplicating it. (This did not affect nlminb() but would haveif the code was called from a different wrapper.)o smooth(kind = "3RS3R") (the current default) used .C(DUP =FALSE) but altered its input argument. (This was masked byduplication in as.double.)o The signature for the predefined S4 method for as.character()was missing '...' .o readBin(<raw vector>) could read beyond the end of the vectorwhen size-changing was involved.o The C entry point PrintValue (designed to emulate auto-printing)would not find show() for use on S4 objects, and did not havethe same search path (for show(), print() and print() methods)as auto-printing. Also, auto-printing and print() of S4objects would fail to find 'show' if the methods name space wasloaded but the package was not attached (or otherwise not inthe search path).o print() (and auto-printing) now recognize S4 objects even when'methods' is not loaded, and print a short summary rather thandump the internal structure.o Sweave and Stangle had problems due to partial matching of codechunk names when run with split=TRUE.o install.packages() on a source package now ensures thatR CMD INSTALL sees the same library search path asinstall.packages() did when computing dependencies.o density() now ensures its 'y' values are non-negative. (PR#8876)o is.finite() and is.infinite() (and many other primitives)are not internally generic and so do not support S4 methods,which can no longer be set. (PR#7951)o nls(algorithm = "port") now accepts a list 'start' argument,as for the other methods (and as documented).o Standard errors from the "ar" method of predict() could bewrong for the last p predictions for models nearnon-stationarity. (PR#9614)*************************************************** ** 2.4 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.4.1 patchedNEW FEATURESo The Simplified Chinese translations have been completed.BUG FIXESo co.intervals() sometimes failed to cover the largest value.o tempfile() is now random across sessions as well as within asession. (On some systems it would give the same hex suffixat the start of each session.)o Added infinite recursion test to internal function isMissing.(PR#9426)o The "Date" and "POSIXt" methods for cut() were not choosingthe first day of the year for breaks = "years".(In part, PR#9433.)o R is now able to deparse/print invalid multibyte strings inMBCS locales (such as UTF-8) using hex escapes. This meansthat e.g. demo(Hershey) works in all such locales.o optimize() could give incorrect answers in some rare problemswith exact symmetry about the midpoint of the intervalsupplied. (PR#9438)o The residuals from an lm() fit with no coefficients but anoffset were incorrect.o oneway.test() was expecting a literal formula and did notaccept a variable containing a formula.o The legacy Quartz device (used by console R) displayed itswindow outside the screen estate in some dual-head setups.Now it will be always displayed in the center of the mainscreen.o read.ftable() was not functional on non-seekable connectionssuch as URLs.o Some large memory allocations could cause segfaults orcrashes (e.g. followup to PR#9557).o Sweave() would drop characters from the end of chunk namesending in "R". (PR#9567)o library(), i.e. its internal checkConflicts(), now (again) prints"The following object(s) are masked .." only once per masked package.o methods:::cbind(x) {one argument} now works, calling cbind2(x)when 'x' is an S4 object.CHANGES IN R VERSION 2.4.1INSTALLATIONo The extraction of info from Subversion for an SVN checkout nowalso works for svn >= 1.4.0. However, on Windows the 'LastChanged Date' will be in the local timezone, and not in GMT aspreviously.o configure uses code borrowed from autoconf 2.60 to try harder toensure that a C99-compliant compiler is used. (It does so byappending to CC.) This avoids problems with systems such as FC5which override CFLAGS and thereby lose flags such as -std=gnu99.NEW FEATURESo rainbow(), heat.colors(), terrain.colors(), topo.colors() andcm.colors() all gain an 'alpha' argument to be passed to hsv().o dput() will give an incorrect representation of the row namesof a data frame with integer row names. This is now correctedwhen the object is recreated.C-LEVEL FACILITIESo Using STRICT_R_HEADERS applies to more reported clashes withWindows headers, including Calloc and Realloc. These andFree need to be prefixed by R_ when STRICT_R_HEADERS is defined.DEPRECATED & DEFUNCTo The previously undocumented behaviour of structure() in adding aclass when specifying "tsp" or "levels" attributes is nowdeprecated (with a warning).BUG FIXESo Fixed warning() to use .dfltWarn intead of .dfltStop for defaulthandling (PR#9274).o R would slow down when the product of the length of a vector andthe length of a character vector used to subset it exceeded 2^31.(PR#9280)o merge() now allows zero-row data frames.o add1.lm() had been broken by other changes for weighted fits.o axis.POSIXct() would sometimes give the wrong labels.o Help for a method call would fail. (PR#9291)o gzfile() returned an object of class "file" not "gzfile". (PR#9271)o load()ing from a connection had a logic bug in when it closedthe connection. (PR#9271)o The lowess() algorithm is unstable if the MAD of the residualsbecomes (effectively) zero: R now terminates the iterations atthat point. (This may result in quite different answers.)The 'delta' argument was incorrectly documented. (PR#9264)o abbreviate() would only work for strings of up to 8191 bytes,but this was not checked. Now longer strings are errors.o Drawing X11 rotated text was buggy for VERY small (negative)angle of rotation. Reported by Ben Bolker. (PR#9301)o The X11 data editor would crash in an MBCS locale if R wascompiled with FC's CFLAGS that add buffer overflow andstack-smashing detection.o rect() was not accepting border=NA in some cases involvingcross-hatching.o Fixes to S4 group generics to ensure that the correct number ofactive arguments are in the signature of the group and allmembers. Also a fix to keep the 'groupMembers' slot up to date.o S4 group generic "Logic" (with '&', '|', but not '!') has beencreated, following the green book (apart from '!').o removeClass() now takes care to remove any subclass referencesto the deleted class.o mle() (in stats4) might not have worked as intended when theorder of parameters in 'start' differed from that in thelog-likelihood. (PR#9313)o dotchart() now properly restores par() settings after itself.o system() on Mac OS X was blocking arbitrary signals during thecall although only SIGPROF was meant to be blocked.o methods cached via callNextMethod() and (sometimes) as() werebeing cached as directly specified although in fact they wereinherited. Caused problems in later search for inherited methods.o str() works properly for method definitions and other S4-classedfunction objects.o JAVA_LIBS are now set correctly on MacOS X.o Fix null-termination issue suspected of causing crash with FedoraExtra RPMS (PR#9339, Justin Harrington, analysis and fix from BillDunlap).o Name spaces restored via a saved session silently failed to cachetheir methods because the methods package was not yetattached. Fixed by attaching methods before restoring data.o rbind()ing a list to a data frame generated invalid row names,which were an error in 2.4.0. (PR#9346)o boxplot.stats(x) now returns the correct minimum instead of anerror for x <- c(1,Inf,Inf,Inf), and hence boxplot(x) "works".o promptClass() now uses \linkS4class{<ClassName>} instead ofof \link{<ClassName>-class}.o gc() no longer reports nonsense values for the number of usedVcells if the true value exceeds 2^31 (and hence over 16Gb ofheap is in use): it now reports NA. (PR#9345)o rapply() now detects more user errors in supplying arguments. (PR#9349)o boxplot() was ignoring argument 'boxfill'. (PR#9352)o plot.lm(which = 6, id.n = 0) did not work. (PR#9333)o .deparseOpts("delayPromises") was not matching the C code,returning 64 rather than 32.o bxp() could use partial matching on 'pars' when findingdefaults for some of its parameters, e.g. a setting of 'cex.axis'in 'pars' or inline was used to set a default for 'outcex'.o acf() now allows lag.max = 0 except when type="partial", andforces the lag 0 autocorrelation to 1. (PR#9360)o hist(*, include.lowest=., right=., plot=FALSE) does not warnanymore, (PR#9356) and more.o Some bugs in caching superclass/subclass relations and inremoving those relations on detach and on removeClass() havebeen fixed.o readBin() could return one too many strings if 'n' was anover-estimate. (PR#9361)o A request for an opaque colour in the pdf() device after atranslucent one did not set the transparency back to opaque in2.4.0.Semi-transparent background colours were not being plotted onthe pdf() device.o plot.lm(which=5) in the case of constant leverage re-orderedthe factor levels but not the residuals, so the labelling byfactor level was often incorrect.o packBits() was not accepting a logical argument. (PR#9374)o make install was omitting doc/FAQ and doc/RESOURCES.o A two-sample t.test(x, y, var.equal=TRUE) did not allow one of thegroups to be of size one.o The "ts" method for print() failed on some corrupted objectsof class "ts", e.g. those without a "tsp" attribute.o structure() reordered the "class" value given if there was a"tsp" value specified.o pairs() now does pass appropriate parts of '...' to the'diag.panel' argument. (PR#9384)o plot.lm() was using an incorrect estimate of dispersion forsome GLMs (including family=binomial and family=poisson).(PR#9316)o Subsetting operators were setting R_Visible too early, soassignments in arguments could make the result invisible.(PR#9263)o The tk-GUI was displaying a warning due to an extra comma inthe list of manuals (PR#9396)o packageDescription() now gives an explicit error on a corruptDESCRIPTION file.o There was a scoping issue with tcltk callbacks given asunevaluated expressions. This has only been partially fixed, acomplete fix probably requires redesign.o trace() had its return value documented incorrectly and wassometimes visible when it should not have been.o pchisq() would sometimes use the wrong tail when calculatingnon-central probabilities with lower.tail = FALSE. (PR#9406)o rm() could remove the wrong objects when passed an expression.(PR#9399) Now only names are allowed in the '...' argument,and the incorrect documentation of what happened withcharacter objects is corrected.o url() was not supporting 'encoding' except on file:// URLs.CHANGES IN R VERSION 2.4.0USER-VISIBLE CHANGESo The startup message now prints first the version string andthen the copyright notice (to be more similar to R --version).o save() by default evaluates promise objects. The old behaviour(to save the promise and its evaluation environment) can beobtained by setting the new argument 'eval.promises' to FALSE.(Note that this does not apply to promises embedded inobjects, only to top-level objects.)o The functions read.csv(), read.csv2(), read.delim(),read.delim2() now default their 'comment.char' argument to "".(These functions are designed to read files produced by othersoftware, which might use the # character inside fields, butare unlikely to use it for comments.)o The bindings in the base environment/name space (currently thesame thing) are now locked. This means that the values ofbase functions cannot be changed except viaassignInNamespace() and similar tricks.o [[ on a factor now returns a one-element factor (and not aninteger), as.list() on a factor returns a list of one-elementfactors (and not of character vectors), and unlist() on a listof factors returns a factor (and not an integer vector).These changes may affect the results of sapply() and lapply()applied to factors.o mauchly.test() now returns the W statistic (for comparabilitywith SAS and SPSS), rather than the z (which was accidentallynot named in the output)o sort(x, decreasing = FALSE, ...) is now a generic function.This means that 'partial' is no longer the second argument,and calls which used positional matching may be incorrect: wetry to detect them.o See the section on 'Changes to S4 methods': all packagesdepending on 'methods' need to be re-installed.NEW FEATURESo agrep(), grep(), strwrap(), strtrim(), substr() andrelated functions now coerce arguments which should becharacter via as.character() rather than internally (so methoddispatch takes place, e.g. for factors).chartr(), charfold(), tolower() and toupper() now coerce theirmain argument if necessary to a character vector viaas.character().Functions which work element-by-element on character vectorsto give a character result now preserve attributes includingnames, dims and dimnames (as suggested by the Blue Bookp. 144). Such functions include charfold(), chartr(), gsub(),strtrim(), sub(), substr(), tolower() and toupper(). (Notethat coercion of a non-character argument may lose theattributes.)agrep(value = TRUE) preserves names for compatibility withgrep().nchar() has always preserved dims/dimnames (undocumentedbefore) and now also preserves names.o .Deprecated and .Defunct take a new parameter, msg, that allowsfor the specification of the message printed and facilitatesdeprecation of calling sequences etc.o .Fortran() will map 'name' to lower case, and will work with'name' containing underscores.o The default is now .saveRDS(compress = TRUE)o The :: operator now also works for packages without name spacesthat are on the search path.o [[ on a list does not duplicate the extracted element unlessnecessary. (It did not duplicate in other cases, e.g. apairlist.)o argsAnywhere() works like args() on non-exported functions.o as.data.frame() gains a '...' argument.o Added an as.data.frame() method for class "ftable".o as.list(<an expression>) is now handled by internal code andno longer loses attributes such as names.as.list(<a list>) no longer duplicates (unnecessarily).o as.POSIX[cl]t can now convert character strings containingfractional seconds.o attach() can now attach a copy of an environment.o available.packages() and installed.packages() gain a 'fields'argument thanks to Seth Falcon.o axis.POSIXct() uses a different algorithm for ranges of 2 to 50days that will mark days at midnight in the current timezone(even if the graph crosses a DST change).o body<-() and formals<-() default to envir = environment(fun),that is they do not by default change the environment.(Previously they changed it to parent.frame().)o New function combn(x, m, ..) for computing on all combinations ofsize 'm' (for small 'm' !).o The cumxxx() functions now handle logical/integer argumentsseparately from numeric ones, and so return an integer resultwhere appropriate.o data.frame() has a new argument 'stringsAsFactor'. This andthe default for read.table(as.is=) are set from the new globaloption 'stringsAsFactors' via the utility functiondefault.stringsAsFactors().o dev.interactive() now has an optional argument 'orNone'.o df() now has a noncentrality argument 'ncp', based on acontribution by Peter Ruckdeschel.o example() gains an argument 'ask' which defaults to "TRUE whensensible", but the default can be overridden by setting option'example.ask'.o expand.grid() now has an argument 'KEEP.OUT.ATTRS' which cansuppress (the potentially expensive) "out.attrs" attribute. It nolonger returns an extraneous 'colnames' attribute.o The subset and subassign methods for factors now handle factormatrices, and dim() can be set on a factor.o There is now a format() method for class "ftable".o head(x, n) and tail(x, n) now also work for negative arguments,thanks to Vincent Goulet.o head.matrix() and tail.matrix() are no longer hidden, to be usedfor building head() and tail() methods for other classes.o If help() finds multiple help files for a given topic, a menuof titles is used to allow interactive choice.o help.search() now rebuilds the database if 'package' specifies apackage not in the saved database.o hist(*, plot = FALSE) now warns about unused arguments.o history() gains a 'pattern' argument as suggested by RomainFrancois.o integer(0) now prints as that rather than "numeric(0)" (italways deparsed as "integer(0)").o interaction(..., drop=TRUE) now gives the same result asinteraction(...)[,drop=TRUE] (it used to sometimes give adifferent order for the levels).o lag.plot() produces a conventional plot (not setting mfrow) ifonly one plot is to be produced.o lapply() does much less copying. Vector X are handled withoutduplication, and other types are coerced via as.list(). (As aresult, package 'boot' runs its examples 4% faster.)lapply(<a pairlist>) now coerces to a list (rather than traversethe pairlist from the beginning for each item).o legend() has new parameters 'box.lwd' and 'box.lty'.o lines() gains a simple method for isoreg() results.o load() no longer coerces pairlists to lists (which wasundocumented, but has been happening since 1998).o make.link() now returns an object of class "link-glm".The GLM families accept an object of this class for their'link' argument, which allows user-specified link functions.Also, quasi() allows user-specified variance functions.o mapply() uses names more analogously to lapply(), e.g..o matplot() now accepts a 'bg' argument similarly to plot.default() etc.o median() is now generic, and its default method uses mean()rather than sum() and so is more widely applicable (e.g. to dates).o Dummy functions memory.size() and memory.limit() are availableon Unix-alikes, for people who have not noticed that documentationis Windows-specific.o merge() works more efficiently when there are relatively fewmatches between the data frames (for example, for 1-1matching). The order of the result is changed for 'sort = FALSE'.o merge() now inserts row names as a character column and not afactor: this makes the default sort order more comprehensible.o Raw, complex and character vectors are now allowed in modelframes (there was a previously undocumented restriction tological, integer and numeric types.). Character vectors in aformula passed to model.matrix() are converted to factors andcoded accordingly.o modifyList() utility, typically for housekeeping nested lists.o x <- 1:20; y <- rnorm(x); nls(y ~ A*exp(-x^2/sig)) no longerreturns an unhelpful error message. In this and similar cases, itnow tries a wild guess for starting values.o Ops.difftime() now handles unary minus and plus.o Ops.Date() and Ops.POSIXt() now allow character arguments(which are coerced to the appropriate class before comparison,for Ops.POSIXt() using the current time zone).o There is a new option(max.contour.segments = 25000) which can beraised to allow extremely complex contour lines in contour()and contourLines(). (PR#9205)o options(max.print = N) where N defaults to 99999 now cuts printingof large objects after about N entries. print(x, ..., max = N)does the same for the default method and those building onprint.default().options("menu.graphics") controls if graphical menus should beused when available.options("par.ask.default") allows the default for par("ask")to be set for a newly-opened device. (Defaults to FALSE, theprevious behaviour.)The way option("papersize") is set has been changed. Onplatforms which support the LC_PAPER locale category, thesetting is taken first from the R_PAPERSIZE environmentvariable at run time, then from the LC_PAPER category("letter" for _US and _CA locales and "a4" otherwise). Onother platforms (including Windows and older Unixen), thechoice is unchanged.o package.skeleton() gains arguments 'namespace' and'code_files'.o par(ask=TRUE) now only applies to interactive R sessions.o parse() now returns up to 'n' expressions, rather than fillthe expressions vector with NULL. (This is now compatiblewith S.)o The 'version' argument for pdf() is now increasedautomatically (with a warning) if features which need a higherlevel are used.o pie() now allows expressions for 'labels', and empty slices.o There is a new '%.%' operator for mathematical annotations(plotmath) which draws a centred multiplication dot(a \cdot in LaTeX), thanks to Uwe Ligges.o predict.lm() gains a 'pred.var' argument. (Wishlist PR#8877.)o print.summary.{aov,glm,lm,nls} and print.{aov,glm} make use ofnaprint() to report when na.action altered the model frame.o print.table(T, zero.print=ch) now also replaces 0 by ch when T isnon-integer with integer entries.o Recursive rapply() which is similar to lapply but usedrecursively and can restrict the classes of elements to whichit is applied.o r2dtable() has been moved to package 'stats'.o New function read.DIF() to read Data Interchange Format files,and (on Windows) this format from the clipboard.o New experimental function readNEWS() to read R's own "NEWS" fileand similarly formatted ones.o readLines() has a new argument 'warn' to suppress warnings:the default behaviour is still to warn.o reg.finalizer() has a new argument 'onexit' to parallel theC-level equivalent R_RegisterFinalizerEx.o rep() is now a primitive function and under some conditionsvery much faster: rep.int() is still a little faster (but doesless). (Because it is primitive there are minor changes to thecall semantics: see the help page.)o The 'row.names' of a data frame may be stored internally as aninteger or character vector. This can result in considerablymore compact storage (and more logical row names from rbind)when the row.names are 1:nrow(x). However, such data framesare not compatible with earlier versions of R: this can beensured by supplying a character vector as 'row.names'.row.names() will always return a character vector, but directaccess to the attribute may not.The internal storage of row.names = 1:n just records 'n', forefficiency with very long vectors.The "row.names" attribute must be a character or integervector, and this is now enforced by the C code.o The "data.frame" and "matrix" methods for rowsum() gain an 'na.rm'argument.o Experimental support for memory-use profiling via Rprof(),summaryRprof(), Rprofmem() and tracemem().o save.image() [also called by sys.save.image() and hence from q()]now defaults to saving compressed binary images. To revert tothe previous behaviour set option "save.image.defaults": see?save.image.o There is a new primitive seq.int() which is slightly morerestricted than seq() but often very much faster, and newprimitives seq_along() and seq_len() which are faster still.o serialize(connection = NULL) now returns a raw vector (and nota character string). unserialize() accepts both old and newformats (and has since 2.3.0).o setwd() now returns the previously current directory (invisibly).o The function sort() is now sort.int(), with a new genericfunction sort() which behaves in the same way (except for theorder of its argument list) for objects without a class, andrelies on the '[' method for objects with a class (unless aspecific method has been written, as it has for class "POSIXlt").o sort.list() now implements complex vectors (PR#9039), and howcomplex numbers are sorted is now documented.o spline() and splinefun() now follow approx[fun] to have an argument'ties = mean' which makes them applicable also when 'x' hasduplicated values.o str(x) does not print the S3 "class" attribute when it is thesame as 'mode' (which is printed anyway, possibly abbreviated)and it puts it beside mode for atomic objects such as S3 class"table".o str(<data.frame>) now outputs 'data.frame' instead of`data.frame'; this may affect some strict (Package) tests.o str() now takes also its defaults for 'vec.len' and 'digits.d'from options('str') which can be set by the new strOptions().o symnum() has a new argument 'numeric.x' particularly useful forhandling 0/1 data.o Sys.getlocale() and Sys.setlocale() support LC_MESSAGES,LC_PAPER and LC_MEASUREMENT if the platform does.o Sweave has a new options 'pdf.encoding' and 'pdf.version' forits Rweave driver.o The character vector used by an output textConnection() hasa locked binding whilst the connection is open.There is a new function textConnectionValue() to retrieve thevalue of an output textConnection().o traceback() gains a 'max.lines' argument..Traceback is no longer stored in the workspace.o warning(immediate. = TRUE) now applies togetOption("warn") < 0 and not just == 0.o warnings() is now an accessor function for 'last.warning' (whichis no longer stored in the workspace) with a print() method.o The internal internet download functions have some newfeatures from libxml 2.6.26.o There is an option "HTTPUserAgent" to set the User Agent in Rdownload requests etc. Patch from S. Falcon.o PCRE has been updated to version 6.7.o The C function substituteList now has tail recursion expandedout, so C stack overflow is less likely. (PR#8141, fix byKevin Hendricks)o The (somewhat soft) 1023/4 byte limit on command lines is nowdocumented in 'An Introduction to R'.o The maximum number of open connections has been increased from50 to 128.o There is a new manual 'R Internals' on R internal stucturesplus the former appendices of 'Writing R Extensions'.o The autoloads introduced at the package re-organization have beenalmost completely removed: the one that remains is for ts().o The setting of the various Java configuration variables has beenimproved to refer to JAVA_HOME, and they are now documented inthe R-admin manual.o It is (again) possible to calculate prediction intervals from"lm" objects for the original data frame, now with a warningthat the intervals refer to future observations. Weightedintervals have also been implemented, with user-specifiableweights. Warnings are given in cases where the defaultbehaviour might differ from user expectations. See the?predict.lm for details.CHANGES TO S4 METHODSo The default prototype object for S4 classes will have its owninternal type in 2.4.0, as opposed to being an empty list (thecause of several errors in the code up to 2.3.1). Note that oldbinary objects, including class definitions, will beinconsistent with the type, and should be recreated.o S4 method dispatch has been completely revised to use cachedgeneric functions and to search for the best match amonginherited methods. See ?Methods andhttp://developer.r-project.org/howMethodsWork.pdfo Objects created from an S4 class are now marked by an internal flag,tested by isS4() in R and by macro IS_S4_OBJECT() in C. Thisis an efficient and reliable test, and should replace allearlier heuristic tests.o Some changes have been made to automatic printing of S4objects, to make this correspond to a call to show(), as per'Programming with Data'.o S4 generic and class definitions are now cached when the relatedpackage is loaded. This should improve efficiency and alsoavoid anomalous situations in which a class or generic cannotbe found.o trace() now creates a new S4 class for the traced object ifrequired. This allows tracing of user-defined subclasses of"function".DEPRECATED & DEFUNCTo The re-named tcltk functions tkcmd, tkfile.tail, tkfile.dir,tkopen, tkclose, tkputs, tkread are now defunct.o Argument 'col' of bxp() has been removed: use 'boxfill'.o Use of NULL as an environment is now an error.o postscriptFont() is defunct: use Type1Font().o La.chol() and La.chol2inv() are defunct (they were the same asthe default options of chol() and chol2inv).o La.svd(method = "dgesvd") is defunct.o Files install.R and R_PROFILE.R in packages are now ignored(with a warning).o The following deprecated command-line options to INSTALL havebeen removed (use the fields in the DESCRIPTION file instead):-s --save --no-save --lazy --no-lazy --lazy-data --no-lazy-datao Graphical parameter 'tmag' is obsolete.o mauchley.test() (package 'stats') is now defunct.o symbol.C() and symbol.For() are deprecated. They are required inS for use with is.loaded(), but are not so required in R.o load()ing an object saved in one of the formats used prior toR 1.4.0 is deprecated. Such objects should be re-saved in thecurrent format.o save(version = 1) is now deprecated.C-LEVEL FACILITIESo The convenience function ScalarLogical now coerces allnon-zero non-NA values to TRUE.o The vector accessor functions such as INTEGER, REAL andSET_VECTOR_ELT now check that they are called on thecorrect SEXPTYPE (or at least on a compatible one). See`Writing R Extensions' for the details and for a strictertest regime.o It is no longer possible to pass list variables to.C(DUP = FALSE): it would have given rise to obscure garbagecollection errors.o allocString is now a macro, so packages using it will need tobe reinstalled.o R_ParseVector was returning with object(s) protected in theparser if the status was PARSE_INCOMPLETE or PARSE_ERROR.o There is a new function Rf_endEmbeddedR to properly terminatea session started by Rf_initEmbeddedR, and both are nowavailable on Windows as well as on Unix-alikes. These andrelated functions are declared in a new header <Rembedded.h>.If R_TempDir is set when embedded R is initialized it isassumed to point to a valid session temporary directory: see`Writing R Extensions'.o There is a new interface allowing one package to make C routinesavailable to C code in other packages. The interface consistsof the routines R_RegisterCCallable and R_GetCCallable. Thesefunctions are declared in <R_ext/Rdynload.h>. This interfaceis experimental and subject to change.In addition, a package can arrange to make use of headerfiles in another (already installed) package via the'LinkingTo' field in the DESCRIPTION file: see 'Writing RExtensions'.UTILITIESo R CMD SHLIB now handles (as linker commands) -L*, -l* and *.a.o R CMD check now:- warns if there are non-ASCII characters in the R code (asthese will likely be syntax errors in some locale).- tests Rd cross-references by default, and tests for(syntactically) valid CITATION metadata.- tests that the package can be loaded, and that the packageand name space (if there is one) can each be loaded instartup code (before the standard packages are loaded).- tests for empty 'exec' or 'inst' directories.- checks if $(FLIBS) is used when $(BLAS_LIBS) is.- checks that all packages (except non-S4-using standardpackages) used in ::, :::, library() and require() calls aredeclared in the DESCRIPTION file, and 'methods' is declared ifS4 classes or methods are set.- throws an error if the standard packages 'methods' and'stats4' are imported from in the NAMESPACE file and notdeclared in the DESCRIPTION file.o The test script produced by massage-Examples.pl no longercreates objects in the base environment.o New utilties R CMD Stangle and R CMD Sweave for extracting S/Rcode from and processing Sweave documentation, respectively.o The DESCRIPTION file of packages may contain an 'Enhances:'field.o An R CMD javareconf script has been added to allow Javaconfiguration to be updated even after R has been installed.INSTALLATIONo The C function realpath (used by normalizePath()) is hidden onsome systems and we try harder to find it.o There is a new option --enable-BLAS-shlib, which compiles theBLAS into a dynamic library -lRblas and links against that.For the pros and cons see the R-admin manual.The defaults are now --without-blas (so you have explicitly toask for an external BLAS), and --enable-BLAS-shlib unlessa usable external BLAS is found or on AIX or on MacOS X 10.2and earlier.o MacOS X did not like having LSAME in both BLAS and LAPACKlibraries, so it is no longer part of the R-internal LAPACK.We now require an external BLAS to provide LSAME: it seemsthat nowadays all do.o The configure test for 'whether mixed C/Fortran code can berun' has been improved as on one system that test passed butthe Fortran run-time library was broken.o A precious configure variable DEFS can be set to pass defines(e.g. -DUSE_TYPE_CHECKING_STRICT) to C code when compiling R.o There is now a test for visible __libc_stack_end on Linuxsystems (since it is not visible on some recent glibc'sbuilt from the sources).o MacOS X 10.4 and higher now use two-level namespaces, singlemodule in a shared library and allow undefined symbols to beresolved at run-time. This implies that common symbols are nowallowed in package libraries. --enable-BLAS-shlib is supportedfor internal BLAS, external BLAS framework and external staticBLAS. An external dynamic library BLAS is NOT supported. (Butit can be easily used by replacing internal BLAS library filelater.) MacOS X < 10.4 does not support --enable-BLAS-shlib.o Dynamic libraries and modules use a flat namespace on MacOS X10.4 and higher if either Xcode tools don't support dynamiclookup (Xcode < 2.3) or the FORCE_FLAT_NAMESPACE environmentvariable is set. (The latter was introduced temporarily fortesting purposes and may go away anytime.)o configure now defaults to 'run-time linking' on AIX(and AIX < 4.2 is no longer allowed), using -bexpall ratherthan export/import files. If this works, it allows R to bebuilt in the same way as other Unix-alikes, including with Ras a shared library and with a shared BLAS.o The "mac.binary" package type now defaults to universalbinary. If a repository supports architecture-specific Macbinaries, they can be requested by using "mac.binary.xxx" incontrib.url(), where xxx is the desired architecture.o There is a new configure option --enable-memory-profiling toenable memory profiling with tracemem, Rprof, Rprofmem.BUG FIXESo The name of a Fortran symbol reported to be missing by.Fortran() is now the actual name. (What was reported to bean 'entry point' was missing the common leading underscore.)o print() on a MBCS character string now works properly acharacter at a time rather than a byte at time. (This doesnot affect MBCSs like UTF-8 and the Windows DBCSes which havenon-ASCII lead bytes and always worked correctly.)o glm() now recalculates the null deviance whenever there is anoffset (even if it is exactly zero to avoid a discontinuity inthat case, since the calculations with and without offset aredone by different algorithms).o Amongst families, quasi() accepted an expression for link andno other did. Now all accept an expression which evaluates toa one-element character vector (although e.g. 'logit' is takenas a name and not an expression).o trace() now accepts arguments where= and signature= for theold-style trace (no tracer or exit, edit==FALSE) and justprints a message on entry. Also the undocumented feature ofwhere=function now works for generic functions as well.o callNextMethod() failed for recursive use when the methods hadnonstandard argument lists. Now enforces the semantic rulethat the inheritance is fixed when the method containing thecallNextMethod() is installed. See Details in the documentation.o UseMethod() looked for the defining environment of 'generic' asif it were the current function, although some functions aregeneric for methods of a different generic.Lookup for S3 methods is confined to functions: previously anon-function 'fun.class' could have masked a function of thesame name.o Line types (lty) specified as hex strings were documented not toallow zero, but some devices accepted zero and handled it in adevice-dependent way. Now it is an error on all devices.(PR#8914)o Subassignment for a time series can no longer extend the series:it used to attempt to but failed to adjust the tsp attributes.Now window() must be used.o Function AIC() in package 'stats4' was not dispatching correctlyon S4 classes via logLik() because of name space issues.o Subsetting LANGSXPs could break the call-by-value illusion.(PR#7924) (patch from Kevin Hendricks).o parse() with n > 1 gave a syntax error if fewer than n statementswere available.o parse() with n > 1 gave strange results on some syntax errors.(PR#8815)o lag.plot() now respects graphical parameters for the axes.o Using a wrong link in family() now gives more consistent errormessages.o sort.list(method="radix") works on factors again.o object.size() is more accurate for vector objects (it takes intoaccount the smaller header and also the fixed sizes used inthe node classes for small vector objects).o addmargins(T, ...) now returns a "table" when 'T' is a "table", asits help page has always suggested.o remove() now explicitly precludes removing variables frombaseenv() and throws an error (this was previously ignored).o Saving the workspace at the end of a session now works as haslong been intended, that is it is saved only if something hasbeen added/deleted/changed during the current session.o The search for bindings in <<-, ->> and assign(inherits=TRUE)was omitting the base package, although this was notdocumented. Now the base package is included (but mostbindings there are locked).o dweibull(0, shape) was NaN not Inf for shape < 1. Also, thehelp for dgamma and dweibull gave support as x > 0, butreturned non-zero values for x = 0. (PR#9080)o Subsetting arrays no longer preserves attributes (it wasremoved for matrices in 1998).o The "factor" method of as.character() no longer maps level"NA" to "<NA>" (a legacy of before there were NA characterstrings).o terms(keep.order=TRUE) was not returning a valid "order"attribute.o The DLL registration code was not freeing .External symbols.o The internet download routines expected URLs of less than 4096bytes, but did not check. Now this is checked, and http:// URLsare allowed to be up to 40960 bytes.o parse(n=-1) threw a stack-imbalance error, and parse(n=3) didnot cope correctly with EOF during input.o Zero-column data frames had no names (rather than character(0)).o by() and acf() could get confused when they used very longexpressions as names.o residuals(<glm object>, type="working") was NA for cases withzero weight (whereas they are well-defined even though thecase was not used during the fitting) and the actual value isnow returned. This allows residuals to be computed from fitswith 'y = FALSE'.The residuals in a fitted "glm" object are computed moreaccurately: the previous formula was subject to cancellation.o loess() now checks the validity of its 'control' argument.o rownames(<0-row matrix>, do.NULL=FALSE) was wrong. (PR#9136)o apply() now works as documented when applied over 2 or moremargins with one of zero extent. (It used to drop dimensions.)o head() and tail() now also work row-wise for "table" and "ftable"objects.o NextMethod() could throw an error/crash if called from a methodthat was called directly rather than from a generic (so.Method was unset).o order(x, na.last = NA) failed for a zero-length x.o grep(pat, x, value = TRUE, perl = L) preserved names forL == TRUE && !is.na(pat) but not otherwise. Now it always does.o [rc]bind() now find registered methods and not just visible ones.o Printing a factor no longer ignores attributes such as names anddim/dimnames.o Command-line arguments after --encoding were ignored.o The check for impossible confidence levels was off by one inwilcox.test (PR#8557)o [[ on an environment could create aliases. (PR#8457)o pt() with a very small (or zero) non-centrality parameter couldgive an unduly stringent warning about 'full precision was notachieved'. (PR#9171)o writeChar() could segfault if 'nchars' was given silly values.o qt() and rt() did not work for vector 'ncp', and qt() did notwork for negative 'ncp'.o ns() failed to work correctly when 'x' was of length one.o identical() ignored tags on pairlists (including names ofattributes) and required an identical ordering forattribute values in their pairlists. Now names are comparedon pairlists, and attribute sets are treated as unordered.o If they were unused arguments supplied to a closure, onlythe first non-empty one was reported, despite the message.Unmatched empty arguments (such as f(1,,) for a function ofone argument) were ignored. They are now an error.o Calling a builtin with empty arguments used to silently removethem (and this was undocumented). Now this is an error unlessbuiltin is c() or list() or there are only trailing emptyarguments, when it is a warning (for the time being: this willbe made an error in R 2.5.0).o install.packages() ignored 'configure.args' if the vector wasunnamed.o biplot() now works if there are missing values in the data.o biplot() now passes par() values to all four axes (notjust those on sides 1 and 2).o [.acf now handles an empty first index.o Deparsing uses backticks more consistently to quotenon-syntactic names.o Assigning to the symbol in a for() loop with alist/expression/pairlist index could alter the index. Now theloop variable is explicitly read-only. (PR#9216)o Using old.packages() (and hence update.packages()) on an empty(or non-existent) library failed with an obscure message.o plot.xy() could segfault if supplied with an invalid 'col'argument. (PR#9221)o menu() with graphics=TRUE attempted to use Tcl/Tk on unix evenif DISPLAY was not set (in which case Tk is not available andso the attempt is bound to fail).o The print() method for 'dist' objects prints a matrix even forn = 2.o The cumxxx functions were missing some PROTECTs and so couldsegfault on long vectors (especially with names or wherecoercion to numeric occurred).o The X11() device no longer produces (apparently spurious)'BadWindow (invalid Window parameter)' warnings when run fromRcmdr.o legend() assumed that widths and heights of strings were positive,which they need not be in user coordinates with reversed axes.(In part, PR#9236)o The plot() methods for "profile.nls" objects could getconfused if 'which' had been used in the profile() call. (PR#9231)o boxplot() did not passed named arguments (except graphicsparameters) to bxp() as documented. (PR#9183)o Only genuinely empty statements act as 'return' in thebrowser, not say those starting with a comment char. (PR#9063)o summary.mlm() incorrectly used accessor functions to fake an"lm" object. (PR#9191)o prettyNum() was not preserving attributes, despite beingexplicitly documented to. (PR#8695)o It was previously undocumented what happened if a graphicalparameter was passed in both '...' and 'pars' to boxplot()and bxp(), and they behaved differently. Now those passed in'...' have precedence in both cases.o A failed subassignment could leave behind an object '*tmp*'.The fix also sometimes gives better error messages.o Using SIGUSR1 on Unix now always terminates a session, and nolonger is caught by browser contexts and restarts (such as try()).o In the 'graphics' package, in-line 'font=5' was being ignored(report by Tom Cook).o nls() looked for non-parameter arguments in a function call inthe wrong scope (from the body of nls).o Printing of complex numbers could misbehave when one of theparts was large (so scientific notation was used) and theother was so much smaller that it had no significant digitsand should have been printed as zero (e.g. 1e80+3e44i).o Using install.packages with type="mac.binary" and target pathstarting with ~ failed with a cryptic message while unpacking.o getwd() now works correctly when the working directory isunavailable (e.g. unreadable).o The alternative hypothesis in wilcox.test() was labelled by anunexplained quantity 'mu' which is now spelled out.The alternative hypothesis in ks.test() is clearer both in thedocumentation and in the result. (PR#5360)*************************************************** ** 2.3 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.3.1 patchedBUG FIXESo help.search() incorrectly documented where the data base wassaved and what was in it.o str(<data.frame>, strict.width=.) produced an extraneous first line.o Improve bessel[IJKY]() out-of-range checks; for instance,besselI(0, nu) no longer warns.o cbind() on some non-vector objects (e.g. names) segfaulted.o xy.coords(numeric(0)) gave a misleading error message.o INSTALL has been changed to avoid a few problems with thebase (not XPG4) Solaris sed.o There were problems in src/main/printutils.c on some platformsthat did not have va_copy.o [pq]unif allowed infinite ranges but handled theminconsistently. (PR#8958)[pq]unif claimed to allow min == max but did not do so.o Subassignment within raw arrays of 3 or more dimensions was notimplemented.o environment<-() did not even check if duplication was required.o rt() was wrong for non-central t-distributions. qt() was wrongfor non-central distributions far enough in the left tail(reported by Long Qu). (PR#9050)o R CMD Rdconv --type=Ssgm no longer drops a \keyword{} if it is theonly one (one letter typo patch by Bill Dunlap). (PR#9051)o poly(x, y, .., raw = TRUE) now does follow 'raw'.o plot(0/ -1:1, type = "s") now works. (PR#9046)o write.table(row.names=FALSE) does now quote column names. (PR#9044)o rf() was wrong for non-central F (PR#9055). qf() was wrong fornon-central F with denominator df > 1e8.o The C function dummy_vfprint had a potential memory leak. Thisshowed up with some connections when used with output of morethan 100,000 bytes in a single call.o vignette() did not work if more than one vignette with thesame name was installed (PR#9069).o mget() did not check that 'ifnotfound' was a list, and workedincorrectly if it was a list of length > 1. Now 'ifnotfound'is (if possible) coerced to a list.o The internal check for conformance of time series assumed that the'tsp' attribute was integer, whereas it was enforced to benumeric by the attribute-setting code.o Sweave() did not treat \begin{document} in comments correctly(PR#9073).o diff(x) gave wrong result when x was "POSIXlt" object.o title() could crash R when passed a long non-character vector.(PR#9115)o Functions rgb(), hsv() and hcl() lost names unless 'alpha' wasspecified. (In part, PR#9118)o The residuals() method for "glm" failed unless 'y = TRUE' forthe fit: it now works for "working" and "partial" residualsand gives a useful error message for other types. (PR#9124)o R CMD Rdconv did not close the .Rd file, which matters on Windows.(PR#9126)o anova.mlm() could fail if applied to a single model.o stopifnot(<FALSE-expr>) now gives a better message for a *long*expression.CHANGES IN R VERSION 2.3.1NEW FEATURESo In lm() and glm(), offsets are allowed to be length 1 (andif so are replicated to the number of cases).o The \uxxxx notation for Unicode characters in input stringscan now be used on any platform which supports MBCS, even ifthe current locale is not MBCS (provided that the Unicodecharacter is valid in the current character set).o The quasibinomial() family now allows the "cauchit" link. (PR#8851)o edit.data.frame() no longer (silently) coerces character columnsto factor.C-LEVEL FACILITIESo The variables controlling stack checking are made available viaRinterface.h to front-ends embedding R: see 'Writing R Extensions'o R_SignalHandlers (defined in Rinterface.h) can be set to 0 tosuppress the R signal handlers in front-ends embedding R.INSTALLATION CHANGESo There have been a number of changes to help installation onplatforms that no one had beta-tested.- Changes related to older header files, e.g. on Redhat 8.0/9.- Problems with 'make install' on older (<3) versions of bashon Solaris and elsewhere.- AIX 5.2/gcc issues with needing -lm when making modules X11and vfonts.- Some versions of Solaris and AIX had an fcntl.h thatredefined 'open' to be 'open64' and thereby brokecompilation of src/main/connections.c and elsewhere.o 'make uninstall' works better on a build using a namedsubarchitecture.BUG FIXESo min(), max(), sum() and prod() gave nonsensical answers withan empty list or raw argument.o sum() on a data frame did not allow multiple arguments. (PR#8385)o charmatch() and pmatch() did not specify they applied only tocharacter vectors. Now they do, and attempt to coerce 'x' and'target' to character before attempting matching.o The Summary() methods for data.frame, Date, POSIXct, POSIXltand difftime all required an argument which can match 'x',although the generics did not.o regexpr() now accepts 0-length 'text' inputs.o help.search() no longer errors out on a wrongly installed package(with no "hsearch.rds" file).o The LaTeX version of the package reference manual was omittingsome topics, and was not sorting the foo-package topic first.o Serializing (e.g. via save()) is better protected against Cstack overflow, which will now abort the conversion but nolonger crashes the R process on some platforms.o rbind()ing dataframes with a single row could lead to acorrupt data frame (a problem with the fix to PR#8506).o plot(lm(y ~ 1)) now works also for 'which = 5'.o dbeta(0, 1, a, 0) now correctly gives 'a' (limit) instead of 0,and dbeta(0, a, b, ncp) now returns Inf instead of NaN.o demo(Hershey) was failing on the Cyrillic octal codes in locales(e.g. UTF-8) in which these are invalid.o mean() on an integer (or logical) vector was treating NAs asactual values (unless na.rm = TRUE).o mean() on a complex vector was calculated incorrectly incode to improve precision (PR#8842, John Peters).o Graphical parameters bg, cex, col, lty, and lwd were beingchecked as being of length one even by functions such astitle() that ignored them. (Functions such as lines() andpoints() allow them to be of length > 1, so they might bepassed through ... to other high-level graphical functionswhich then used to reject them.)o str() now is fast again for large character vectors.o edit() would default the environment of a function to .BaseEnv,instead of to .GlobalEnv.o lm() and glm() coerce their 'weights' and 'offset' values tovector to avoid problems with specifying them as 1D or n x 1arrays.o image() with one or both axes on log scales would give aspurious warning; contour() would give an error.o legend() with log axes would place the title in the wrong place.o edit.data.frame() was not returning factors edited withfactor.mode="numeric" to factors.o edit.matrix() tried to set rownames and colnames from theoriginal matrix even if the sizes had been altered, andignored changes made to the column names. 'edit.row.names' hasa more sensible default (if the rownames are non-NULL).o bindingIsLocked() was returning invalid values of a logicalvector on some platforms.o merge.data.frame() did not make the column names unique (byappending elements of 'suffixes') when performing a Cartesianproduct. (PR#8676)o rbind.data.frame() matches up the names of columns (which wasundocumented), but failed to do so when checking if it wasdealing with a factor column. (PR#8868)If rbind() was used on data frames with duplicated names itproduced a corrupt data frame.o dt(x, df, ncp= not.0) no longer gives erratic values for|x| < ~1e-12. (PR#8874)o \code{\linkS4class{.}} now works.o ccf() aligns time series by ts.intersect() rather thants.union() and so is less likely to need a non-defaultna.action. (PR#8893)o optim(method="CG") could return a value that did notcorrespond to $par for very badly behaved functions on whichthe second phase of the line search failed. (PR#8786)o print.ts() could fail on a corrupt time series: it now warns anddoes the best it can.CHANGES IN R VERSION 2.3.0USER-VISIBLE CHANGESo In the grid package there are new 'arrow' arguments togrid.line.to(), grid.lines(), and grid.segments()(grid.arrows() has been deprecated).The new 'arrow' arguments have been added BEFOREthe 'name', 'gp' and 'vp' arguments so existing code thatspecifies any of these arguments *by position* (not by name)will fail.o all.equal() is more stringent, see the PR#8191 bug fix below.o The data frame argument to transform() is no longer called 'x',but '_data'. Since this is an invalid name, it is less likelyto clash with names given to transformed variables. (Peoplewere getting into trouble with transform(data, x=y+z).)NEW FEATURESo arima.sim() has a new argument 'start.innov' for compatibilitywith S-PLUS. (If not supplied, the output is unchanged fromprevious versions in R.)o arrows() has been changed to be more similar to segments():for example col=NA omits the arrow rather than as previously(undocumented) using par("col").o as.list() now accepts symbols (as given by as.symbol() akaas.name()).o atan2() now allows one complex and one numeric argument.o The 'masked' warnings given by attach() and library() now onlywarn for functions masking functions or non-functions maskingnon-functions.o New function Axis(), a generic version of axis(), with Date andPOSIX[cl]t methods. This is used by most of the standardplotting functions (boxplot, contour, coplot, filled.contour,pairs, plot.default, rug, stripchart) which will thus label xor y axes appropriately.o pbeta() now uses TOMS708 in all cases and so is more accuratein some (e.g. when lower.tail = FALSE and when one of theshape parameters is very small).o [qr]beta(), [qr]f() and [qr]t() now have a non-centrality parameter.o [rc]bind and some more cases of subassignment are implementedfor raw matrices. (PR8529 and 8530)o The number of lines of deparsed calls printed by browser() andtraceback() can be limited by the option "deparse.max.lines".(Wish of PR#8638.)o New canCoerce() utility function in "methods" package.o [pq]chisq() are considerably more accurate for moderate (up to80) values of ncp, and lower.tail = FALSE is fully supportedin that region. (They are somewhat slower than before.)o chol(pivot = TRUE) now gives a warning if used on a (numerically)non-positive-definite matrix.o chooseCRANmirror() consults the CRAN master (if accessible) tofind an up-to-date list of mirrors.o cov.wt() is more efficient for 'cor = TRUE' and has a new 'method'argument which allows 'Maximum Likelihood'.o do.call() gains an 'envir' argument.o eigen() applied to an asymmetric real matrix now uses atolerance to decide if the result is complex (rather thanexpecting the imaginary parts of the eigenvalues to be exactlyzero).o New function embedFonts() for embedding fonts in PDF orPostScript graphics files.o fisher.test() now uses p-values computed via hypergeometricdistributions for all 2 by 2 tables. This might be slightlyslower for a few cases, but works much better for tables withsome large counts.There is a new option to simulate the p-value for larger than2 x 2 tables.o for() now supports raw vectors as the set of indices.o getNativeSymbolInfo() is vectorized for the 'name' argument. Itreturns a named list of NativeSymbolInfo objects, but isbackward compatible by default when called with a charactervector of length 1, returning the NativeSymbolInfo object.o help.search() no longer attempts to handle packages installedprior to R 2.0.0, and reports the current path to thepackage (rather than where it was originally installed: thisinformation is not shown by the print() method).o Added "hexmode" to parallel "octmode".o install.packages() now does tilde expansion on file pathssupplied as 'pkgs'.o install.packages() has additional arguments 'configure.args' and'clean' which allow the caller to provide additional argumentsto the underlying R CMD INSTALL shell command when installingsource packages on a Unix-alike.o is.loaded() has a new argument 'type' to confine the search tosymbols for .C, .Fortran, .Call or .External: by default itlooks for a symbol which will match any of them. It is nowinternal and not primitive, so argument matching works in theusual way.o The symmetry test for matrices used in eigen() has been ``exported''as the 'matrix' method of a new S3-generic 'isSymmetric().o .leap.seconds and the internal adjustment code now know aboutthe 23rd leap second on 2005-12-31: the internal code uses arun-time test to see if the OS does.o The 'col' argument of legend() now defaults to par("col")(which defaults to "black", the previous default), so thatthe lines/symbols are shown in the legend in the colour thatis used on the plot.o log2() and log10() call C functions of the same name ifavailable, and will then be more likely to be precise tomachine accuracy.o new.packages() gains a ... argument to pass e.g. 'destdir' toinstall.packages(). (Wish of PR#8239.)o nls() now supports 'weights'.o The vector passed as the first argument of the 'fn' and 'gr'arguments of optim() has the names (if any) given to argument'par'.o options(expressions) is temporarily increased by 500 duringerror-handling. This enables e.g. traceback() to work whenthe error is reaching the limit on the nesting of expressions.o page() accepts general R objects, not just names (andpreviously undocumented) character strings. This allows theobject to be specified as a call, for example. More optionsare allowed in its '...' argument.o pairs() allows a wider class of inputs, including data frameswith date and date-time columns.o par() and the in-line use of graphical parameters produce moreinformative error messages, distinguishing betweennon-existent pars and inappropriate use of valid pars.Graphical parameters 'family', 'lend', 'ljoin' and 'lmitre'can now be set in-line.There is no longer a warning if non-settable pars are usedin-line, but there is an appropriate warning if unknown parsare passed.The length limit for the 'family' parameter has been increasedto 200 bytes, to allow for the names of some CID-keyed fontsin multi-byte locales.o The pdf() device now allows 'family' to be specified in the samegenerality as postscript().o The pdf() device writes /FontDescriptor entries for all fontsexcept the base 14, and does not write font entries for unusedfonts.o Plotmath allows 'vartheta', 'varphi' and 'varsigma' (or 'stigma')as synonyms for 'theta1', 'phi1' and 'sigma1', and the helppage has a note for TeX users.o plot.xy() now takes its default arguments from thecorresponding par() settings, so points(type="l") andlines(type="p") behave in the same way (and more obviously,also for type="b").o poly() has a new argument 'raw', mainly for pedagogical purposes.o The class "POSIXlt" now supports fractional seconds (as"POSIXct" has always done). The printing of fractional secondsis controlled by the new option "digits.secs", and by default is off.o postscript() supports family = "ComputerModernItalic" forComputer Modern with italic (rather than slanted) faces.o The postscript()/pdf() font metrics for the 14 standard fonts(only, not the rest of the common 35) have been updated toversions from late 1999 which cover more glyphs. There arealso a few differences in the metrics and hence the outputmight be slightly different in some cases.o The way families can be specified for postscript() and pdf()has been expanded to include CID-keyed fonts, with newfunctions Type1Font() and CIDFont() to set up such fontsfamilies.o prettyNum() has new arguments 'preserve.width' and 'zero.print'.When the former is not "none", as in calls from format() andformatC(), the resulting strings are kept at the desired widthwhen possible even after adding of 'big.mark' or 'small.mark'.o proc.time() and system.time() now record times to 1ms accuracywhere available (most Unix-like systems).o The initialization methods for the quasi() family have beenchanged to depend on the variance function, and in particularto work better for the "mu(1-mu)" variance function. (PR#8486)o read.table() gains a 'flush' argument passed to scan().o require() now takes a 'lib.loc' argument.o The second argument 'size' to sample() is required to havelength 1, so that errors when supplying arguments are moreeasily detected.o The default is now compress = !ascii in save() (but not save.image).o scan() and write.table() now have some interruptibility, whichmay be useful when processing very large files.o A new heuristic test, seemsS4Object() is supplied, along with asimilar C-level test, R_seemsS4Object(object). The testdetects probable S4 objects by their class's attribute. Seethe help page.o S3 classes can now be made non-virtual S4 classes by supplying aprototype object in the arguments to setOldClass().o splinefun() returns a function that now also has a 'deriv' argumentand can provide up to the 3rd derivative of the interpolatingspline, thanks to Berwin Turlach.o stopifnot(A) now gives a better error message when A has NAs, anduses "not all TRUE" when A has length >= 2.o str()'s default method has a new argument 'strict.width' which canbe used to produce strict 'width' conforming output. A newoptions(str = list(strict.width = *)) setting allows to controlthis for a whole session.o summary.nls() has a new argument 'correlation' that defaultsto FALSE (like summary.lm).o Sys.sleep() has sub-millisecond resolution on Unix-alikeswith gettimeofday().o Sys.time() now has sub-millisecond accuracy on systemssupporting the POSIX call gettimeofday, and clock-tickaccuracy on Windows.o The new function timestamp() adds a time stamp to the savedcommand history on consoles which support it.o New function tcrossprod() for efficiently computing x %*% t(x)and x %*% t(y).o The suffix used by tempfile() is now in hex on all platformsand guaranteed to be at least 6 hex digits (usually 8).o trace() now works more consistently and more like itsdocumentation, in particular the assertions about old tracingbeing removed for new. For debugging purposes (of R) amechanism for debugging the trace computations themselves wasadded. See trace.R.o The implementation of trace() has beem made more general bycalling a function to do the trace interaction, and recover()now detects trace calls to trim the irrelevant code underneath.o unserialize() can now also read a byte stream from a raw vector.o The useDynLib() directive in the NAMESPACE file now accepts thenames of the native/foreign symbols that are to be resolved inthe DLL for use in .C/.Call/.Fortran/.External calls. Thesecan be used as regular R variables instead of the (routinename, PACKAGE) pairs currently recommended. Alternative namescan be given for the R variables mapping to these symbols.The native routine registration information can also be useddirectly via useDynLib(name, .registration = TRUE). See the'Writing R Extensions' manual for more details.checkFF() (package 'tools') has been updated accordingly.o validObject() has an option complete=TRUE that recursivelychecks the objects in the slots. Not used when new(...)checks validity.o New Vectorize() function, a wrapper for mapply().o write.ftable() has gained an argument 'append = FALSE' (thanks toStephen Weigand).o On Unix-alikes, X11() now has arguments to request the initialposition of the window, and 'gamma' defaults to the value ofgetOptions("gamma"). These changes are consistent with thewindows() device.o X11() and the Unix-alike data entry window can have properties(including geometry) set by X resources: see their help files.o xy.coords() & xyz.coords() now have NULL defaults for their 'y' or'y' and 'z' arguments. This is more consistent with their earlierdocumentation, and may be convenient for using them.o Non-syntactic names of list elements are now printed quoted bybackticks rather than double quotes.o There is some basic checking for imminent C stack overflow (whenthe evaluation depth and the user interrupts are checked).On systems with suitable OS support (not Windows), segfaultsfrom C stack overflow are caught and treated as an R error.New function Cstack_info() reports on stack size and usage.options(expressions) reverts to the default of 5000 nowstack checking is in place.o Package tcltk does not try to initialize Tk on Unix-alikesunless a DISPLAY variable is present. This allows packagesdependent on tcltk to be installed without access to an X server.o The code used to guess timezone offsets where not supplied bythe OS uses a different algorithm that is more likely to guessthe summer-time transitions correctly.o Package tools contains translation tables 'Adobe_glyphs' and'charset_to_Unicode'.o Changed the environment tree to be rooted in an emptyenvironment, available as emptyenv(). baseenv() has beenmodified to return an environment with emptyenv() as parent,rather than NULL.o gettext has been updated to 0.14.5.o PCRE has been updated to version 6.4.o The method $.DLLInfo resolves the specified symbol in the DLL,returning a NativeSymbolInfo object. Use [[ to access the actualvalues in the DLLInfo object.o On systems with either vasprintf or both va_copy and a vsnprintfwhich reports the size of buffer required, connections such asgzfile() and bzfile() can now write arbitrarily long lines,not just 100000 chars.o The R session temporary directory is now set in C code usingthe same algorithm whether or not the shell front-end is usedand on all platforms. This looks at environment variablesTMPDIR, TMP and TEMP in turn, and checks if they point to awritable directory.o Some of the classical tests put unnecessary restrictions on theLHS in the formula interface (e.g., t.test(x+y ~ g) was notallowed).o On suitably equipped Unix-alike systems, segfaults, illegaloperations and bus errors are caught and there is a simpleerror-handler which gives the user some choice as to what todo in interactive use. [Experimental.]On Windows access violations and illegal instructions arecaught with a simple error handler. [Experimental.]o Tracebacks now include calls such as .C/.Fortran/.Call, whichwill help if errors occur in R code evaluated by compiled codeand in tracebacks presented by the segfault etc handlers.o Treatment of signature objects and method definition objects hasbeen modified to give cleaner printing and more consistency inthe treatment of signatures. A sometimes useful utility,methodSignatureMatrix(), is now exported.o Printing the results of codoc() from package tools now helpfullysummarizes the found code/documentation mismatches.o R refrains from printing a final EOL upon exiting the main loopif the quiet flag is on and if the save action is known (e.g. thisis true for --slave).DEPRECATED & DEFUNCTo The deprecated and undocumented use of atan() with two argumentshas been removed: instead use atan2().o write.table0() is defunct in favour of write.table().o format.char() is defunct in favour of format.default().o Support for the long-deprecated (and no longer documented)arguments --min-vsize --min-nsize --max-vsize --max-nsize--vsize --nsize of R CMD BATCH has been removed.o The 'debian' subdirectory has been removed from the sources.o The 'vfont' argument of axis() and mtext() has been removed:use par(family=) instead.o The unused graphical parameter "type" has been removed: itinvited confusion with the 'type' argument to default methodsof plot(), points() and lines().o nlsMethod() and profiler() are no longer exported from the statsname space (and nlsMethod.plinear() is no longer registered asa method, as nlsMethod() was not generic).o The re-named tcltk functions tkcmd, tkfile.tail, tkfile.dir,tkopen, tkclose, tkputs, tkread are now formally deprecated.o Argument 'col' of bxp() is now formally deprecated.o Use of NULL as an environment is deprecated and gives a warning.o postscriptFont() is deprecated in favour of Type1Font() (whichis just a change of name).o La.chol() and La.chol2inv() are deprecated (they have since R1.7.0 been the same as the default options of chol() and chol2inv).o La.svd(method = "dgesvd") is deprecated.o The use of install.R and R_PROFILE.R files in packages isdeprecated: use the DESCRIPTION file instead to arrange tosave an image or to load dependent packages.The following command-line options to INSTALL are deprecated(use the fields in the DESCRIPTION file instead):-s --save --no-save --lazy --no-lazy --lazy-data --no-lazy-datao Graphical parameter 'tmag' (which is long unused) is deprecated.INTERNATIONALIZATIONA set of patches supplied by Ei-ji Nakama has been incorporated.o New postscript encodings for CP1253, CP1257 and Greek (ISO 8859-7).o Support for East Asian CID-keyed fonts in pdf() and postscript().Although these usually contain Latin characters no accurateAFMs are available and so CID-keyed fonts are intended onlyfor use with CJK characters.o Wide-character width functions wc[s]width are provided thatovercome problems found with OS-supplied ones (and thosepreviously used by R on Windows). This means thatdouble-width CJK characters are now supported on allplatforms. It seems that the width of some characters (andnot just CJK characters) depends on which CJK locale's fontsare in use and also on the OS.Revised wide-character classification functions areprovided for use on Windows, AIX and MacOS X to replacedeficient OS-supplied ones.o There is support for MBCS charsets in the pictex() graphicsdevice, and rotated (by 90 degrees) text may work better.o The \u (and \U except on Windows) notation for characters whichis supported by the parser in all MBCS charsets is now alwaysinterpreted as a Unicode point, even on platforms which do notencode wchar_t in Unicode. These are now a syntax error insingle-byte locales.o The default encoding for postscript() and pdf() is chosen tobe suitable for the current locale, if that is a single-bytelocale which is supported. This covers European (includingGreek) and Cyrillic languages.In UTF-8 locales, a suitable single-byte encoding is chosenfor postscript() and pdf(), and text translated to it.o xfig() gains an 'encoding' argument.o There are some message translations into Spanish.INSTALLATION CHANGESo The encoding files for pdf()/postscript() have been moved todirectory 'enc' in package 'grDevices'.o Support for MBCS is only enabled if iconv is found and itsupports enough conversions. (libiconv does.)o In an MBCS locale, make check now translates the graphicsexamples from Latin-1. This ensures that they will workcorrectly in UTF-8: it is possible that in other MBCS localesthey will now fail (rather than work completely incorrectly).o There is a new test, 'test-Docs', which as part of 'makecheck-devel' tests the code in the documentation. Currentlyit runs doc/manual/R-{exts,intro}.R and the compiled code inR-exts.c.o The workaround to allow an external LAPACK-containing BLASsuch as libsunperf to be used with the internal LAPACK hasbeen removed. If you have such a library you may now needto use --with-lapack. It is no longer possible to use someolder versions of libsunperf, e.g. Forte 7 on 64-bit builds.o A substitute for mkdtemp is provided, so it is now alwaysused for R_TempDir.o Most of the functions checked for by 'configure' also havedeclarations checked for in the appropriate header.o The top-level documentation files AUTHORS COPYING.LIB COPYRIGHTSFAQ RESOURCES THANKS have been moved to doc, and COPYING and NEWSare installed there. The file Y2K has been removed from thedistribution.o The extension .lo is no longer used in building R (only inthe optional build of libRmath.so): this allows a considerablesimplification of the Makefiles.o Direct support for f2c has been removed: it can still be usedvia a script which makes it look like a Fortran compiler.(src/scripts/f77_f2c is an example of such a script.)o There is a new flag SAFE_FFLAGS which is used for thecompilation of dlamc.f. It is set by configure for knownproblem cases (recent g77 and gfortran), but can be overriddenby the user.o The standard autoconf macros for large-file support are now used,and these are enabled unless --disable-largefile is specified.This replaces --enable-linux-lfs (and is now selected by default).o Visibility attributes are used where supported (gcc4/gfortran onsome platforms, also gcc3/g77 on FC3 and partially elsewhere).The main benefit should be faster loading (and perhaps betteroptimized code) in some of the dynamic shared objects (e.g.libR.so and stats.so).o The *PICFLAGS are taken to be -fpic rather than -fPIC wherepossible. This will make no difference on most platforms:-fPIC is needed on Sparc (and still used there), but -fpicshould give slightly better performance on PowerPC (although-fPIC is used on PPC64 as it is needed to build libR.so there).o More use is made of inlining for small utility functions suchas isReal. Because this can only be done portably with C99constructs (and we know of no actual implementation), this isonly done for the GNU C compiler.o There is an experimental feature to allow shared installationsof sub-architectures. See the R-admin manual.o All platforms now use R's internal implementation of strptime,which allows fractional seconds. (The major platforms werealready using it.)o The dlcompat work-around for old Mac OS X systems (<= 10.2)has been removed. External dlcompat must be installed if needed.UTILITIESo R CMD check now uses an install log by default.o R CMD check works for packages whose package name is differentfrom the directory name in which it is located.o R CMD INSTALL now uses more randomness in the temporarydirectory name even on systems without mktemp -d.o R CMD f77 has been removed now f2c is no longer supported.o The version string shown in the startup message and by"R --version", and that stored in variable R.version.stringare now in exactly the same format.o The base name of a help file needs to be valid as part of a file://URL, so R CMD check now checks the names are ASCII and do notcontain % .o R CMD check now warns about unknown sections in Rd files, andinvalid names for help, demo and R files, as well as unlikelyfile names in the 'src' directory. The latter is controlledby option --check-subdirs and by default is done if checking atarball without a configure script.R CMD build excludes invalid files in the 'man', 'R' and 'demo'subdirectories.o \usepackage[noae]{Sweave} in the header of an Sweave filesupresses auto-usage of the ae package ("almost European"fonts) and T1 input encoding.DOCUMENTATIONo Rd format now allows \var{} markup inside \code{} and \examples{}.o Markup such as --, ---, < and > is handled better whenconverting .Rd files to [C]HTML.o There is new markup \link[=dest]{name} to generate a link to topic'dest' which is shown as 'name', and \linkS4class{abc} whichexpands to \link[=abc-class]{abc}, for cross-referencing therecommended form of documentation for S4 classes.PACKAGE INSTALLATIONo There is now some support for Fortran 90/95 code in packages:see `Writing R Extensions'.o Installation of man sources and demos is now done by R code.The restrictions on the names of help files, R files andof demos are now enforced (see `Writing R Extensions').o Packages which contain compiled code can now have more thanone dot in their name even on Windows.o The Meta/hsearch.rds database saved now contains LibPath="".This information is now always recreated when help.search() isrun, but the field is retained for back-compatibility.o update.packages() now has a '...' argument to be passed toinstall.packages(), including the formerly separate arguments'destdir' and 'installWithVers'.o Make macros AR and RANLIB are now declared in etc/Makeconf foruse by packages which wish to make static libraries.C-LEVEL FACILITIESo qgamma and rgamma in Rmath.h now check for non-positive arguments.o The BLAS which ships with R now contains the complete set ofdouble-complex BLAS routines, rather than just those used in R.<R_ext/BLAS.h> has been corrected to add the missingdouble-precision BLAS functions drotmg and drotm, and toexclude lsame (which is a Lapack auxiliary function and is nowdeclared in <R_ext/Lapack.h>). It also includes the doublecomplex routines added for this release of R provided Fortrandoublecomplex is usable on the platform.o <R_ext/BLAS.h> and <R_ext/Lapack.h> now declare all the entrypoints as 'extern'.o The flag SAFE_FFLAGS is made available to packages viaetc/Makeconf and R CMD config. It can be used whereoptimization needs to be defeated, e.g. in LAPACK setup.o getNativeSymbolInfo has a withRegistrationInfo argument whichcauses the address field to be a reference to the registrationinformation if it is available for that symbol. If theregistration information is not available, the address is areference to the native symbol. The default is FALSE which isbackward compatible, returning just the address of the symboland ignoring registration information.o errorcall and warningcall are now declared in <Rinternals.h>(they might be needed in front-ends).o R_FlushConsole and R_ProcessEvents are now declared in <R.h>.o The R_Sock* functions supporting socket connections are nolonger declared in R-ftp-http.h as they are not loaded into Ritself, and are now hidden in the module's DLL on suitable systems.BUG FIXESo Quoted arguments to the R script after --args are nowpassed quoted to the R executable and so will be shown asexpected by commandArgs(). (They were previously split atwhitespace even inside quotes on Unix-alikes but not onWindows.)o axis() now supports pars 'xaxp'/'yaxp' as inline arguments.o sort() now does not return inappropriate attributes such as"dim" and "tsp": it only returns names.sort(x, partial=) no longer returns unsorted names, and dropsnames (since it is supplied for efficiency).o Use of non-central F in pf() gives accurate values for larger ncp.o R CMD build --binary does a better job of cleaning up afterfailure to re-make vignettes.o reg-test-1.R tested system(intern=TRUE) which depends on popenand so is not supported on all platforms.o Changed apparent mis-spelling of "Gibraltar" in dataset 'eurodist'.o sysconf() is now used to find the number of clock ticks/second:under some circumstances glibc reported CLK_TCK = 60 when thetrue value was 100.o identical() was not allowing for embedded nuls in characterstrings. (NB: the comparison operators including == do not,and never will.)o The profile() and profiler() methods for "nls" objects nowsupport algorithm = "plinear" and algorithm = "port".o The signal handlers for signals USR1 and USR2 where notrestored if the signal arrived when interrupts were suspended.o Certain combinations of S4 inheritance could cause inheritedmethods to override some directly specified methods.o Some cases of named signatures in calls to setMethod() caused errors.o all.equal() is now more consistent and "picky" about mismatchingattributes, in particular names(); this is a part of thepropositions by Andy Piskorkski (PR#8191).o load() when applied to a connection leaves it open/not as itfound it, and checks explicitly for having a binary readableconnection.o The p-values given by stat.anova() (called from severalanova() methods) are now NA (rather than spurious) ifnon-nested models give rise to changes in deviance with adifferent sign from changes in degrees of freedom.o Built-ins were reported as the relevant call in C-level error()siff R profiling was in progress. Now they are never reported.o Too-long signatures (with no names) were not being caughtin setMethod().o Slot names in prototype() are being more thoroughly checked.o signif() is more likely to follow the 'round to even' rule forexactly representable numbers, e.g. signif(0.25, 1). (Relatedto PR#8452.)o nls() now works correctly with some low-dimensional fits,e.g. with one or zero non-linear parameters.o glm() could give an inappropriate error message if allpossible coefficients were invalid (e.g. a log-linear binomialmodel with no intercept and a not all positive predictor).o solve() gives clearer error messages for some incorrect usages.(PR#8494 and similar)o The gaussian() family was missing the 'valideta' component(which could be needed for the "inverse" link function).The starting values supplied by the gaussian family could beinvalid for the "log" and "inverse" link functions. This isnow reported.o data.matrix() did not work correctly on zero-row data frames.(PR#8496 and other problems.)o The DSC comments in the files from postscript(onefile=FALSE) nowlabel all files as having page 1 of 1, as some other softwareseems to expect that.o The axis labels chosen for logarithmic axis are now lesslikely to be linear and inappropriate (when the range is morethan 10 and less than 100). (PR#1235)o Staircase lines (types "s" and "S") are now drawncontinuously rather than a point at a time and so line types,mitring and so on work. (PR#2630)o Calling par(mfg) before doing any plotting resulted in NewPagenever being called on the device, which in turn resulted inincorrect output for postcript() and pdf() devices. (Reportedby Marc Schwartz in discussion of the non-bug PR#7820.)o terms.formula needed to add parentheses to formulae withterms containing '|'. (PR#8462)o pbirthday() and qbirthday() now also work for very improbableevents {those you are typically *not* interested in}.o Only source help files starting with an upper- or lower-caseletter or digit and extension .Rd or .rd are documented to beprocessed. This is more liberal in that starting with a digitis now also allowed, but rule is now enforced.o nls(algorthm="port") was always taking positive numericdifferences and so could exceed the upper bounds.o methods:::.asEnvironmentPackage() was not allowing forversioned installs.o .find.package() now reports which package(s) it cannot find inthe case it stops with an error.o The standard Unix-alike version of file.show() gives aninformative message if it cannot open a file rather than the(possibly incorrect) 'NO FILE'.o window() did not allow non-overlapping ranges withextend = TRUE. (PR#8545)o pbinom(size = 0) now returns correct values (not NaN). (PR#8560)o [dp]binom(x, *) for x < 0 now always returns 0. (PR#8700)analogous change in pgeom(), pnbinom() and ppois().o [dqpr]geom and [dpqr]nbinom() now all consistently accept prob = 1but not prob = 0. qgeom(prob=1) now gives the correct values(not -1).o INSTALL on Unix-alikes was not loading dependent packages whenpreparing for lazy-loading.o qcauchy(1) now gives +Inf instead of just a very large number.o df(0, f1, *) now properly returns Inf, 1, or 0 for f1 < , = , or > 2.o qbinom(), qnbinom() and qpois() now use a better search andnormally reach the answer very quickly when it is large(instead of being slow or infinite-looping).o pt(x, df) lost accuracy in the far tails (when |x| > 1e154) forsmall df (like df = 0.001 for which such extremes are not unlikely).o dbeta(x, a, b) underflowed internally and incorrectly gave 0for very small x and a.o None of the warnings about convergence failures or loss ofprecision in nmath (distribution and special functions) werebeing reported to the R user.o dnt was missing from standalone nmath (under Unix-alikes).o split() now accepts factors with numeric (but not storage modeinteger) codes.o The utilities such as 'check' now report active version numbersagain, as SVN 'last changed revision' numbers.o addmargins() did not accept a name for 'FUN', only an expression.o '+' for POSIXt objects now takes the tzone from whicheverobject has it, so date+x is the same as x+date if x is numeric.o mean.default() and var() compute means with an additional passand so are often more accurate, e.g. the variance of aconstant vector is (almost) always zero and the mean of such avector will be equal to the constant value to machineprecision. (PR#1228)sum(), prod(), mean(), rowSums() and friends use a long doubleaccumulator where available and so may be more accurate. (Thisis particularly helpful on systems such as Sparc and AMD64where long double gives considerably greater exponent rangeand precision than double.)o read.dcf() now gives a warning on malformed lines.o add1.[g]lm now try harder to use the environment of theformula in the orginal fit to look for objects such as the'data' and 'subset' arguments.o gaussian()$aic was inconsistent with e.g. the lm results fromAIC() and extractAIC() for weighted fits: it treated the weightsas case weights and not variance factors.o system() on Unix-alikes ignored non-logical values of 'intern' andtreated 'intern = NA' as true.o as.table() now produces non-NA rownames when converting amatrix of more than 26 rows. (PR#8652)o Partial sorting used an algorithm that was intended only for afew values of 'partial' and so could be far slower than a fullsort. It now switches to a barebones full sort for more than10 values of 'partial' and uses a more efficient recursiveimplementation for 2...10.o summary.glm() returned an estimate of dispersion of Inf for agaussian glm with zero residual degrees of freedom and thentreated that as a known value. It now uses the estimate NaN,which is consistent with summary.lm().o Sys.sleep() on Unix-alikes was restricted to about 2147 secondsand otherwise might never have returned. (PR#8678)o is(obj, Cl) could wrongly report TRUE when Cl was a classUnion andmultiple inheritance was involved.o confint[.lm / .default] used label "100 %" for level = 0.999o Empty entries (i.e., extraneous ",") in NAMESPACE files now givea better error message early at parsing time instead of a lesscomprehensible one later at load time.o all.equal(n1, n2) could erroneously return NA when n1, n2contained large integers.o anova.mlm() didn't handle multi-df effects properly in thesingle-model case (PR#8679)o anova.mlm() had its colnames mangled by data.frame() (neededcheck.names=FALSE).o summary.glm() gave an NA estimate of dispersion for fits withzero weights. (PR#8720)o qhyper() had too small a tolerance for right-continuity onsome platforms so was not always an inverse to phyper().o rownames<-.data.frame() and dimnames<-.data.frame() tested thelength(s) of the replacement value(s) before coercion, whichcan change the length (e.g. for class "POSIXlt").o max() and min() ignored the largest/smallest representableinteger, as well as Inf/-Inf. (PR#8731)o write.table() assumed factors had integer codes: it now allowsmalformed factors with numeric codes (and otherwise throws anerror).o Worked around a Solaris restriction which meant thatSys.sleep() was only effective for times of up to one second.o sink(, split=TRUE) now works correctly, but is allowed only onplatforms that support va_copy or __va_copy. (PR#8716)o factanal(), prcomp() and princomp() now only check that columnsin the model frame that will be used are numeric (theypreviously also checked columns which were part of negative termsin the formula).o Misuse of $ in apply could corrupt memory. (PR#8718)o apply() could fail if the function returned NULL (e.g. ifthere was a single row).o registerS3method() failed due to a typo. (It was almost neverused.)o Registering an S3 method for an S3 generic in another packagethat was converted to an S4 generic in the same package as theS3 method, registered the method in the wrong place.o Recall() used lookup for the function in use and so could failif that was an S3 method not on the search path.o Rdconv -t Ssgm failed if it encountered \link[opt]{arg}.o uniroot() did not give a warning (as documented) if it failedto converge in 'maxiter' steps. (PR#8751)o eapply() (and as.list.environment()) did not work for the baseenvironment/name space. (PR#8761)o Added protection in configure against systems for which usingxmkmf fails to report a C or C++ compiler.o expand.grid() was constructing a data frame 'by hand' and sosetting integer row.names (which are documented to becharacter). It now sets character row names, androw.names.data.frame() coerces to character.o qbeta() used == on volatile doubles for its convergence test,which failed with gcc 3.3.x on ix86 Linux. We now use a lessfragile test (and lose a negligible amount of accuracy).o ls.str() was missing inherits=FALSE, and so could havereported on an object of the same name but a different mode inthe enclosure of the given environment.o logLik.nls assumed that sigma^2 had been estimated, but didnot count this in the 'df' attribute.*************************************************** ** 2.2 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.2.1 patchedINSTALLATION CHANGESo The macro SOCKLEN_T has been replaced by R_SOCKLEN_T to workaround a problem with the headers of AIX 5.3.BUG FIXESo sub(fixed = TRUE) could get wrong the length of the characterstring for elements of the result after the first.o legend() worked out which elements of 'lty' were valid beforeresizing 'lty', and so could fail if 'lty' was a differentlength from 'legend'.o str(<dendrogram>) sometimes used much too many spaces (in 2.2.x).o eigen(eispack=TRUE) accessed areas off the matrix in somecircumstances (some asymmetric matrices with both complexconjugate pair and real eigenvalues).o strptime() in 2.2.1 sometimes did not set $isdst when it waspreviously set.o Another case of infinite influence has been worked around.(An addendum to PR#8367.)o qr.coef() worked incorrectly with multiple rhs in theLAPACK-using cases. (PR#8476/8)o rbind.data.frame() gave a corrupt data frame if one of thenamed arguments was a zero-row data frame. (PR#8506)o Checks for NULL in the rho argument of the C-level findVarfunction have been added.o The C-level substitute function was handling NULL in its 'rho'argument incorrectly.o The code for pgamma() introduced in 2.1.0 failed for largevalues of 'shape' where the previous code was perfectlyacceptable, despite the claim to be uniformly better. Forexample, pgamma(0.9e100, 1e100) was NaN. (PR#8528)o There was no command 'ls' in browser() nor 'next' in debug(),despite the documentation (which has been corrected).Command 'where' in the browser() no longer changes tostep-though mode.o factor.scope() could report incorrectly that interaction termswere not in the upper scope when such terms in the model andthe upper scope had different orders for the main effects.(Another manifestation of PR#7842.)o The "lm" method of drop1() was giving incorrect results forweighted fits (since deviance.lm() was called on a non-"lm" object).o dotchart() was miscalculating the space for the labels in theleft margin. (PR#8681)o r <- glm(.....); all.equal(r,r) # now gives TRUE instead of an erroro plot.acf() with a multiple time series was sometimesmiscalculating the 'ylim' value for the plot after the first.(PR#8705)CHANGES IN R VERSION 2.2.1USER-VISIBLE CHANGESo options("expressions") has been reduced to 1000: the limitof 5000 introduced in 2.1.0 was liable to give crashes from Cstack overflow.NEW FEATURESo Use of 'pch' (e.g. in points) in the symbol font 5 is nowinterpreted in the single-byte encoding used by that font.Similarly, strwidth now recognizes that font 5 has a differentencoding from that of the locale. (These are likely to affectthe answer only in MBCS locales such as UTF-8.)o The URW font metrics have been updated to versions from late2002 which cover more glyphs, including Cyrillic.o New postscript encodings for CP1250 (Windows East European),ISO Latin-7 (8859-13, Latvian, Lithuanian and Maori), Cyrillic(8859-5), KOI8-R, KOI8-U and CP1251.o configure has more support for the Intel and Portland Groupcompilers on ix86 and x86_64 Linux.o R CMD INSTALL will clean up if interrupted (e.g. by ctrl-C fromthe keyboard).o There is now a comprehensive French translation of the messages,thanks to Philippe Grosjean, Frederic Lehobey, Jean Thioulouseand Emmanuel Paradis.DEPRECATED & DEFUNCTo The undocumented use of atan() with two arguments is deprecated:instead use atan2() (as documented).o The 'vfont' argument of axis() and mtext() is deprecated(it currently warns and does nothing).o The function mauchley.test() is deprecated (was a misspelling)and replaced by mauchly.test()BUG FIXESo The malloc's of AIX and OSF/1 which return NULL for size 0are now catered for in src/main/regex.c.o Names of list elements which are missing are now printed as$<NA> and not $"NA" (which is how the non-missing name "NA" isprinted). (Brought up in discussion of PR#8161.)o help.start() was not linking R.css for use by its front page andimmediate links (2.2.0 only).o Indexing by character NA matched the name "NA".o The arith-true test used random inputs and did not set the seed, soit could fail very occasionally.o arima() with 'fixed' supplied and p=0 for the non-seasonalpart could give spurious warnings about 'some AR parameterswere fixed'.o summary.matrix() could give an infinite recursion on someclassed objects (e.g. those of class "Surv").o The 255th character in an 8-bit character set was not handledcorrectly as a letter on some platforms where C char issigned: for example it was printed as \377 and not allowed invariable names. (Spotted by Alexey Shipunov in Russianencodings.)o Conversion from POSIXct to POSIXlt is done more accuratelyaround the change of DST in years not supported by the OS(pre-1970 on Windows and some others, and in the far past orfuture).o chisq.test(cbind(1:0, c(7,16)), simulate.p = TRUE) gave wrongP-values on some platforms. (PR#8224)o pdf() was not writing details of the encoding to the filecorrectly. (Spotted by Alexey Shipunov in Russian encodings.)o image() was failing with an error when plotting a matrixof all NA values. (PR#8228)image() could fail if called with add=FALSE (the default) andlength(x)=1 for either x or y, as it uses the plot coordinates ofthe previous plot (if any).o tools::checkMD5sums was not accepting file names with spaces in.o The plot() method for TukeyHSD() needed updating after addingadjusted p-values. (PR#8229)o read.fwf() did not work for header = TRUE. (PR#8226)o diag() failed when its argument had NA values in its dimnames.o [g]sub(pcre=TRUE) did not work correctly with \U and \L in aUTF-8 locale, even on the example on the help page.o promptMethods() was failing if the "methods" argument was supplied.o is.loaded() now finds Fortran symbols whether or not theregistration mechanism has been used.o ISODateTime() mistakenly corrected non-existent times (whenDST was being started) in the current time zone.o Some replacement operations on data frames gave incorrectanswers, e.g. DF[3:4, "y"] if column "y" did not exist or wasa matrix.o getGraphicsEvent() would cause memory corruption if passed anempty prompt.o qr() and chol() now pivot the colnames of the result whenpivoting is used. (PR#8258)o example(points) omitted pch=0, although it was valid andsaid in the text to be illustrated.o plot.default() had an unused 'lab' argument, thereby preventingthe 'lab' graphics parameter being passed through '...' .o Although polygon(col = NA) was the stated default, specifyingNA was not equivalent to omitting the argument (but col=NULLwas equivalent).o Im(-1) was pi. (PR#8272, a side effect from all previousversions of R returning the same value for Im and Arg ofnon-complex numbers.)o symbols(fg) defaulted to colour 1, not par("col") as documented.It does now defaults to par("col").o par("family") did not check the length of the value (up to 49bytes) and so could segfault.o aggregate.ts() did not allow for rounding in frequencies suchas 1/5.o prcomp(tol=) was not dropping the sdev's corresponding todropped columns.o Subassignment of a vector which increased the length of thevector _and_ had the wrong length of replacement couldoccasionally segfault. (This has been there since at leastmid 1997.)o The registration of .Fortran symbols was broken: these couldonly be looked up if there were also .Call symbols registered!o R CMD build was incorrectly rejecting the recommended form ofname for a translation package, 'Translation-ll'. (PR#8314)o numericDeriv() gave nonsense results unless the variables werereal, which was not checked.o predict.prcomp() would sometimes give an error when predictinga single observation. (PR#8324)o mapply() could segfault if MoreArgs was not a list. (PR#8332)o The arith-true test used identical() on floating-point results,and this allowed a failure when the relative difference wasless than .Machine$double.eps but non-zero.o qbinom() was not accepting p = -Inf when log.p = TRUE, althoughit is a legitimate value.o write.csv[2] only accepted logical constants for 'row.names', andnow accepts variables.o Conversion of .Rd files did not correctly match bracesenclosing a whole argument, e.g. \eqn{{\bf a}}{a}.o The C function pythag (used if hypot was not available) wouldinfinite-loop on systems with effective optimizing compilers.o Writing long formats (more than 1000 bytes) with connectionsthat use dummy_vfprintf could fail on some systems. The limithas been changed to 100000 bytes pending a more complete fix in R2.3.0.o Making in src/nmath/standalone without making R was notmaking Rmath.h.o Both the R front-end and INSTALL could find the attemptedtemporary directory name already in use on platforms withoutmktemp (and a genuine Bourne shell /bin/sh, not bash). Nowboth the process ID and a timestamp are used to create thedirectory name.o [dpqr]gamma now return NaN for an invalid 'shape' parameter(rather than throw an error), for consistency with otherdistribution functions.o t() now longer drops dimnames 'list(NULL,NULL)' or 'list(NULL)'.o Influence measures such as rstandard() and cooks.distance()could return infinite values rather than NaN for a case whichwas fitted exactly. Similarly, plot.lm() could fail on suchexamples. plot.lm(which = 5) had to be modified to only plotcases with hat < 1. (PR#8367)lm.influence() was incorrectly reporting 'coefficients' and'sigma' as NaN for cases with hat = 1, and on some platformsnot detecting hat = 1 correctly.o Rmath.h for standalone Rmath was not recording HAVE_WORKING_LOG,so R_log was not available on platforms defining it.o HoltWinters() was using a slightly incorrect formula in the C code.o dir.create() could be confused by a trailing slash on thepath, and by paths containing drives on Windows.o The search for tcl/tkConfig.sh looked in 'lib' before 'lib64'directories (and not at all in /usr/local/lib64) and so mightprefer 32- to 64-bit versions if both are available.o nlminb() used an uninitialized variable unless bounds were supplied,and so failed on 64-bit Solaris.CHANGES IN R VERSION 2.2.0USER-VISIBLE CHANGESo plot(<lm object>) uses a new default 'which = 5'for the fourth panel when 'which' is not specified.o The SVN revision number will appear after the date in thewelcome message. The date shown is now the date of the lastchange to the sources rather than the date the sources wereprepared.o is.null(expression()) now returns FALSE. Only NULL gives TRUEin is.null().o graphics::xy.coords, xyz.coords and n2mfrow have been moved tothe grDevices name space (to be available for grid as well).graphics::boxplot.stats, contourLines, nclass.*, and chullhave been moved to the grDevices name space. The C codeunderlying chull() has been moved to package grDevices.o split(x, f), split<-() and unsplit() now by default split by alllevels of a factor f, even when some are empty.Use split(x, f, drop = TRUE) if you want the old behavior ofdropping empty levels. split() and split<-() are S3 genericfunctions with new arguments 'drop' and '...' and all methods nowshould have 'drop' and '...' arguments as well.o The default for 'allowEscapes' in both read.table() and scan()has been changed to FALSE.o The default for 'gcFirst' in system.time() is now TRUE.NEW FEATURESo .Platform has a new component 'path.sep', the separator usedbetween paths in environment variables such as PATH and TEXINPUTS.o anova.mlm() now handles the single-model case.o Hexadecimal values are now allowed for as.numeric() andas.integer() on all platforms, and as integer constants in R code.o attach() now prints an information message when objects aremasked on the search path by or from a newly attached database.o axis() now returns 'at' positions.o axis() has a new argument 'hadj' to control horizontaladjustment of labels.o axis.Date() and axis.POSIXct() now accept a 'labels' argument(contributed by Gavin Simpson).o barplot() now has arguments 'log = ""' and 'add = FALSE'(as in barplot2() from package 'gplots').o baseenv() has been added, to return the base environment. Thisis currently still NULL, but will change in a future release.o boxplot() now responds to supplying 'yaxs' (via bxp()).(Wish of PR#8072.)o capabilities() has a new component 'NLS'.o cbind() and rbind() now react to 'deparse.level' = {0,1,2}(as in another system not unlike R).o Experimental versions of cbind() and rbind() in methods package,based on new generic function cbind2(x,y) and rbind2(). This willallow the equivalent of S4 methods for cbind() and rbind() ---currently only after an explicit activation call, see ?cbind2.o New functions cdplot() and spineplot() for conditional densityplots and spine plots or spinograms. Spine plots are now usedinstead of bar plots for x-y scatterplots where y is a factor.o checkDocFiles() in package 'tools' now checks for bad \usagelines (syntactically invalid R code).o The nonparametric variants of cor.test() now behave better inthe presence of ties. The "spearman" method uses the asymptoticapproximation in that case, and the "kendall" method likewise,but adds a correction for ties (this is not necessary in theSpearman case).o The X11 dataentry() now has support for X Input Methods(contributed by Ei-ji Nakama).o density() is now an S3 generic where density.default() {formerdensity()} has new argument 'weights' for specifying observationmasses different than the default 1/N -- based on a suggestion andcode from Adrian Baddeley.o download.packages() now carries on if it encounters a downloaderror (e.g. a repository with a corrupt index).o dump() now skips missing objects with a warning rather thanthrow an error.o Added "POSIXlt" methods for duplicated() and unique().o Function encoded_text_to_latex() in package tools translatesLatin 1,2,9 and UTF-8 encoded character vectors to LaTeXescape sequences where appropriate.o encodeString() allows justify = "none" for consistency withformat.default(). Some argument names have been lengthenedfor clarity.o file(), fifo() and pipe() now (if possible) report a reasonif they fail to open a connection.o format.default() now has a 'width' argument, and 'justify' cannow centre character strings.format.default() has new arguments 'na.encode' to controlwhether NA character strings are encoded (true by default),and 'scientific' to control the use of fixed/scientificnotation for real/complex numbers.How format() works on a list is now documented, and usesarguments consistently with their usage on an atomic vector.o format.info() now has a 'digits' argument, and is documentedto work for all atomic vectors (it used to work for all butraw vectors.).o New function glob2rx() for translating `wildcard' aka `globbing'to regular expressions.o There is a new function gregexpr() which generalizes regexpr()to search for all matches in each of the input strings (notjust the first match).o [g]sub() now have a 'useBytes' argument like grep() and regexpr().o [g]sub(perl = TRUE) support \L and \U in the replacement.o iconv() has been moved from 'utils' to 'base'.o identify()'s default method has additional arguments 'atpen'and 'tolerance' (following S).o KalmanForecast() and KalmanLike() now have an optional argumentfast=FALSE to prevent their arguments being modified.o Exact p-values are available in ks.test() for the one-sided andtwo-sided one-sample Kolmogorov-Smirnov tests.o labels() now has a method for "dist" objects (replacing thatfor names() which was withdrawn in 2.1.0).o library() now explicitly checks for the existence ofdirectories in 'lib.loc': this avoids some warning messages.o loadNamespace(keep.source=) now applies only to that name spaceand not others it might load to satisfy imports: this is nowconsistent with library().o match.arg() has a new argument 'several.ok = FALSE'.o max.col() has a new argument for non-random behavior in thecase of ties.o memory.profile() now uses the type names returned by typeof()and no longer has two unlabelled entries.o methods() now warns if it appears to have been called on anon-generic function.o The default mosaicplot() method by default draws grey boxes.o nlminb(), similar to that in S-PLUS, added to package 'stats'.o New algorithm "port" (the nl2sol algorithm available in thePort library on netlib) added to the nls() function in the'stats' package.o object.size() now supports more types, including externalpointers and weak references.o options() now returns its result in alphabetical order, and isdocumented more comprehensively and accurately. (Now alloptions used in base R are documented, includingplatform-specific ones.)Some options are now set in the package which makes use ofthem (grDevices, stats or utils) if not already set when thepackage is loaded.o New option("OutDec") to set the decimal point for output conversions.o New option("add.smooth") to add smoothers to a plot, currentlyonly used by plot.lm().o pie() has new optional arguments 'clockwise' and 'init.angle'.o plot.lm() has two new plots (for 'which' = 5 or 6), plottingresiduals or cook distances versus (transformed) leverages - unlessthese are constant. Further, the new argument 'add.smooth' adds aloess smoother to the point plots by default, and 'qqline = TRUE'adds a qqline() to the normal plot.The default for 'sub.caption' has been improved for long calls.o R.home() has been expanded to return the paths to components(which can as from this version be installed elsewhere).o readbin() and writeBin() now support raw vectors as well asfilenames and connections.o read.dcf() can now read gzipped files.o read.table() now passes 'allowEscapes' to scan().o sample(x, size, prob, replace = TRUE) now uses a fasteralgorithm if there are many reasonably probable values. (Thisdoes mean the results will be different from earlier versionsof R.) The speedup is modest unless 'x' is very large _and_'prob' is very diffuse so that thousands of distinct valueswill be generated with an appreciable frequency.o scatter.smooth() now works a bit more like other plottingfunctions (e.g., accepts a data frame for argument 'x').Improvements suggested by Kevin Wright.o signif() on complex numbers now rounds jointly to give therequested number of digits in the larger component, notindependently for each component.o New generic function simulate() in the 'stats' package withmethods for some classes of fitted models.o smooth.spline() has a new argument 'keep.data' which allows toprovide residuals() and fitted() methods for smoothing splines.o Attempting source(file, chdir=TRUE) with a URL or connectionfor 'file' now gives a warning and ignores 'chdir'.o source() closes its input file after parsing it rather thanafter executing the commands, as used to happen prior to2.1.0. (This is probably only significant on Windows wherethe file is locked for a much shorter time.)o split(), split<-(), unsplit() now have a new argument 'drop = FALSE',by default not dropping empty levels; this is *not* back compatible.o sprintf() now supports asterisk `*' width or precisionspecification (but not both) as well as `*1$' to `*99$'. Also thehandling of `%' as conversion specification terminator is nowleft to the system and doesn't affect following specifications.o The plot method for stl() now allows the colour of the rangebars to be set (default unchanged at "light gray").o Added tclServiceMode() function to the tcltk package to allowupdating to be suspended.o terms.formula() no longer allows '.' in a formula unless thereis a (non-empty) 'data' argument or 'allowDotAsName = TRUE' issupplied. We have found several cases where 'data' had notbeen passed down to terms() and so '.' was interpreted as asingle variable leading to incorrect results.o New functions trans3d(), the 3D -> 2D utility from persp()'sexample, and extendrange(), both in package 'grDevices'.o TukeyHSD() now returns p-values adjusted for multiple comparisons(based on a patch contributed by Fernando Henrique Ferraz P. da Rosa).o New functions URLencode() and URLdecode(), particularly for usewith file:// URLs. These are used by e.g. browse.env(),download.file(), download.packages() and various help() printmethods.o Functions utf8ToInt() and intToUtf8() to work with UTF-8encoded character strings (irrespective of locale or OS-levelUTF-8 support).o [dqp]wilcox and wilcox.test work better with one very large samplesize and an extreme first argument.o write() has a new argument 'sep'.o write.csv[2] now also support row.names = FALSE.o The specification of the substitutions done when processingRenviron files is more liberal: see ?Startup. It nowaccepts forms like R_LIBS=${HOME}/Rlibrary:${WORKGRP}/R/lib .o Added recommendation that packages have an overview man page<pkg>-package.Rd, and the promptPackage() function to create askeleton version.o Replacement indexing of a data frame by a logical matrix indexcontaining NAs is allowed in a few more cases, in particularalways when the replacement value has length one.o Conversion of .Rd files to latex now handles encoding morecomprehensively, including some support for UTF-8.o The internal regex code has been upgraded to glibc-2.3.5.Apart from a number of bug fixes, this should be somewhatfaster, especially in UTF-8 locales.o PCRE has been updated to version 6.2.o zlib has been updated to version 1.2.3.o bzip2 has been updated to version 1.0.3.o Complex arithmetic is now done by C99 complex types wheresupported. This is likely to boost performance, but issubject to the accuracy with which it has been implemented.o The printing of complex numbers has changed, handling numbersas a whole rather than in two parts. So both real andimaginary parts are shown to the same accuracy, with the'digits' parameter referring to the accuracy of the largercomponent, and both components are shown in fixed orscientific notation (unless one is entirely zero when it isalways shown in fixed notation).o Error messages from .C() and .Fortran(), and from parsing errors,are now more informative.o The date and date-time functions work better with dates morethan 5000 years away from 1970-01-01 (by making dubiousassumptions about the calendar in use).o There is now a traditional Chinese translation, and a much moreextensive Russian translation.DEPRECATED & DEFUNCTo Capability "IEEE754" is defunct.o loadURL() is defunct: use load(url()).o delay() is defunct: use delayedAssign() instead.o The 'CRAN' argument to update.packages(), old.packages(),new.packages(), download.packages() and install.packages() isdefunct in favour of 'repos'.o write.table0() is deprecated in favour of the much fasterwrite.table().o format.char() is deprecated in favour of format.default().o R_HOME/etc/Rprofile is no longer looked for ifR_HOME/etc/Rprofile.site does not exist. (This has beenundocumented since R 1.4.0.)o CRAN.packages() is deprecated in favour of available.packages().o Rd.sty no longer processes pre-2.0.0 conversions containing \Link.o The stubs for the defunct device GNOME/gnome have been removed.o print.matrix() (which has been identical to print.default sinceR 1.7.0) has been removed.INSTALLATIONo LDFLAGS now defaults to -L/usr/local/lib64 on most Linux64-bit OSes (but not ia64). The use of lib/lib64 can beoverridden by the new variable LIBnn.o The default installation directory is now ${prefix}/${LIBnn}/R,/usr/local/lib64/R on most 64-bit Linux OSes and /usr/local/lib/Relsewhere.o The places where the doc, include and share directory trees areinstalled can be specified independently: see the R-admin manual.o We now test for wctrans_t, as apparently some broken OSes havewctrans but not wctrans_t (which is required by the relevantstandards) .o Any external BLAS found is now tested to see if the complexroutine zdotu works correctly: this provides a compatibilitytest of compiler return conventions.o Installation without NLS is now cleaner, and does not installany message catalogues.o src/modules/lapack/dlamc.f is now compiled with -ffloat-storeif f2c/gcc are used, as well as if g77 is used.o All the Fortran code has been checked to be fully F77compliant so there are no longer any warnings from F95compilers such as gfortran.o The (not-recommended) options --with-system-zlib,--with-system-bzlib and -with-system-pcre now have 'system' inthe name.o If a Java runtime environment is detected at configure timeits library path is appended to LD_LIBRARY_PATH or equivalent.New Java-related variables JAVA_HOME (path to JRE/JDK), JAVA_PROG(path to Java interpreter), JAVA_LD_PATH (Java library path)and JAVA_LIBS (flags to link against JNI) are made availablein Makeconf.o Ei-ji Nakama was contributed a patch for FPU control with theIntel compilers on ix86 Linux.MAC OS X INSTALLATIONo --with-blas="-framework vecLib" --with-lapack and--with-aqua are now the default configure options.o The default framework version name was changed to not containthe patch level (i.e. it is now 2.2 instead of 2.2.0). Alsoit can be overridden at configure time by setting FW_VERSIONto the desired name.o The Rmath stand-alone library is now correctly installed insidethe R.framework if R was configured as a framework. Inaddition, make install-Rmath-framework will install astand-alone Rmath framework in /Library/Frameworks (unlessoverridden by RMATH_FRAMEWORK_DIR specifying full frameworkpath and name including the .framework extension).PACKAGE INSTALLATIONo The encoding for a packages' 00Index.html is chosen from theEncoding: field (if any) of the DESCRIPTION file and from the\encoding{} fields of any Rd files with non-ASCII titles.If there are conflicts, first-found wins with a warning.o R_HOME/doc/html/packages.html is now remade by R not Perl code.This may result in small changes in layout and a change inencoding (to UTF-8 where supported).o The return value of new.packages() is now updated for anypackages which may be installed.o available.packages() will read a compressed PACKAGES.gz file inpreference to PACKAGES if available on the repository: thiswill reduce considerably the download time on a dialup connection.The downloaded information about a repository is cached for thecurrent R session.o The information about library trees found byinstalled.packages() is cached for the current session, andupdated only if the modification date of the top-leveldirectory has been changed.o A data index is now installed for a package with a 'data' dirbut no 'man' dir (even though it will have undocumented data objects).o contrib.url path for type="mac.binary" has changed frombin/macosx/<version> to bin/macosx/<arch>/contrib/<version>where <arch> corresponds to R.version$archUTILITIESo checkFF() used by R CMD check has since R 2.0.0 not reportedmissing PACKAGE arguments when testing installed packages withname spaces. It now- treats installed and source packages in the same way.- reports missing arguments unless they are in a function inthe name space with a useDynLib declaration (as theappropriate DLL for such calls can be searched for).o Rd2dvi sets the encoding(s) used appropriately. If UTF-8encoding is used, latex >= 2003/12/01 is required.o codoc() allows help files named pkg_name-defunct.Rd to haveundocumented arguments (and not just base-defunct.Rd).C-LEVEL FACILITIESo C function massdist() {called from density()} has new argument'xmass' (= weights).o Raw vectors passed to .C() are now passed as unsigned char *rather than as SEXPs. (Wish of Keith Frost, PR#7853)o The search for symbols in a .C/.Call/... call without apackage argument now searches for an enclosing name space andso finds functions defined within functions in a name space.o R_max_col() has new (5th) argument '*ties_meth' allowingnon-random behavior in the case of ties.o The header files have been rationalized: the BLAS routineLSAME is now declared in BLAS.h not Linpack.h, Applic.h nolonger duplicates routines from Linpack.h, and Applic.h isdivided into API and non-API sections.o memory.c has been instrumented so that Valgrind can track R'sinternal memory management. To use this, configure using--with-valgrind-instrumentation=levelwhere level is 1 or 2. Both levels will find more bugs withgctorture(TRUE). Level 2 makes Valgrind run extremely slowly.o Some support for raw vectors has been added to Rdefines.h.o R_BaseEnv has been added, to refer to the base environment.This is currently equal to R_NilValue, but it will change ina future release.BUG FIXESo %/% has been adjusted to make x == (x %% y) + y * ( x %/% y )more likely in cases when extended-precision registers wereinterfering.o Operations on POSIXct objects (such as seq(), max() andsubsetting) try harder to preserve time zones and warn ifinconsistent time zones are used.o as.function.default() no longer asks for a bug report whengiven an invalid body. (PR#1880, PR#7535, PR#7702)o Hershey fonts and grid output (and therefore lattice output)now rescale correctly in fit-to-window resizing on a Windowsgraphics device. Line widths also scale now.o Plotmath has more support for multibyte characters (contributedby Ei-ji Nakama).o The X11() device now hints the window manager so that decorationsappear reliably under e.g. the GNOME WM (contributedby Ei-ji Nakama).o Subsetting a matrix or an array as a vector used to attempt touse the row names to name the result, even though thearray might be longer than the row names. Now this is onlydone for 1D arrays when it is done in all cases, even matrixindexing. (Tidies up after the fix to PR#937.)o Constants in mathlib are declared 'const static double' toavoid performance issues with the Intel Itanium compiler.o The parser checks the format of numeric constants morethoroughly so for example '123E-' is no longer valid.o contourLines() no longer requires an open device (used tostart a device unnecessarily). Fix suggested by Barry Rowlingson.o capabilities() used partial matching but was not documentedto: it no longer does so.o kernel(1,0) printed wrongly; kernel(<name-string>, *) now returnsa named kernel in all cases; plot(kernel(.),..) is more flexible.o qgamma(1,s) didn't give +Inf for some s.o installed.packages() and download.packages() now alwaysreturn a matrix as documented, possibly with 0 rows (rather thana 0-length character vector or NULL).o Arithmetic operations on data frames no longer coerce thenames to syntatically valid names.o Units are now properly recycled in grid layoutswhen 'widths' or 'heights' are shorter than the number ofcolumns or rows (PR#8014).o DF <- data.frame(A=1:2, B=3:4); DF[1, 1:3] <- NULL gave a wrongerror message.o spline()/spinefun()'s C code had a memory access buglet whichnever lead to incorrect results. (PR#8030)o sum() was promoting logical arguments to double not integer(as min() and other members of its group do).o loess() had a bug causing it to occasionally miscalculatestandard errors (PR#7956). Reported by Benjamin Tyner, fixedby Berwin Turlach.o library(keep.source=) was ignored if the package had aname space (the setting of options("keep.source.pkgs") wasalways used).o hist.POSIXct() and hist.Date() now respect par("xaxt").o The 'vfont' argument was not supported correctly in title(),mtext(), and axis(). The 'vfont' argument is superseded bythe par(family=) approach introduced in 2.0.0. This bug-fixjust updates the warning messages and documentation toproperly reflect the new order of things.o The C-level function PrintGenericVector could overflow ifasked to print a length-1 character vector of several thousandcharacters. This could happen when printing a list matrix,and was fatal up to 2.1.1 and silently truncated in 2.1.1 patched.o What happened for proc.time() and system.time() on(Unix-alike) systems which do not support timing wasincorrectly documented. (They both exist but throw an error.)Further, systen.time() would give an error in its on.exitexpression.o weighted.residuals() now does sensible things for glm() fits:in particular it now agrees with an lm() fit for a Gaussian glm()fit. (PR#7961).o The 'lm' and 'glm' methods for add1() took the weights andoffset from the original fit, and so gave errors in the(dubious) usage where the upper scope resulted in a smallernumber of cases to fit (e.g. by omitting missing values in newvariables). (PR#8049)o demo() had a 'device' argument that did nothing (although itwas documented to): it has been removed.o Setting new levels on a factor dropped all existingattributes, including class "ordered".o format.default(justify="none") now by default converts NAcharacter strings, as the other values always did.o format.info() often gave a different field width from format()for character vectors (e.g. including missing values ornon-printable characters).o axis() now ensures that if 'labels' are supplied as characterstrings or expressions then 'at' is also supplied (since thecalculated value for 'at' can change under resizing).o Defining S4 methods for "[" had resulted in changed behavior of S3dispatch in a very rare case which no longer happens.o Fixed segfault when PostScript font loading fails, e.g., whenR is unable to find afm files (reported by Ivo Welch).o R CMD BATCH <file> now also works when <file> does not end in anewline on Unix-alike platforms.o terms.formula() got confused if the 'data' argument was a list withnon-syntactic names.o prompt() and hence package.skeleton() now produce *.Rd files thatgive no errors (but warnings) when not edited, much more often.o promptClass() and promptMethods() now also escape "%" e.g. in '%*%'and the latter gives a message about the file written.o wilcox.test() now warns when conf.level is set higher thanachievable, preventing errors (PR#3666) and incorrect answerswith extremely small sample sizes.o The default (protection pointer) stack size (the default for'--max-ppsize') has been increased from 10000 to 50000 in order tomatch the increased default options("expressions") (in R 2.1.0).o The R front-end was expecting --gui=tk not Tk as documented,and rejecting --gui=X11.o Rdconv -t latex protected only the first << and >> in a chunkagainst conversion to guillemets.o callNextMethod() and callGeneric() have fixes related tohandling arguments.o ls.diag() now works for fits with missing data. (PR#8139)o window.default() had an incorrect tolerance and so sometimescreated too short a series if 'start' or 'end' were zero.o Some (fairly pointless) cases of reshape left atemporary id variable in the result (PR#8152)o R CMD build used 'tar xhf' which is invalid on FreeBSD systems(and followed tar chf, so there could be no symbolic links inthe tarball).o Subassignment of length zero vectors to NULL gave garbageanswers. (PR#8157)o Automatic coercion of raw vectors to lists was missing, so for alist (or data frame) z, z[["a"]] <- raw_vector did not workand now does. This also affected DF$a <- raw_vector for adata frame DF.o The internal code for commandArgs() was missing PROTECTs.o The width for strwrap() was used as one less than specified.o R CMD INSTALL was not cleaning up after an unsuccessfulinstall of a non-bundle which was not already installed.*************************************************** ** 2.1 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.1.1 patchedBUG FIXESo runmed(x, k = -1) now gives an error instead of a seg.fault.o File creation errors in pdf(), postscript(), xfig() resultedin a pointer being freed twice. (Reported by Matt McCall)o model.matrix(~ .^2, data=foo) now works as most people wouldexpect (it used to expand '.' after using the a^2 = a rule).o ftable() and xtabs() had a check for interactions that wouldnot work correctly with '.' in the formula.o The formula method for pairs() was ignoring the na.action argument.o scan() with the default separator (only) was stripping backslashesinside quoted string inputs even if allowEscapes = FALSE.o The "col" parameter to pairs() is now treated consistently withplot(): it affects the data, not the axes. (Patch submittedby Olaf Mersmann)o Sweave failed for \Sexpr{character(0)}. Sweave-test-1.Rnwcontained a print() statement that is no longer needed.o Typo meant that R_alloc was limited to 2^31 not 2^34 on 64-bitbuilds of R.o pgamma(Inf, shape) did not terminate for shape = 1.1 and someother values (but not all) (PR#8001). This affectedpchisq(Inf, df1) and pf(Inf, df1, Inf) for some values of df1.o regexpr("[a-z]", ...) could cause a buffer overrun with multi-bytecharacter sets, leading to random errors later.o Installing a package with a 'data' directory which containsfiles but those files generate no objects (e.g. the BioCpackage makecdfenv) created an incorrectly formatted dataindex that data(package="pkg") could not read.o density(1/(0:2)) now works again (PR#8033).o make.names() was not respecting the allow_=FALSE argument.o Arg(-1) now gives pi, not 0; Arg(0i + -1) always worked.o --enable-linux-lfs had been broken at 2.1.0.o Printing was not allowing for double-width characters in itslayout.o axTicks() is now also correct for reverse axis. (PR#7973)o signif() rounded some numnbers near 1e-308 to the wrongnumber of places (this showed up in the print-tests.R), and madeunnecessary rounding errors on some platforms on e.g. signif(18000, 3).o window() was sometimes failing incorrectly due to representationerrors when the new and old deltat were not both integers(e.g. multiples of 0.1).o The 'lm' methods for add1() and drop1() ignored offsets (whichwere added for lm() after they written). (PR#8049)o atan2(0+1i, 0+0i) was incorrectly NA (from a typo in complex.c).o The POSIXct method for as.Date() was rounding part daysbefore 1970-01-01 upwards rather than discarding them.o qpois() was using an incorrect starting point and so could beunnecessarily slow for large lambda. (PR#8058)o Formatting of complex numbers with nsmall > 0 could beincorrect (and was in print-tests.Rout) because of a typo.o The test for new levels when predicting using model.frame()sometimes reported levels that were not actually used.o order(c("5","6",NA,"4",NA), na.last=FALSE) was incorrect.o Coercion to raw could give spurious messages about discardingimaginary parts.Coercion of a list to raw was behaving inconsistently forout-of-range values (and not warning).o cor.test(method = "spearman") gave NA p-values for _very_ longvectors. (PR#8087)o Switching to the Mersenne-Twister RNG could cause a segfault onfirst use.A user-supplied RNG without user_unif_{nseed,seedloc} wasbeing re-initialized at each call.o Reading very short tables from stdin() with read.table wouldfail because of a typo.CHANGES IN R VERSION 2.1.1NEW FEATURESo bug.report() now reports the locale in use.o upgrade.packageStatus() allows user input "c" to cancel theupgrade, just as update.packages() does.o glm() now accepts 1D arrays (e.g. tables) as a response,dropping them to a vector whilst preserving names.o df() with one infinite df now works (to match pf()).o Added tclServiceMode() function to the tcltk package to allowupdating to be suspended.o The Encoding: field of a DESCRIPTION file is now documented,and used by packageDescription() and library(help=).o There has been progress on translations: existing translationshave been revised and expanded, and French and Korean havebeen added.The Windows installer supports a wide range of languages forinstallation.BUG FIXESo lm(qr=FALSE) now works.o predict.glm() not longer loses names for "response" predictions.(PR#7792)o Typo in menu(graphics=TRUE) meant it failed on Unix if tcltkwas not available.o When names.dist() was removed, the result of cmdscale() lostits rownames. The example also lost the labels.o R CMD check assumed 'tar' was GNU tar and so supported -z.o read.table() was not handing escaped quotes inside quoted fieldsin the first five lines of the file. (PR#7789)It was also not handling correctly EOF in the first five lineswhen reading from stdin(). (PR#7772)o 'make uninstall' was incomplete.o make.packages.html() called by help.start() was failing ifthere were installed packages with help titles invalid in thecurrent locale.o printCoefmat(signif.legend = FALSE) was non-functional. (PR#7802)o Some as.date.frame() methods failed because the expressiondeparsed into multiple lines. (PR#7808)o setRepositories() had a typo. (PR#7810)o Printing arrays/data frames with multibyte characters in thecolumn labels was sometimes misaligned or using excessive space.(PR#7803)o The Tcl/Tk console did not support multibyte characters.o as.POSIXlt() could give infinite recursion if passed a corrupt"POSIXct" object (generated by an incorrect call to c.POSIXct,PR#7826).o update.packages() was not passing 'type' correctly toinstall.packages().o Printing the result of an unbalanced model.tables() callsometimes got confused if terms() had rearranged interactionterms. (PR#7829)o .Platform$pkgType was wrong on the CRAN MacOS X build, and.install.macbinary() was missing.o as.personList() as used by citation() got confused by namescontaining "and". (PR#7797)o Subscripting an array by a matrix containing zero or negativevalues or the wrong number of columns was not handledconsistently. (PR#7824)o select.list(multiple=TRUE) now detects and tries again for invalidtext input.o add1.[g]lm could give strange results with interaction termswhen the model and the upper scope had different orders forthe main effects. (PR#7842)o A bug had sneaked into the anova.mlmlist() code, affecting theGreenhouse-Geisser epsilon. Code wrongly assumed a matrix tobe symmetric. (Thanks to Bela Bauer.)o anova.mlmlist() and mauchley.test() are now more tolerant to rankdeficiency in the M and X matrices (also when they are implicitlygenerated via model.matrix()).o anova.mlm had a scoping issue (PR#7898)o pf() with infinite df is allowed again. It is now more accuratefor extreme ratios of dfs, especially when there is anon-centrality parameter.o df() was inaccurate for large df (1e16 or greater).o dt() was inaccurate for large df (1e9 or greater) with anon-centrality parameter.o runmed(*, algorithm="Turlach") seg.faulted in rare cases.o strwrap() now makes a reasonable job of text that is invalid in thecurrent locale.o Reading with encoding "UCS-2LE" will remove any Byte OrderMark, as most implementations of iconv fail to handle BOMs(which are present in 'Windows Unicode' files).o unique() for a list was incorrectly reporting `unimplemented'.o The parser's contextstack was not protected against overflow,e.g. more than 50 unmatched '('. (PR#7859)o source(file, chdir = TRUE) was not checking that 'file' was afilepath (rather than a URL). For 2.1.0 only, it did not workeven if 'file' was a filepath.o Hershey fonts were being sized based on pixels not points so cameout too small on devices where pixels were noticeably differentfrom points (e.g., win.printer() and high-resolution screens).Fix means that default size of Hershey fonts may be slightlydifferent, for example, smaller by default on PostScript and PDF.o The branch cuts in the complex versions of the inversetrigonometric and hyperbolic functions were non-standard.(PR#7871)o truncate() on file() connections was limited to files < 2Gb. Itnow works for larger files at least on 64-bit OSes and otherswhere ftruncate supports such files. (Related to PR#7879)o proj.aovlist() did not work correctly on objects fitted from adata frame with row names.o The coding standards recommendations hadnuke-trailing-whitespace where newer versions of ESS needess-nuke-trailing-whitespace. (PR#7888)o package.skeleton() missed the first newline in the DESCRIPTION file.o pbirthday() reported p = 1 too often when coincident > 2.o plot(1:3, exp(1:3), log = "y", ylim = c(30,1)) {reversedlog-scale axis} now works, based on Uwe Ligges' suggestions.(PR#7894)o install.packages() was aborting when a package in a bundle waschosen from a menu. It failed if more than one package in abundle was chosen from the command line.o qcauchy() suffered from underflow in the extreme tails. (PR#7902)o Printing of raw matrices/arrays was not implemented. (PR#7912)o getCallingDLL()'s default first argument did not correspond toits description and has been changed. The mismatch causedsymbols in .C/.Call/.Fortran calls without a PACKAGE= argumentto be potentially looked up in the wrong name space.o Binary save() of raw vectors was not working correctly onbig-endian platforms. (PR#7812)o as.Date.factor() now accepts a format argument.o Workaround added for FreeBSD which does not have alloca.h _and_does not allow alloca() to be declared.o identify() now respects 'cex'. (PR#660)Warnings from identify() are now printed immediately even onconsoles with delayed printing.CHANGES IN R VERSION 2.1.0USER-VISIBLE CHANGESo box plots {by boxplot() or bxp()} now have the median line threetimes the normal line width in order to distinguish it from thequartile ones.o Unix-alike versions of R can now be used in UTF-8 locales onsuitably equipped OSes. See the internationalization sectionbelow.o The meaning of 'encoding' for a connection has changed: See theinternationalization section below.o There has been some rationalization of the format ofwarning/error messages, to make them easier to translate.Generally names of functions and arguments are single-quoted,and classes double-quoted.o Reading text files with embedded "\" (as in Windows file names)may now need to use scan(* , allowEscapes = FALSE), see also below.NEW FEATURESo %% now warns if its accuracy is likely to be affected by lackof precision (as in 1e18 %% 11, the unrealistic expectation ofPR#7409), and tries harder to return a value in range when it is.o abbreviate() now warns if used with non-ASCII chars, as thealgorithm is designed for English words.o The default methods for add1() and drop1() check for changesin the number of cases in use.The "lm" and "glm" methods for add1() quoted the <none> modelon the original fitted values when using (with a warning) asmaller set of cases for the expanded models.o Added alarm() function to generate a bell or beep or visual alert.o all/any() now attempt to coerce their arguments to logical, asdocumented in the Blue Book. This means e.g. any(list()) works.o New functions for multivariate linear models: anova.mlm(),SSD(), estVar(), mauchley.test() (for sphericity).vcov() now does something more sensible for "mlm" class objects.o as.data.frame.table() has a new argument 'responseName'(contributed by Bill Venables).o as.dist() and cophenetic() are now generic, and the latter has anew method for objects of class "dendrogram".o as.ts() is now generic.o binomial() has a new "cauchit" link (suggested by Roger Koenker).o chisq.test() has a new argument 'rescale.p'. It is now possibleto simulate (slowly) the P value also in the 1D case(contributed by Rolf Turner).o choose(n,k) and lchoose(.) now also work for arbitrary (real) nin accordance with the general binomial theorem. choose(*,k)is more accurate (and faster) for small k.o Added colorRamp() and colorRampPalette() functions for colorinterpolation.o colSums()/rowSums() now allow arrays with a zero-length extent(requested by PR#7775).o confint() has stub methods for classes "glm" and "nls" thatinvoke those in package MASS. This avoids using the "lm"method for "glm" objects if MASS is not attached.confint() has a default method using asymptotic normality.o contr.SAS() has been moved from the 'nlme' package to the'stats' package.o New function convertColors() maps between color spaces.colorRamp() uses it.o The cov() function in the non-Pearson cases now ranks data afterremoval of missing values, not before. The pairwise-completemethod should now be consistent with cor.test. (Codecontributed by Shigenobu Aoki.)o Added delayedAssign() function to replace delay(), which is nowdeprecated.o dir.create() has a new argument 'recursive' serving the samepurpose as Unix's mkdir -p.o do.call() now takes either a function or a character string asits first argument. The supplied arguments can optionally bequoted.o duplicated() and unique() now accept "list" objects, but arefast only for simple list objects.o ecdf() now has jumps of the correct size (a multiple of 1/n)if there are ties. (Wished by PR#7292).o eff.aovlist() assumed orthogonal contrasts for any termwith more than one degree of freedom: this is now documentedand checked for. Where each term only occurs in only onestratum the efficiencies are all one: this is detected andorthogonal contrasts are not required.o New function encodeString() to encode character strings in thesame way that printing does.o file("clipboard") now work for reading the primary selection onUnix-alikes with an active X11 display. (It has long workedfor reading and writing under Windows.) The secondaryselection can also be read: see ?file.file() now allows mode "w+b" as well as "w+".o file.append() has been tuned, including for the case ofappending many files to a single file.o Functions flush.console() and select.list() are now availableon all platforms. There is a Tcl/Tk-based version ofselect.list() called tk_select.list() in package tcltk.o gc() now reports maximum as well as current memory use.o A new function getGraphicsEvent() has been added which will allowmouse or keyboard input from a graphics device. (NB: currentlyonly the Windows screen device supports this function. Thisshould improve before the 2.1.0 release.)o New functions gray.colors()/grey.colors() for gray colorpalettes.o grep(), gsub(), sub() and regexpr() now always attempt tocoerce their 'pattern', 'x', 'replacement' and 'text'arguments to character. Previously this was undocumented butdone by [g]sub() and regexpr() for some values of theirother arguments. (Wish of PR#7742.)o gsub/sub() have a new 'fixed' method.o New function hcl() for creating colors for a given hue,chroma and luminance (i.e. perceptual hsv).o isTRUE() convenience function to be used for programming.o kmeans() now returns an object of class "kmeans" which has aprint() method.Two alternative algorithms have been implemented.If the number of centres is supplied, it has a new option ofmultiple random starts.o The limits on the grid size in layout() are now documented, andhave been raised somewhat by using more efficient internalstructures.o legend() now accepts positioning by keyword, e.g. "topleft",and can put a title within the legend. (Suggested by ElizabethPurdom in PR#7400.)o mahalanobis() now has a '...' argument which is passed to solve()for computing the inverse of the covariance matrix, this replacesthe former 'tol.inv' argument.o menu() uses a multi-column layout if possible for more than10 choices.menu(graphics = TRUE) is implemented on most platforms viaselect.list() or tk_select.list().o New function message() in 'base' for generating "simple"diagnostic messages, replacing such a function in the'methods' package.o na.contiguous() is now (S3) generic with first argumentrenamed to 'object'.o New function normalizePath() to find canonical paths (and onWindows, canonical names of components).o The default in options("expressions") has been increased to 5000,and the maximal settable value to 500000.o p.adjust() has a new method "BY".o pbeta() now uses a different algorithm for large values of atleast one of the shape parameters, which is much faster and isaccurate and reliable for very large values. (This affectspbinom(), pf(), qbeta() and other functions using pbeta at Clevel.)o pch="." now by default produces a rectangle at least 0.01" perside on high-resolution devices. (It used to be one-pixelsquare even on high-resolution screens and Windows printers,but 1/72" on postscript() and pdf() devices.) Additionally,the size is now scalable by 'cex'; see ?points and note thatthe details are subject to change.o pdf() now responds to the 'paper' and 'pagecentre'arguments. The default value of 'paper' is "special"for backward-compatibility (this is different from thedefault for postscript()).o plot.data.frame() tries harder to produce sensible plots fornon-numeric data frames with one or two columns.o The predict() methods for "prcomp" and "princomp" now matchthe columns of 'newdata' to the original fit using columnnames if these are available.o New function recordGraphics() to encapsulate calculationsand graphics output together on graphics engine display list.To be used with care.o New function RSiteSearch() to query R-related resourceson-line (contributed by Jonathan Baron and Andy Liaw).o scan() arranges to share storage of duplicated characterstrings read in: this can dramatically reduce the memoryrequirements for large character vectors which willsubsequently be turned into factors with relatively fewlevels. For a million items this halved the time and reducedstorage by a factor of 20.scan() has a new argument 'allowEscapes' (default TRUE) thatcontrols when C-style escapes in the input are interpreted.Previously only \n and \r were interpreted, and then onlywithin quoted strings when no separator was supplied.scan() used on an open connection now pushes back on theconnection its private `ungetc' and so is safer to use toread partial lines.o scatter.smooth() and loess.smooth() now handle missing valuesin their inputs.o seq.Date() and seq.POSIXt() now allow 'to' to be before 'from'if 'by' is negative.o sprintf() has been enhanced to allow the POSIX/XSI specifierslike "%2$6d", and also accepts "%x" and "%X".sprintf() does limited coercion of its arguments.sprintf() accepts vector arguments and operates on them inparallel (after re-cycling if needed).o New function strtrim() to trim character vectors to a displaywidth, allowing for double-width characters in multi-bytecharacter sets.o subset() now has a method for matrices, similar to that fordata frames.o Faster algorithm in summaryRprof().o sunflowerplot() has new arguments 'col' and 'bg'.o sys.function() now has argument 'which' (as has long beenpresaged on its help page).o Sys.setlocale("LC_ALL", ) now only sets the locale categorieswhich R uses, and Sys.setlocale("LC_NUMERIC", ) now gives awarning (as it can cause R to malfunction).o unclass() is no longer allowed for environments and externalpointers (since these cannot be copied and so unclass() wasdestructive of its argument). You can still change the"class" attribute.o File-name matching is no longer case-insensitive with unz()connections, even on Windows.o New argument 'immediate.' to warning() to send an immediatewarning.o New convenience wrappers write.csv() and write.csv2().o There is a new version for write.table() which is implemented in C.For simple matrices and data frames this is several timesfaster than before, and uses negligible memory compared to theobject size.The old version (which no longer coerces a matrix to a dataframe and then back to a matrix) is available for now aswrite.table0().o The functions xinch(), yinch(), and xyinch() have been movedfrom package 'grDevices' into package 'graphics'.o Plotmath now allows underline in expressions. (PR#7286,contributed by Uwe Ligges.)o BATCH on Unix no longer sets --gui="none" as the X11 moduleis only loaded if needed.o The X11 module (and the hence X11(), jpeg() and png() devicesand the X-based dataentry editor) is now in principleavailable under all Unix GUIs except --gui="none", and this isreflected in capabilities().capabilities("X11") determines if an X server can be accessed,and so is more likely to be accurate.o Printing of arrays now honours the 'right' argument if thereare more than two dimensions.o Tabular printing of numbers now has headers right-justified, asthey were prior to version 1.7.0 (spotted by Rob Baer).o Lazy-loading databases are now cached in memory at first use:this enables R to run much faster from slow file systems suchas USB flash drives. There is a small (less than 2Mb)increase in default memory usage.o The implicit class structure for numeric vectors has beenchanged, so that integer/real vectors try first methods forclass "integer"/"double" and then those for class "numeric".The implicit classes for matrices and arrays have been changedto be "matrix"/"array" followed by the class(es) of theunderlying vector.o splines::splineDesign() now allows the evaluation of a B-splinebasis everywhere instead of just inside the "inner" knots, bysetting the new argument `outer.ok = TRUE'.o Hashing has been tweaked to use half as much memory as before.o Readline is not used for tilde expansion when R is run with--no-readline, nor from embedded applications. Then "~name"is no longer expanded, but "~" still is.o The regular expression code is now based on that in glibc 2.3.3.It has stricter conformance to POSIX, so metachars such as{ } + * may need to be escaped where before they did not(but could have been).o New encoding 'TeXtext.enc' improves the way postscript() workswith Computer Modern fonts.o Replacement in a non-existent column of a data frame triesharder to create a column of the correct length and so avoid acorrupt data frame.o For Windows and readline-based history, the saved file size isre-read from R_HISTSIZE immediately before saving.o Collected warnings during start-up are now printed before theinitial prompt rather than after the first command.o Changes to package 'grid':- preDrawDetails(), drawDetails(), and postDrawDetails()methods are now recorded on the graphics enginedisplay list. This means that calculations within thesemethods are now run when a device is resized orwhen output is copied from one device to another.- Fixed bug in grid.text() when 'rot' argument has length 0.(privately reported by Emmanuel Paradis)- New getNames() function to return just the names of all top-levelgrobs on the display list.- Recording on the grid display list is turned off withinpreDrawDetails(), drawDetails(), and postDrawDetails() methods.- Grid should recover better from errors or user-interruptsduring drawing (i.e., not leave you in a strange viewportor with strange graphical parameter settings).- New function grid.refresh() to redraw the grid display list.- New function grid.record() to capture calculationswith grid graphics output.- grobWidth and grobHeight ("grobwidth" and "grobheight" units)for primitives (text, rects, etc, ...) are nowcalculated based on a bounding box for the relevant grob.NOTE: this has changed the calculation of the size of a scalarrect (or circle or lines).- New arguments 'warn' and 'wrap' for function grid.grab()- New function grid.grabExpr() which captures the output froman expression (i.e., not from the current scene) withoutdoing any drawing (i.e., no impact on the current scene).- upViewport() now (invisibly) returns the path that it goes up(suggested by Ross Ihaka).- The 'gamma' gpar has been deprecated (this is a device propertynot a property of graphical objects; suggested by Ross Ihaka).- New 'lex' gpar; a line width multiplier.- grid.text() now handles any language object as mathematicalannotation (instead of just expressions).- plotViewport() has default value for 'margins' argument (that matchthe default value for par(mar)).- The 'extension' argument to dataViewport() can now be vector,in which case the first value is used to extend the xscale andthe second value is used to extend the y scale.(suggested by Ross Ihaka).- All 'just' arguments (for viewports, layouts, rectangles, text)can now be numeric values (typically between 0 [left] and 1 [right])as well as character values ("left", "right", ...).For rectangles and text, there are additional 'hjust' and 'vjust'arguments which allow numeric vectors of justification ineach direction (e.g., so that several pieces of text can havedifferent justifications).(suggested by Ross Ihaka)- New 'edits' argument for grid.xaxis() and grid.yaxis() toallow specification of on-the-fly edits to axis children.- applyEdit(x, edit) returns x if target of edit (i.e., childspecified by a gPath) cannot be found.- Fix for calculation of length of max/min/sum unit. Length isnow (correctly) reported as 1 (was reported as length of first arg).- Viewport names can now be any string (they used to have to be avalid R symbol).- The 'label' argument for grid.xaxis() and grid.yaxis() can nowalso be a language object or string vector, in which case itspecifies custom labels for the tick marks.INTERNATIONALIZATIONo Unix-alike versions of R can now be used in UTF-8 and othermulti-byte locales on suitably equipped OSes if configuredwith option --enable-mbcs (which is the default). [Thechanges to font handling in the X11 module are based on theJapanization patches of Ei-ji Nakama.]Windows versions of R can be used in `East Asian' locales onsuitable versions of Windows.See the 'Internationalization' chapter in the 'Installationand Administration' manual.o New command-line flag --encoding to specify the encoding tobe assumed for stdin (but not for a console).o New function iconv() to convert character vectors betweenencodings, on those OSes which support this. See the newcapabilities("iconv").o The meaning of 'encoding' for a connection has changed: it nowallows any charset encoding supported by iconv on theplatform, and can re-encode output as well as input.As the new specification is a character string and the old wasnumeric, this should not cause incorrect operation.o New function localeToCharset() to find/guess encoding(s) fromthe locale name.o nchar() returns the true number of bytes stored (including anyembedded nuls), this being 2 for missing values. It has anoptional argument 'type' with possible non-default values"chars" and "width" to give the number of characters or thedisplay width in columns.o Characters can be entered in hexadecimal as e.g. \x9c, and inUTF-8 and other multibyte locales as \uxxxx, \u{xxxx},\Uxxxxxxxx or \U{xxxxxxxx}. Non-printable Unicode charactersare displayed C-style as \uxxxx or \Uxxxxxxxx.o LC_MONETARY is set to the locale, which affects the result ofSys.localeconv(), but nothing else in R itself. (It couldaffect add-on packages.)o source() now has an 'encoding' argument which can be used tomake it try out various possible encodings. This is made useof by example() which will convert (non-UTF-8) Latin-1 examplefiles in a UTF-8 locale.o read/writeChar() work in units of characters, not bytes.o .C() now accepts an ENCODING= argument where re-encoding issupported by the OS. See `Writing R Extensions'.o delimMatch (tools) now reports match positions and lengths inunits of characters, not bytes. The delimiters can bestrings, not just single ASCII characters.o .Rd files can indicate via a \encoding{} argument the encodingthat should be assumed for non-ASCII characters they contain.o Phrases in .Rd files can be marked by \enc{}{} to show atransliteration to ASCII for use in e.g. text help.o The use of 'pch' in points() now allows for multi-byte charactersets: in such a locale a glyph can either be specified as amulti-byte single character or as a number, the Unicode point.o New function l10n_info() reports on aspects of thelocale/charset currently in use.o scan() is now aware of double-byte locales such as Shift-JISin which ASCII characters can occur as the second ('trail')byte.o Functions sQuote() and dQuote() use the Unicode directionalquotes if in a UTF-8 locale.o The infrastructure is now in place for C-level error and warningmessages to be translated and used on systems with NativeLanguage Support. This has been used for the startup messagein English and to translate Americanisms such as 'color' intoEnglish: translations to several other languages are underway, and some are included in this release.See 'Writing R Extensions' for how to make use of this in apackage: all the standard packages have been set up to dotranslation, and the 'language' 'en@quot' is implemented toallow Unicode directional quotes in a UTF-8 locale.o R-level stop(), warning() and message() messages can betranslated, as can other messages via the new functiongettext(). Tools xgettext() and xgettext2pot() are provided inpackage tools to help manage error messages.gettextf() is a new wrapper to call sprintf() usinggettext() on the format string.o Function ngettext() allows the management of singular andplural forms of messages.UTILITIESo New functions mirror2html() and checkCRAN().o R CMD check has a new option '--use-valgrind'.o R CMD check now checks that Fortran and C++ files have LFline endings, as well as C files. It also checks Makevars[.in]files for portable compilation flags.o R CMD check will now work on a source tarball and prints outinformation about the version of R and the package.o tools:::.install_package_code_files() (used to collate R fileswhen installing packages) ensures files are separated by aline feed.o vignette() now returns an object of class "vignette" whoseprint() method opens the corresponding PDF file. The edit()method can be used to open the code of the vignette in aneditor.o R CMD INSTALL on Unix has a new option '--build' matchingthat on Windows, to package as tarball the installed package.o R CMD INSTALL on Unix can now install binary bundles.o R CMD build now changes src files to LF line endings if necessary.o R CMD build now behaves consistently between source and binarybuilds: in each case it prepares a source directory and theneither packages that directory as a tarball or calls R CMDINSTALL --build on the prepared sources.This means that R CMD build --binary now respects.Rbuildignore and will rebuild vignettes (unless the option--no-vignettes is used). For the latter, it now installs thecurrent sources into a temporary library and uses that versionof the package/bundle to rebuild the vignettes.o R CMD build now reports empty directories in the source tree.o New function write_PACKAGES() in package 'tools' to help withpreparing local package repositories. (Based on a contributionby Uwe Ligges.) How to prepare such repositories isdocumented in the 'R Installation and Administration' manual.o package.skeleton() adds a bit more to DESCRIPTION.o Sweave changes:- \usepackage[nogin]{Sweave} in the header of an Sweave filesupresses auto-setting of the graphical parameter like widthof graphics.- The new \SweaveInput{} command works similar to LaTeX's\input{} command.- Option value strip.white=all strips all blank lines from theoutput of a code chunk.- Code chunks with eval=false are commented out by Stangle() andhence no longer tested by R CMD check.DOCUMENTATIONo File doc/html/faq.html no longer exists, and doc/manual/R-FAQ.html(which has active links to other manuals) is used instead.(If makeinfo >= 4.7 is not available, the version on CRAN islinked to.)o Manual 'Writing R Extensions' has further details on writingnew front-ends for R using the new public header files.o There are no longer any restrictions on characters in the\name{} field of a .Rd file: in particular _ is supported.C-LEVEL FACILITIESo There are new public C/C++ header files Rinterface.h andR_ext/RStartup.h for use with external GUIs.o Added an onExit() function to graphics devices, to be executedupon user break if non-NULL.o ISNAN now works even in C++ code that undefines the 'isnan' macro.o R_alloc's limit on 64-bit systems has been raised from justunder 2^31 bytes (2Gb) to just under 2^34 (16Gb), and is now checked.o New math utility functions log1pmx(x), lgamma1p(x),logspace_add(logx, logy), and logspace_sub(logx, logy).DEPRECATED & DEFUNCTo The aqua module for MacOS X has been removed: --with-aqua nowrefers to the unbundled Cocoa GUI.o Capabilities "bzip2", "GNOME, "libz" and "PCRE" are defunct.o The undocumented use of UseMethod() with no argument wasdeprecated in 2.0.1 and is now regarded as an error.o Capability "IEEE754" is deprecated.o The 'CRAN' argument to update.packages(), old.packages(),new.packages(), download.packages() and install.packages() isdeprecated in favour of 'repos', which replaces it as apositional argument (so this is only relevant for calls withnamed args).o The S3 methods for getting and setting names of "dist" objectshave been removed (as they provided names with a differentlength from the "dist" object itself).o Option "repositories" is no longer used and so not set.o loadURL() is deprecated in favour of load(url()).o delay() is deprecated. Use delayedAssign() instead.INSTALLATION CHANGESo New configure option --enable-mbcs to enable support forUTF-8 locales, on by default.o R_XTRA_[CF]FLAGS are now used during the configuration tests,and [CF]PICFLAGS if --enable-R-shlib was specified. Thisensures that features such as inlining are only used if thecompilation flags specified support them. (PR#7257)o Files FAQ, RESOURCES, doc/html/resources.html are no longer inthe SVN sources but are made by 'make dist'.o The GNOME GUI is unbundled, now provided as a package on CRAN.o Configuring without having the recommended packages is now anerror unless --with-recommended-packages=no (or equivalent) is used.o Configuring without having the X11 headers and libraries is nowan error unless --with-x=no (or equivalent) is used.o Configure tries harder to find a minimal set of FLIBS. Undersome circumstances this may remove from R_LD_LIBRARY_PATHpath elements that ought to have specified in LDFLAGS (butwere not).o The C code for most of the graphics device drivers and theirafm files are now in package grDevices.o R is now linked against ncurses/termlib/termcap only ifreadline is specified (now the default) and that requires it.o Makeinfo 4.7 or later is now required for building the HTML andInfo versions of the manuals.PACKAGE INSTALLATION CHANGESo There are new types of packages, identified by the Type fieldin the DESCRIPTION file. For example the GNOME console is nowa separate package (on CRAN), and translations can bedistributed as packages.o There is now support of installing from within R both source andbinary packages on MacOS X and Windows. Most of the Rfunctions now have a 'type' argument defaulting togetOption("pkgType") and with possible values "source","win.binary" and "mac.binary". The default is "source" exceptunder Windows and the CRAN GUI build for MacOS X.o install.packages() and friends now accept a vector of URLs for'repos' or 'contriburl' and get the newest available version ofa package from the first repository on the list in which it isfound. The argument 'CRAN' is still accepted, but deprecated.install.packages() on Unix can now install from local .tar.gzfiles via repos = NULL (as has long been done on Windows).install.packages() no longer asks if downloaded packagesshould be deleted: they will be deleted at the end of thesession anyway (and can be deleted by the user at any time).If the repository provides the information, install.packages()will now accept the name of a package in a bundle.If 'pkgs' is omitted install.packages() will use a listbox todisplay the available packages, on suitable systems.'dependencies' can be a character vector to allow only somelevels of dependencies (e.g. not "Suggests") to be requested.o There is a new possible value update.packages(ask="graphics")that uses a widget to (de)select packages, on suitable systems.o The option used is now getOption("repos") not getOption("CRAN")and it is initially set to a dummy value. Its value can be acharacter vector (preferably named) giving one or severalrepositories.A new function chooseCRANmirror() will select a CRAN mirror.This is called automatically if the contrib.url() encountersthe initial dummy value of getOption("repos")A new function setRepositories() can be used to creategetOption("repos") from a (platform-specific) list of knownrepositories.o New function new.packages() to report uninstalled packagesavailable at the requested repositories. This also reportsincomplete bundles. It will optionally install new packages.o New function available.packages(), similar to CRAN.packages()but for use with multiple repositories. Both now only reportpackages whose R version requirements are met.o update.packages() and old.packages() have a new option'checkBuilt' to allow packages installed under earlierversions of R to be updated.o remove.packages() can now remove bundles.o The Contains: field of the DESCRIPTION file of package bundlesis now installed, so later checks can find out if the bundleis complete.o packageStatus() is now built on top of *.packages, and gains a'method' argument. It defaults to the same repositories asthe other tools, those specified by getOption("repos").BUG FIXESo Configuring for Tcl/Tk makes use of ${TK_LIB_SPEC} ${TK_LIBS}not ${TK_LIB_SPEC} ${TK_XLIBSW}, which is correct forrecent versions of Tk, but conceivably not for oldtkConfig.sh files.o detach() was not recomputing the S4 methods for primitivescorrectly.o Methods package now has class "expression" partly fixed in basicclasses, so S4 classes can extend these (but "expression" ispretty broken as a vector class in R).o Collected warnings had messages with unneeded trailing space.o S4 methods for primitive functions must be exported fromname spaces; this is now done automatically.Note that is.primitive() is now in "base", not "methods".o Package grid:- Fixed bug in grid.text() when "rot" argument has length 0.(reported by Emmanuel Paradis)o .install_package_vignette_index() created an index even in anempty 'doc' directory.o The print() method for factors now escapes characters in thelevels in the same way as they are printed.o str() removed any class from environment objects.str() no longer interprets control characters in characterstrings and factor levels; also no longer truncates factorlevels unless they are longer than 'nchar.max'.Truncation of such long strings is now indicated ''outside''the string.str(<S4.object>) was misleading for the case of a single slot.str() now also properly displays S4 class definitions (such asreturned by getClass().o print.factor(quote=TRUE) was not quoting levels, causingambiguity when the levels contained spaces or quotes.o R CMD check was confused by a trailing / on a package name.o write.table() was writing incorrect column names if the dataframe contained any matrix-like columns.o write.table() was not quoting row names for a 0-column x.o t(x)'s default method now also preserves names(dimnames(x)) for1D arrays 'x'.o r <- a %*% b no longer produces names(dimnames(r)) == c("", "")unless one of a or b has named dimnames.o Some .Internal functions that were supposed to return invisiblydid not. This was behind PR#7397 and PR#7466.o eval(expr, NULL, encl) now looks up variables in encl, aseval(expr, list(), encl) always dido Coercing as.data.frame(NULL) to a pairlist caused an error.o p.adjust(p, ..) now correctly works when `p' contains NAs (or whenit is of length 0 or length 2 for method = "hommel").o 'methods' initialization was calling a function intended for.Call() with .C().o optim() needed a check that the objective function returns avalue of length 1 (spotted by Ben Bolker).o X11() was only scaling its fonts to pointsize if the dpiwas within 0.5 of 100dpi.o X11() font selection was looking for any symbol font, andsometimes got e.g. bold italic if the server has such a font.o dpois(*, lambda=Inf) now returns 0 (or -Inf for log).o Using pch="" gave a square (pch=0)! Now it is regarded as thesame as NA, which was also undocumented but omits the point.o Base graphics now notices (ab)lines which have a zerocoordinate on log scale, and omits them. (PR#7559)o stop() and warning() now accept NULL as they are documentedto do (although this seems of little use and is equivalent to "").o weighted.mean() now checks the length of the weight vector w.o getAnywhere() was confused by names with leading or trailing dots(spotted by Robert McGehee)o eval() was not handling values from return() correctly.o par(omd) is now of the form c(x1, x2, y1, y2) to match thedocumentation and for S-PLUS compatibility.[Previously, par(omd) was of the form c(bottom, left, top, right)like par(oma) and par(omi)]o formatC() did not check its 'flag' argument, and couldsegfault if it was incorrect. (PR#7686)o Contrasts needed to be coerced to numeric (e.g. from integer)inside model.matrix. (PR#7695)o socketSelect() did not check for buffered input.o Reads on a non-blocking socket with no available data werenot handled properly and could result in a segfault.o The "aovlist" method for se.contrast() failed in some verysimple cases that were effectively not multistratum designs,e.g. only one treatment occurring in only one stratum.o pgamma() uses completely re-written algorithms, and should workfor all (even very extreme) arguments; this is based on MortenWelinder's contribution related to PR#7307.o dpois(10, 2e-308, log=TRUE) and similar cases gave -Inf.o x <- 2^(0:1000); plot(x, x^.9, type="l", log="xy")# andx <- 2^-(1070:170); plot(x, x^.9, type="l", log="xy")# now both worko summary.lm() asked for a report on a reasonable occurrence, butthe check failed to take account of NAs.o lm() was miscalculating 'df.residual' for empty models with amatrix response.o summary.lm() now behaves more sensibly for empty models.o plot.window() was using the wrong sign when adjustingxlim/ylim for positive 'asp' and a reversed axis.o If malloc() fails when allocating a large object the allocator nowdoes a gc and tries the malloc() again.o packageSlot() and getGroupMembers() are now exported from the'methods' package as they should from documentation and theGreen Book.o rhyper() was giving numbers slightly too small, due to a bug in theoriginal algorithm. (PR#7314)o gsub() was sometimes incorrectly matching ^ inside a string,e.g. gsub("^12", "x", "1212") was "xx".o [g]sub(perl = TRUE) was giving random results for a 0-lengthinitial match. (PR#7742)o [g]sub was ignoring most 0-length matches, including all initialones. Note that substitutions such as gsub("[[:space:]]*", "", ...) now work as they do in 'sed' (whereas the effect waspreviously the same as gsub("[[:space:]]+", " ", ...)).(In part PR#7742)o Promises are now evaluated when extracted from an environmentusing '$' or '[[ ]]'.o reshape(direction="wide") had some sorting problems whenguessing time points (PR#7669)o par() set 'xaxp' before 'xlog' and 'yaxp' before 'ylog',causing PR#831.o The logic in tclRequire() to check the availability of a Tclpackage turned out to be fallible. It now uses a try()-and-seemechanism instead.o Opening a unz() connection on a non-existent file left a filehandle in use.o "dist" objects of length 0 failed to print.o INSTALL and the libR try harder to find a temporary directory(since there might be one left over with the same PID).o acf() could cause a segfault with some datasets. (PR#7771)o tan(1+LARGEi) now gives 0+1i rather than 0+NaNi (PR#7781)o summary(data.frame(mat = I(matrix(1:8, 4)))) does not go intoinfinite recursion anymore.o writeBin() performed byte-swapping incorrectly on complexvectors, also swapping real and imaginary parts. (PR#7778)o read.table() sometimes discarded as blank lines containingonly white space, even if sep=",".*************************************************** ** 2.0 SERIES NEWS ** ***************************************************CHANGES IN R VERSION 2.0.1 patchedNEW FEATURESo warnings() now looks only in the workspace for `last.warning'(suggested by PR#7363).o The search for browsers now starts with firefox, and has mozillaahead of netscape.PACKAGE INSTALLATION CHANGESo A package DESCRIPTION file which contains a Built field (itshould not!) is now worked around, with loud warnings.BUG FIXESo split() was accepting raw and list vectors as input, butnot populating the output correctly.split() now handles vectors with names internally and so isalmost as fast as on vectors without names (and maybe 100xfaster than before).o subset() now throws an error if its 'subset' argument is notlogical whereas it could appear to work and give wrong answerswith e.g. a numeric 'subset' argument.o sum(), max(), min(), prod(), any() and all() were incorrectlyusing partial matching for their na.rm argument.o kmeans() now ensures that the initial cluster centers it choosesare distinct.o text()'s default method could segfault if passed 0-length coordinates.o R CMD INSTALL (Unix) was sometimes leaving a temporary dirbehind. (PR#7230)o read.table() could fail when the row.names were looking like numbers.o seq(length= <n>) now always returns "integer" storage.o labels.lm was broken. (PR#7417)o The hashing used for character vectors in object.size() wasinefficient for vectors with thousands of identical values notsharing the same storage (an unusual case).o data.matrix() now warns if applied to a data frame withclassed columns.o Plotting histograms where the expression used to deparse tomultiple lines now gives a sensible default title. (PR#7421)o The print method for getDLLRegisteredRoutines() was badlydesigned, and failed for all the standard packages' DLLs.o getDLLRegisteredRoutines.character() was broken.o write.table(x, row.names=FALSE) was incorrect for a 0-column x.o write.table() assumed dec = "," if it was not ".".o morley.tab used by R-intro was not installed on Unix since 2.0.0(it was on Windows).o gsub(perl=TRUE) returned a string which printed with trailinggarbage if there was a match at the beginning whosereplacement was shorter. (PR#7479)Similarly, the result was truncated if a replacement at thebeginning was longer.o Some PDF readers do not define PDFDocEncoding, so pdf()'sISOLatin1 encoding is now derived from WinAnsi rather thanPDFDocEncoding.o xfig() had not been updated for the 2.0.0 alpha changes.Using more than one plot with a non-white background and withonefile=FALSE could segfault.o sprintf() did not check for buffer overflow on characterstrings. (PR#7554)o The error message when evaluation depth was exceeded itselfcaused an error in deparsing and so was not shown.o The 'datalist' file was not being used during installation(2.0.1 only).o replications() was wrongly reporting lack of balance indesigns with interactions (and had since unique() gained amatrix method).CHANGES IN R VERSION 2.0.1NEW FEATURESo Platform equivalence in library() is tested by a new functiontestPlatformEquivalence() which ignores the 'vendor' field andcan be customized by cognescenti.o The assignment form of split() allows recycling of vectorswithin the value list. In particular, things likesplit(x, g) <- lapply(split(x, g), mean)now workDOCUMENTATIONo Manual `Writing R Extensions' has new sections on writingportable packages and on writing new front-ends for R -- thelatter will be more comprehensive in R 2.1.0 which has newpublic header files.DEPRECATED & DEFUNCTo The aqua module in MacOS X is deprecated.o Capabilities "bzip2", "GNOME, "libz" and "PCRE" are deprecated.o The GNOME GUI on Unix-alikes is deprecated as part of R;it will be available in another form as from R 2.1.0.o The undocumented use of UseMethod() with no argument is nowformally deprecated.INSTALLATION CHANGESo Building on Alpha OSF/1 no longer forces the C flag -std1,which appears to be no longer needed. (PR#7257)o The compiler flag -mieee-fp is no longer used on i386 Linux(these days it is only passed to the linker and was onlyinvoked for compilation steps).o -D__NO_MATH_INLINES is only used on older ix86 glibc-basedsystems which need it (tested at configure time). This leads tosmall improvements in speed and accuracy on modern systems.o If makeinfo >= 4.5 is not available, warnings are given thatsome of the HTML manuals will be missing, and the index pagegiven by help.start() will link to CRAN versions of those manuals.o Files aclocal.m4 and acinclude.m4 used in maintainer buildsare not longer included in the distribution.C-LEVEL FACILITIESo It was not clear in 'Writing R Extensions' that some of theentry points in the 'Utilities' section were not declared in<R.h> (they were in <R_ext/Applic.h>). Now all the entrypoints in that section are declared in <R_ext/Utils.h>,included by <R.h>.BUG FIXESo The grid.grab() function in package grid would throw an errorif there were no viewports pushed (now returns NULL).o model.frame.default() takes row names from the responsevariable if that has suitable names and there is no 'data'argument. (This follows S but was not previously implementedin R.)o write.table() was not respecting the 'dec' argument for complexnumbers.o write.table() printed a mixture of numeric and complex numbersas all complex. (PR#7260)o R CMD INSTALL failed with versioned installs on packages whichsave images (only).o dlogis() gave NaN not 0 for large negative arguments.o Importing from another name space was broken for versionedinstalls, incorrectly reporting something like"package 'imported_from' does not have a name space".o The GNOME interface under Linux/Unix was broken. (PR#7276)o For the jpeg/png devices under Linux/Unix, under certain rarecircumstances clipping needed to be cleared before starting anew page. (PR#7270, which has been the case since the deviceswere introduced in 1.1.0.)o First lattice plot (first grid.newpage() call) did not starta new page IF there had been a previous traditional graphicsplot (on the same device).o Using install.packages() to install the same package to morethan one library gave an incorrect warning message. (If therewere two or more such packages it might give an error.)o .packages(all.available=TRUE) returned packages with an invalidversion field in their DESCRIPTION whereas .find.packages() andpackageDescription() did not. Now all do not.o packageDescription() now correctly reports that a package doesnot exist, rather than that its DESCRIPTION file is 'missingor broken'.o 'make dist' from builddir != sourcedir was copying not linkingrecommended packages to *.tgz.o Slots in prototype objects can inherit from locally definedclasses (which were not being found correctly before).o Several fixes to the behavior of as() when there are eithercoerce= or replace= methods supplied in a call tosetIs(). Related fixes to setIs() to handle correctly previousmethods, if there were any.o splinefun(1[0], 1[0])(1) doesn't segfault anymore (PR#7290).spline() and splinefun() now also work with missing values byomiting them.o ecdf() was failing on inputs containing NAs. (Part of PR#7292)o tools:::.install_package_description was splitting the Built:field across lines on platforms with very long names.o capabilities() was wrong for the Aqua GUI on MacOS X.o Using Rprof() with a non-writable 'file' argument is now anon-fatal error and does not abort R.o binom.test() did not deparse its arguments early enough suchthat the reported data were ugly if x was a table.o Systems based on glibc, including those using R's substitute forstrptime, were handling strptime("2001", "%Y") incorrectly, insome cases crashing. R's substitute code has been corrected(but problems may remain if glibc is used). See the ?strptimefor what should happen (which is system-specific).o untrace() after trace() failed if package 'methods' was attached.(PR#7301)o summary.stepfun() was reporting for n > 6 summaries of theknots and levels as the actual values. Both print() andsummary() methods called the constant values "step heights",although they were not the heights of the steps.o is.na/is.nan() were giving spurious warnings if applied to araw vector.o is.atomic() gave incorrect result (false) for a raw vector.o rank() and order() accepted raw and list inputs, but did notgive a sensible answer (always 1:n). Similarly, partial sortsof a raw vector were accepted but did nothing.o require() without a version argument tried for an unversionedload of a package even though a versioned install was alreadyloaded. This often led to a message that a required packagewas being loaded when it was not actually being loaded.o str(<S4.object>) made use of attributes() instead of slot(),and hence didn't properly print NULL slots.o contrib.url() now handles URLs ending in '/' correctly.o str() removed any class from externalptr objects.o logLik() and hence AIC() failed or gave incorrect answerson "lm" fits with na.action = na.exclude (and perhaps otherna.actions's except na.omit and na.fail).o pmax() and pmin() sometimes used NAs in internal subassignments,and sometimes these failed.o Subassigning an expression, e.g. expr[2] <- 1, could leave aninvalid object and so cause a segfault. (PR#7326)o download/install.packages() would misbehave if there was morethan one version of a package in a repository.o sort(partial=) silently ignored some other arguments: using'decreasing' or 'index.return' or supplying a factor are nowerrors.o The ave() function had trouble if the grouping containedunused levels.o read.fwf() got confused by skip > 0 and could infinite loopunder some circumstances. (PR#7350)o upgrade(x, ask = FALSE) was broken for a "packageStatus" object.o Class "raw" had been omitted from the list of basic classes inthe "methods" package and so could not be used in S4 classes.o Function getGroupMembers(), part of the definition of S4classes, had been promised for release 2.0, but slipped through.o toLatex(sessionInfo()) produced incorrect LaTeX on someplatforms due to special characters in the platformidentifier.********************************************************** ** News of 1.x.y and 2.0.0 is in file `ONEWS' ** News of 1.0.0 and earlier is in file `OONEWS' ** **********************************************************