R资讯 > 正文

R的新版本2.15.0 (代号 "Easter Beagle")已经发布


关键词: R softR new version



  • 使用unlink(recursive = TRUE)删除链接到目录的符号链接时,删除链接而非目录内容(就像rm -r)
  • On Windows it no longer follows reparse points (including junctions and symbolic links).


  • Environment variable RD2DVI_INPUTENC has been renamed to RD2PDF_INPUTENC.
  • .Deprecated() becomes a bit more flexible, getting an old argument.
  • Even data-only packages without R code need a namespace and so may need to be installed under R 2.14.0 or later.
  • assignInNamespace() has further restrictions on use apart from at top-level, as its help page has warned. Expect it to be disabled from programmatic use in the future.
  • system() and system2() when capturing output report a non-zero status in the new "status" attribute.
  • kronecker() now has an S4 generic in package methods on which packages can set methods. It will be invoked by X %x% Y if either X or Y is an S4 object.
  • pdf() accepts forms like file = "|lpr" in the same way as postscript().
  • pdf() accepts file = NULL. This means that the device does NOT create a PDF file (but it can still be queried, e.g., for font metric info).
  • format() (and hence print()) on "bibentry" objects now uses
  • o ptions("width") to set the output width.

  • legend() gains a text.font argument. (Suggested by Tim Paine, PR#14719.)
  • nchar() and nzchar() no longer accept factors (as integer vectors). (Wish of PR#6899.)
  • summary() behaves slightly differently (or more precisely, its print() method does). For numeric inputs, the number of NAs is printed as an integer and not a real. For dates and datetimes, the number of NAs is included in the printed output (the latter being the wish of PR#14720).
  • The "data.frame" method is more consistent with the default method: in particular it now applies zapsmall() to numeric/complex summaries.

  • The number of items retained with options(warn = 0) can be set by options(nwarnings=).
  • There is a new function assignInMyNamespace() which uses the namespace of the function it is called from.
  • attach() allows the default name for an attached file to be overridden.
  • bxp(), the work horse of boxplot(), now uses a more sensible default xlim in the case where at is specified differently from 1:n, see the discussion on R-devel, <URL: https://stat.ethz.ch/pipermail/r-devel/2011-November/062586.html>.
  • New function paste0(), an efficient version of paste(*, sep=""), to be used in many places for more concise (and slightly more efficient) code.
  • Function setClass() in package methods now returns, invisibly, a generator function for the new class, slightly preferred to calling new(), as explained on the setClass help page.
  • The "dendrogram" method of str() now takes its default for last.str from option str.dendrogram.last.
  • New simple fitted() method for "kmeans" objects.
  • The traceback() function can now be called with an integer argument, to display a current stack trace. (Wish of PR#14770.)
  • setGeneric() calls can be simplified when creating a new generic function by supplying the default method as the def argument. See ?setGeneric.
  • serialize() has a new option xdr = FALSE which will use the native byte-order for binary serializations. In scenarios where only little-endian machines are involved (these days, close to universal) and (un)serialization takes an appreciable amount of time this may speed up noticeably transferring data between systems.
  • The internal (un)serialization code is faster for long vectors, particularly with XDR on some platforms. (Based on a suggested patch by Michael Spiegel.)
  • For consistency, circles with zero radius are omitted by points() and grid.circle(). Previously this was device-dependent, but they were usually invisible.
  • NROW(x) and NCOL(x) now work whenever dim(x) looks appropriate, e.g., also for more generalized matrices.
  • PCRE has been updated to version 8.30.
  • The internal R_Srcref variable is now updated before the browser stops on entering a function. (Suggestion of PR#14818.)
  • There are 'bare-bones' functions .colSums(), .rowSums(), .colMeans() and .rowMeans() for use in programming where ultimate speed is required.
  • The formerly internal function .package_dependencies() from package tools for calculating (recursive) (reverse) dependencies on package databases has been renamed to package_dependencies() and is now exported.
  • There is a new function optimHess() to compute the (approximate) Hessian for an optim() solution if hessian = TRUE was forgotten.
  • .filled.contour() is a 'bare-bones' function to add a filled-contour rectangular plot to an already prepared plot region.
  • The stepping in debugging and single-step browsing modes has changed slightly: now left braces at the start of the body are stepped over for if statements as well as for for and while statements. (Wish of PR#14814.)
  • library() no longer warns about a conflict with a function from package:base if the function has the same code as the base one but with a different environment. (An example is Matrix::det().)
  • When deparsing very large language objects, as.character() now inserts newlines after each line of approximately 500 bytes, rather than truncating to the first line.
  • New function rWishart() generates Wishart-distributed random matrices.
  • Packages may now specify actions to be taken when the package is loaded (setLoadActions()).
  • options(max.print = Inf) and similar now give an error (instead of warnings later).
  • The "difftime" replacement method of units tries harder to preserve other attributes of the argument. (Wish of PR#14839.)
  • poly(raw = TRUE) no longer requires more unique points than the degree. (Requested by John Fox.)
  • R语言教程