Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: fb8e36f8be
Fetching contributors…

Cannot retrieve contributors at this time

7317 lines (5637 sloc) 318.894 kB
% -*- coding: utf-8 -*-
\newcommand{\Rlogo}{\if{html}{\figure{../../html/logo.jpg}}\if{latex}{\figure{logo.jpg}{options: width=0.5in}}}
\title{ R News}
\section{\Rlogo CHANGES IN R-devel}{
\item There is a subtle change in behaviour for numeric index
values \eqn{2^{31}}{2^31} and larger. These never used to be legitimate
and so were treated as \code{NA}, sometimes with a warning. They
are now legal for long vectors so there is no longer a warning,
and \code{x[2^31] <- y} will now extend the vector on a 64-bit
platform and give an error on a 32-bit one.
\item It is now possible for 64-bit builds to allocate amounts of
memory limited only by the OS. It may be wise to use OS
facilities (e.g. \command{ulimit} in a \command{bash} shell,
\command{limit} in \command{csh}), to set limits on overall memory
consumption of an \R process, particularly in a multi-user
environment. A number of packages need a limit of at least 4GB of
virtual memory to load.
64-bit Windows builds of \R are by default limited in memory usage
to the amount of RAM installed: this limit can be changed by
command-line option \option{--max-mem-size} or setting environment
variable \env{R_MAX_MEM_SIZE}.
\subsection{NEW FEATURES}{
\item \code{identical()} has a new argument,
\code{ignore.environment}, used when comparing functions (with
default \code{FALSE} as before).
\item There is a new option, \code{options(CBoundsCheck=)}, which
controls how \code{.C()} and \code{.Fortran()} pass arguments to
compiled code. If true (which can be enabled by setting the
environment variable \env{R_C_BOUNDS_CHECK} to \samp{yes}), raw,
integer, double and complex arguments are always copied, and
checked for writing off either end of the array on return from the
compiled code (when a second copy is made). This also checks
individual elements of character vectors passed to \code{.C()}.
This is not intended for routine use, but can be very helpful in
finding segfaults in package code.
\item In \code{layout()}, the limits on the grid size have been
raised (again).
\item New simple \code{provideDimnames()} utility.
\item Where methods for \code{length()} return a double value
which is representable as an integer (as often happens for package
\CRANpkg{Matrix}), this is converted to an integer.
On other OSes the stack size is set at run time rather than when
\item Matrix indexing of dataframes by two column numeric indices
is now supported for replacement as well as extraction.
\item \code{setNames()} now has a default for its \code{object}
argument, useful for a character result.
\item \code{StructTS()} has a revised additive constant in the
\code{loglik} component of the result: the previous definition is
returned as the \code{loglik0} component. However, the help page has
always warned of a lack of comparability of log-likelihoods for
non-stationary models. (Suggested by Jouni Helske.)
\item The logic in \code{aggregate.formula()} has been revised.
It is now possible to use a formula stored in a variable;
previously, it had to be given explicitly in the function call.
\item \code{install.packages()} has a new argument \code{quiet} to
reduce the amount of output shown.
\item Setting an element of the graphics argument \code{lwd} to a
negative or infinite value is now an error. Lines corresponding
to elements with values \code{NA} or \code{NaN} are silently
Previously the behaviour was device-dependent.
\item Setting graphical parameters \code{cex}, \code{col},
\code{lty}, \code{lwd} and \code{pch} in \code{par()} now requires a
length-one argument. Previously some silently took the first
element of a longer vector, but not always when documented to do so.
\item \code{Sys.which()} when used with inputs which would be
unsafe in a shell (e.g. absolute paths containing spaces) now uses
appropriate quoting.
\item \code{as.tclObj()} has been extended to handle raw vectors.
Previously, it only worked in the other direction.
(Contributed by Charlie Friedemann, \PR{14939}.)
\item New functions \code{cite()} and \code{citeNatbib()} have
been added, to allow generation of in-text citations from
\code{"bibentry"} objects. A \code{cite()} function may be added
to \code{bibstyle()} environments.
\item A \code{sort()} method has been added for \code{"bibentry"}
\item The \code{bibstyle()} function now defaults to setting the
default bibliography style. The \code{getBibstyle()} function
has been added to report the name of the current default style.
\item \code{scatter.smooth()} now has an argument \code{lpars} to
pass arguments to \code{lines()}.
\item \code{pairs()} has a new \code{log} argument, to allow some
or all variables to be plotted on logarithmic scale.
(In part, wish of \PR{14919}.)
\item \code{split()} gains a \code{sep} argument.
\item \code{termplot()} does a better job when given a model with
interactions (and no longer attempts to plot interaction terms).
\item The parser now incorporates code from Romain Francois'
parser package, to support more detailed computation on the
code, such as syntax highlighting, comment-based documentation,
etc. Functions \code{getParseData()} and \code{getParseText()}
access the data.
\item There is a new function \code{rep_len()} analogous to
\code{} for when speed is required (and names are not).
\item The undocumented use \code{rep(NULL, length.out = n)} for
\code{n > 0} (which returns \code{NULL}) now gives a warning.
\item \code{demo()} gains an \code{encoding} argument for those
packages with non-ASCII demos: it defaults to the package encoding
where there is one.
\item \code{strwrap()} converts inputs with a marked encoding to
the current locale: previously it made some attempt to pass
through as bytes inputs invalid in the current locale.
\item Specifying both \code{rate} and \code{scale} to
\code{[dpar]gamma} is a warning (if they are essentially the same
value) or an error.
\item \code{merge()} works in more cases where the data frames
include matrices. (Wish of \PR{14974}.)
\item \code{optimize()} and \code{uniroot()} no longer use a
shared parameter object across calls. (\code{nlm()},
\code{nlminb()} and \code{optim()} with numerical derivatives
still do, as documented.)
\item The \code{all.equal()} method for date-times is now
documented: times are regarded as equal (by default) if they
differ by up to 1 msec.
\item \code{duplicated()} and \code{unique()} gain a \code{nmax}
argument which can be used to make them much more efficient when
it is known that there are only a small number of unique entries.
This is done automatically for factors.
\item Functions \code{rbinom()}, \code{rgeom()}, \code{rhyper()},
\code{rpois()}, \code{rnbinom(),} \code{rsignrank()} and
\code{rwilcox()} now return integer (not double) vectors. This
halves the storage requirements for large simulations.
\item \code{sort()}, \code{} and \code{sort.list()} now
use radix sorting for factors of less than 100,000 levels when
\code{method} is not supplied. So does \code{order()} if called
with a single factor, unless \code{na.last = NA}.
\item \code{diag()} as used to generate a diagonal matrix has been
re-written in C for speed and less memory usage. It now forces
the result to be numeric in the case \code{diag(x)} since it is
said to have \sQuote{zero off-diagonal entries}.
\item \code{backsolve()} (and \code{forwardsolve()}) are now
internal functions, for speed and support for large matrices.
\item More matrix algebra functions (e.g. \code{chol()} and
\code{solve()}) accept logical matrices (and coerce to numeric).
\item \code{} has some support for \eqn{n \ge
2^{31}}{n >= 2^31}: see its help for the limitations.
A different algorithm is used for \code{n, size, replace = FALSE,
prob = NULL)} for \code{n > 1e7} and \code{size <= n/2}. This
is much faster and uses less memory, but does give different results.
\item \code{approxfun()} and \code{splinefun()} now return a
wrapper to an internal function in the \pkg{stats} namespace
rather than a \code{.C()} or \code{.Call()} call. This is more
likely to work if the function is saved and used in a different
\item The functions \code{.C()}, \code{.Call()},
\code{.External()} and \code{.Fortran()} now give an error (rather
than a warning) if called with a named first argument.
\item \code{Sweave()} by default now reports the locations in
the source file(s) of each chunk.
\item \code{clearPushBack()} is now a documented interface to a
long-existing internal call.
\item \code{aspell()} gains filters for R code, Debian Control
Format and message catalog files, and support for R level
dictionaries. In addition, package \pkg{utils} now provides
\code{aspell_package_R_files()} and
\code{aspell_package_C_files()} for spell checking R and C level
message strings in packages.
\item \code{bibentry()} gains some support for \dQuote{incomplete}
entries with a \samp{crossref} field.
\item \code{gray()} and \code{gray.colors()} finally allow
\code{alpha} to be specified.
\item \code{monthplot()} gains parameters to control the look of
the reference lines. (Suggestion of Ian McLeod.)
\item Added support for new \code{\%~\%} relation
(\dQuote{is distributed as}) in plotmath.
\item \code{domain = NA} is accepted by \code{gettext()} and
\code{ngettext()}, analogously to \code{stop()} etc.
\subsection{LONG VECTORS}{
\item There is support for vectors longer than \eqn{2^{31}-1}{2^31
- 1} elements on 64-bit platforms. This applies to raw, logical,
integer, double, complex and character vectors, as well as lists.
(Elements of character vectors remain limited to
\eqn{2^{31}-1}{2^31 - 1} bytes.)
Use of such vectors is work-in-progress.
\item Most operations which can sensibly be done with long vectors
now work: others may return the error \sQuote{long vectors not
supported yet}. Some of these are because they explicitly work
with integer indices (e.g. \code{anyDuplicated()} and
\code{match()}) or because other limits (e.g. of character strings
or matrix dimensions) would be exceeded or the operations would be
extremely slow.
\item \code{length()} returns a double for long vectors, and
lengths can be set to \eqn{2^{31}}{2^31} or more by the
replacement function with a double value.
\item Most aspects of indexing are available. Generally
double-valued indices can be used to access elements beyond
\eqn{2^{31}-1}{2^31 - 1}.
\item There is some support for matrices and arrays with each
dimension less than \eqn{2^{31}}{2^31} but total number of
elements more than that. Only some aspects of matrix algebra work
for such matrices, often taking a very long time. In other cases
the underlying Fortran code has an unstated restriction (as was
found for complex \code{svd()}).
\item \code{dist()} can produce dissimilarity objects for more
than 65536 rows (but for example \code{hclust()} cannot process
such objects).
\item \code{serialize()} to a raw vector is no longer limited in
size (except by resources) on 64-bit platforms.
\item The C-level function \code{R_alloc} can now allocate
\eqn{2^{35}}{2^35} or more bytes on 64-bit platforms.
\item \code{agrep()} and \code{grep()} will return double vectors
of indices for long vector inputs.
\item Many calls to \code{.C()} have been replaced by
\code{.Call()} to allow long vectors to be supported (now or in
the future). Regrettably several packages had copied the non-API
\code{.C()} calls and so failed.
\item \code{.C()} and \code{.Fortran()} do not accept long vector
inputs. This is a precaution as it is very unlikely that existing
code will have been written to handle long vectors (and the \R
wrappers often assume that \code{length(x)} is an integer).
\item Most of the methods for \code{sort()} work for long vectors.
\code{rank()}, \code{sort.list()} and \code{order()} support
long vectors (slowly except for radix sorting).
\item \code{sample()} can do uniform sampling from a long vector.
\item More use has been made of \R objects representing registered
entry points, which is more efficient as the address is provided
by the loader once only when the package is loaded.
This has been done for packages \code{base}, \code{methods},
\code{splines} and \code{tcltk}: it was already in place for the
other standard packages.
Since these entry points are always accessed by the \R entry
points they do not need to be in the load table which can be
searched faster. This does mean that \code{.C} / \code{.Fortran}
/ \code{.Call} calls copied from earlier versions of \R may no
longer work -- but they were never part of the API.
\item Many \code{.Call()} calls in package \pkg{base} have been
migrated to \code{.Internal()} calls.
\item \code{solve()} makes fewer copies, especially when \code{b}
is a vector rather than a matrix.
\item \code{eigen()} makes fewer copies if the input has dimnames.
\item Most of the linear algebra functions make fewer copies when
the input(s) are not double (e.g. integer or logical).
\item A foreign function call (\code{.C()} etc) in a package
without a \code{PACKAGE} argument will only look in the first DLL
specified in the \file{NAMESPACE} file of the package rather than
searching all loaded DLLs. A few packages needed \code{PACKAGE}
arguments added.
\item \command{R CMD check} now gives a warning rather than a
note if it finds calls to \code{abort}, \code{assert} or
\code{exit} in compiled code, and has been able to find the
\file{.o} file in which the calls occur.
Such calls can terminate the \R process which loads the package.
\item The location of the build and check environment files can
now be specified by the environment variables
\env{R_BUILD_ENVIRON} and \env{R_CHECK_ENVIRON}, respectively.
\item \command{R CMD Sweave} gains a \option{--compact} option
to control possibly reducing the size of the PDF file it creates
when \option{--pdf} is given.
\item \command{R CMD build} now omits Eclipse's \file{.metadata}
directories, and \command{R CMD check} warns if it finds them.
\item \command{R CMD check} now does some checks on functions
defined within reference classes, including of \code{.Call()} etc
\item The \code{ENCODING} argument to \code{.C()} is defunct.
Use \code{iconv()} instead.
\item The \code{.Internal(eval.with.vis)} non-API function has
been removed.
\item Support for the converters for use with \code{.C()} is not
compiled in by default: compile \file{src/main/dotcode.c} with
\option{-DSUPPORT_CONVERTERS} to re-enable this (untested as we
know of no examples in packages).
\item The previously deprecated uses of \code{array()} with a
0-length \code{dim} argument and \code{tapply()} with a 0-length
\code{INDEX} list are now errors.
\item \samp{Translation} packages are defunct.
\item Calling \code{rep()} or \code{} on a pairlist or
other non-vector object is now an error.
\item Several non-API entry points have been transferred to
packages (e.g. \code{R_zeroin2}) or replaced by different non-API
entry points (e.g. \code{R_tabulate}).
\item The \sQuote{internal} graphics device invoked by
\code{.Call("R_GD_nullDevice", package = "grDevices")} has
been removed: use \code{pdf(file = NULL)} instead.
\item The long-defunct function \code{print.coefmat()} has been removed.
\item The \code{.Fortran()} entry point \code{"dqrls"} which has
not been used by \R since version 2.15.1 is no longer available.
\item Functions \code{traceOn()} and \code{traceOff()} in package
\pkg{methods} are now defunct.
\item Function \code{CRAN.packages()} is finally defunct.
\subsection{CODE MIGRATION}{
\item The C code underlying base graphics has been migrated to the
\pkg{graphics} package (and hence no longer uses
\code{.Internal()} calls).
This may require re-installing some S4-using packages
(e.g. \CRANpkg{timeDate}) which captured the old versions of the
\R interfaces.
\item Most of the \code{.Internal()} calls used in the \pkg{stats}
package have been migrated to C code in that package.
This means that a number of \code{.Internal()} calls which have
been used by packages no longer exist, including
\code{.Internal(cor)} \code{.Internal(cov)},
\code{.Internal(optimhess)} and \code{.Internal(update.formula)}.
It also means that packages such as \CRANpkg{compositions} which
made copies of \pkg{stats} functions at installation need to be
re-installed. As may packages which have been byte-compiled,
since some \code{.Internal()} calls are inlined by the compiler.
\item Some \code{.External()} calls to the \code{base} package
(really to the \R executable or shared library) have been moved to
more appropriate packages. Packages should not have been using
such calls, but some did (mainly those used by \code{integrate()}).
\subsection{PACKAGE parallel}{
\item There is a new function \code{mcaffinity()} which allows
getting or setting the CPU affinity mask for the current \R process on
systems that supports this (currently only Linux has been tested
successfully). It has no effect on systems which do not support
process affinity. Users are not expected to use this function
directly (with the exception of fixing libraries that break
affinity settings like OpenBLAS) -- the function is rather
intended to support affinity control in high-level parallel
functions. In the future, \R may supplement lack of affinity
control in the OS by its own bookkeeping via \code{mcaffinity()}
related to processes and threads it spawns.
\item \code{mcparallel()} has a new argument \code{mc.affinity}
which attempts to set the affinity of the child process according
to the specification contained therein.
\subsection{C-LEVEL FACILITIES}{
\item There has been some minor re-organization of the non-API
header files. In particular, \file{Rinternals.h} no longer
includes the non-API header \file{R_exts/PrtUtil.h}, and that no
longer includes \file{R_exts/Print.h}.
\item Passing \code{NULL} to \code{.C()} is now an error.
\item \code{.C()} and \code{.Fortran()} now warn if
\code{"single"} arguments are used with \code{DUP = FALSE}, as
changes to such arguments are not returned to the caller.
\item C entry points \code{R_qsort} and \code{R_qsort_I} now have
\code{start} and \code{end} as \code{size_t} to allow them to work
with longer vectors on 64-bit platforms. Code using them should
be recompiled.
\item A few recently added C entry points were missing the
remapping to \code{Rf_}, notably \code{[dpq]nbinom_mu}. Packages
using them need to be reinstalled.
\item Some of the interface pointers formerly available only to
\command{} are now available to front-ends on all
Unix-alikes: one has been added for the interface to
\item \code{PACKAGE = ""} was accepted in \code{.C()} etc calls,
although it was contrary to the documentation. It is now an error.
\item The management of translations has been converted to \R
code: see \code{?tools::update_pkg_po}.
\item The translations for the \R interpreter and
\command{RGui.exe} are now part of the \pkg{base} package (rather than
having sources in directory \file{po} and being installed to
\file{share/locale}). Thus the \pkg{base} package supports three
translation domains, \code{R-base}, \code{R} and \code{RGui}.
\item The compiled translations which ship with \R are all
installed to the new package \pkg{translations} for easier
updating. The first package of that name found on
\code{.libPaths()} at the start of the \R session will be used.
(It is possible messages will be used before \code{.libPaths()} is
set up in which case the default translations will be used: set
environment variable \env{R_TRANSLATIONS} to point to the location
of the intended \pkg{translations} package to use this right from
the start.)
\item The translations form a separate group in the Windows
installer, so can be omitted if desired.
\item The markup for many messages has been changed to make them
easier to translate, incorporating suggestions from Łukasz Daniel.
\item There is again support for building without using the C
\sQuote{long double} type. This is required by C99, but system
implementations can be slow or flawed. Use \command{configure}
option \option{--disable-long-double}.
\subsection{BUG FIXES}{
\item When \command{R CMD build} is run in an encoding other than
the one specified in the package's \file{DESCRIPTION} file it
tries harder to expand the \code{authors@R} field in the specified
encoding. (\PR{14958}.)
\item If \command{R CMD INSTALL} is required to expand the
\code{authors@R} field of the \file{DESCRIPTION} file, it tries
harder to do so in the encoding specified for the package (rather
than using ASCII escapes).
\item Fix in package \pkg{grid} for pushing a viewport into a
layout cell, where the layout is within a viewport that has zero
physical width OR where the layout has zero total relative width
(likewise for height). The layout column widths (or row heights)
in this case were being calculated with non-finite values.
(Reported by Winston Chang.)
\item \code{solve(A, b)} for a vector \code{b} gave the answer
names from \code{colnames(A)} for \code{LINPACK = TRUE} but not in
the default case.
\item \code{La.svd()} accepts logical matrices (as documented, and
as \code{svd()} did).
\section{\Rlogo CHANGES IN R VERSION 2.15.1 patched}{
\subsection{NEW FEATURES}{
\item The \code{X11()} window gains an icon: the
latter may be especially useful on Ubuntu's \sQuote{Unity}
The \code{WM_CLASS} should be set in circumstances where the
Window Manager failed to make use of X11 resource settings.
(Contributed by Philip Johnson.)
\item The \code{"Date"} and \code{"POSIXt"} methods for
\code{cut()} will accept an unsorted \code{breaks} argument (as
the default method does, although this was undocumented).
(Wish of \PR{14961}.)
\item Reference class methods (in the \pkg{methods} package) that
use other methods in an indirect way (e.g., by \code{sapply()})
must tell the code analysis to include that method. They can now
do so by invoking \code{$usingMethods()}. %$
\item More Polish translations are available: for the
\command{RGui} menus and for several recommended packages.
\item Multistratum MANOVA works. In fact, it seems to have done so
for years in spite of the help page claiming it did not.
\item \code{qqline()} has new optional arguments
\code{distribution}, \code{probs} and \code{qtype}, following the
example of \pkg{lattice}'s \code{panel.qqmathline()}.
\item The handling of single quotes in the \code{en@quot}
pseudo-language has been slightly improved. Double quotes are no
longer converted.
\item New functions \code{checkPoFiles()} and \code{checkPoFile()}
have been added to the \pkg{tools} package to check for
consistency of format strings in translation files.
\item \code{model.matrix(~1, ...)} now also contains the same
rownames that less trivial formulae produce. (Wish of \PR{14992},
changes the output of several packages.)
\item Misuse of \code{rep()} on undocumented types of objects
(e.g. calls) is now reported as an error.
\item The included LAPACK has been updated to 3.4.1, with some
patches from the current SVN sources. (\emph{Inter alia}, this
resolves \PR{14692}.)
\item \code{file.copy(recursive = TRUE)} has some additional
checks on user error leading to attempted infinite recursion (and on
some platforms to crashing \R).
\item PCRE has been updated to version 8.31, a bug-fix release.
\item The included version of \code{liblzma} has been updated to
version 5.0.4, a minor bug-fix release.
\item New function \code{.bincode()}, a \sQuote{bare-bones}
version of \code{cut.default(labels = FALSE)} for use in packages
with \code{image()} methods.
\item The HTML manuals now use directional single quotes.
\item \code{maintainer()} now converts embedded new lines to
spaces. It no longer gives a non-obvious error for non-installed
\item The \code{X11()} device has some protection against
being used with forked processes \emph{via} package \pkg{parallel}.
\item Setting the environment variable \env{R_OSX_VALGRIND} (to
any value) allows \R to be run under \command{valgrind} on Mac OS
10.6 and 10.7 (\command{valgrind} currently has very limited
support for 10.8), provided \code{system()} is not used (directly
or indirectly). This should not be needed for \command{valgrind}
>= 3.8.1.
\item The \code{model.frame()} method for \code{"lm"} uses
\code{xlevels}: this is safer if \code{data} was supplied or
\code{model = FALSE} was used and the levels of factors used in
the fit had been re-ordered since fitting.
Similarly, \code{model.frame(fm, data=<data>)} copies across
the variables used for safe prediction from the fit.
\item Functions such as \code{parLapply()} in package
\pkg{parallel} can make use of a default cluster if one is set.
(Reported by Martin Morgan.)
\item \code{chol(pivot = TRUE, LINPACK = FALSE)} is now available
using LAPACK 3.2 subroutine \code{DPSTRF}.
\item The functions \code{.C()}, \code{.Call()},
\code{.External()} and \code{.Fortran()} now check that they are
called with an unnamed first argument: the formal arguments were
changed from \code{name=} to \code{.NAME=} in \R 2.13.0, but some
packages were still using the old name. This is currently a
warning, but will be an error in future.
\item \code{step()} no longer tries to improve a model with
AIC of \code{-Inf} (a perfect fit).
\item \code{spline()} and \code{splinefun()} gain a new method
\code{"hyman"}, an implementation of Hyman's method of
constructing monotonic interpolation splines. (Based on
contributions of Simon Wood and Rob Hyndman.)
\item On Windows, the C stack size has been increased to 64MB (it
has been 10MB since the days of 32MB RAM systems).
\item \code{array()} is now implemented in C code (for speed) when
\code{data} is atomic or an unclassed list (so it is known that
\code{as.vector(data)} will have no class to be used by \code{rep()}).
\item \code{rep()} is faster and uses less memory,
substantially so in some common cases (e.g. if \code{times} is of
length one or \code{length.out} is given, and \code{each = 1}).
\item \code{findInterval()}, \code{tabulate()}, \code{cut()},
\code{hist()} and \code{image.default()} all use \code{.Call()}
and are more efficient.
\item \code{duplicated()}, \code{unique()} and similar now
support vectors of lengths above \eqn{2^{29}}{2^29} on 64-bit
\item Omitting \code{PACKAGE} in \code{.C()} etc calls was
supposed to make use of the DLL from the namespace within which
the enclosing function was defined. It was less successful in
doing so than it might be, and gave no indication it had failed.
A new search strategy is very successful and gives a warning
when it fails. In most cases this is because the entry point is
not actually provided by that package (and so \code{PACKAGE}
should be used to indicate which package is intended) but in some
the namespace does not have a DLL specified by a
\code{useDynLib()} directive so \code{PACKAGE} is required.
\item \command{R CMD check} now checks if a package can be loaded
by \code{library(pkgname, lib.loc = "somewhere")} without being on
the library search path (unless it is already installed in
\code{.Library}, when it always will be).
\item \command{R CMD check --as-cran} notes \sQuote{hidden} files
and directories (with names starting with a dot) that are not
needed for the operation of \command{R CMD INSTALL} or \code{R CMD
build}: such files should be excluded from the published tarball.
\item \command{R CMD check} (if checking subdirectories) checks
that the \R code in any demos is ASCII and can be parsed, and
warns if not.
\item When \code{R CMD Rd2pdf} is used with \file{inputenx.sty},
it allows further characters (mainly for Eastern European
languages) by including \file{ix-utf8enc.dfu} (if available).
(Wish of \PR{14989}.)
\item \command{R CMD build} now omits several types of hidden
files/directories, including \file{inst/doc/.Rinstignore},
\file{vignettes/.Rinstignore}, (\file{.Rinstignore} should be at
top level), \file{.deps} under \file{src}, \file{.Renviron},
\file{.Rprofile}, \file{.Rproj.user}, \file{.backups},
\file{.cvsignore}, \file{.cproject}, \file{.directory},
\file{.dropbox}, \file{.exrc}, \file{.gdb.history},
\file{.gitattributes}, \file{.gitignore}, \file{.gitmodules},
\file{.hgignore}, \file{.hgtags}, \file{.htaccess},
\file{.latex2html-init}, \file{.project}, \file{.seed},
\file{.settings}, \file{.tm_properties} and various leftovers.
\item \command{R CMD check} now checks for \code{.C()},
\code{.Call()}, \code{.External()} and \code{.Fortran()} calls in
other packages, and gives a warning on those found from \R itself
(which are not part of the API and change without notice: many
will changed for \R 2.16.0).
\subsection{C-LEVEL FACILITIES}{
\item The limit for \code{R_alloc} on 64-bit platforms has been
raised to just under 32GB (from just under 16GB).
\item The misuse of \code{.C("name", ..., PACKAGE = foo)} where
\code{foo} is an arbitrary \R object is now an error.
The misuse \code{.C("name",..., PACKAGE = "")} is now warned about
in \command{R CMD check}, and will be an error in future.
\item Use of \code{array()} with a 0-length \code{dim} argument is
deprecated with a warning (and was contrary to the documentation).
\item Use of \code{tapply()} with a 0-length \code{INDEX} list is
deprecated with a warning.
\item \samp{Translation} packages are deprecated.
\item Calling \code{rep()} or \code{} on a pairlist is
deprecated and will give a warning. In any case, \code{rep()}
converted a pairlist to a list so you may as well do that
\item Entry point \code{rcont2} is no longer part of the API, and
will move to package \pkg{stats} in \R 2.16.0.
\item The \sQuote{internal} graphics device invoked by
\code{.Call("R_GD_nullDevice", package = "grDevices")} is about to
be removed: use \code{pdf(file = NULL)} instead.
\item \code{eigen(EISPACK = TRUE)},
\code{chol(pivot = FALSE, LINPACK = TRUE)},
\code{chol2inv(LINPACK = TRUE)}, \code{solve(LINPACK = TRUE)} and
\code{svd(LINPACK = TRUE)} are deprecated and give a warning.
They were provided for compatibility with \R 1.7.0 (Mar 2003)!
\item The \sQuote{internal function} \code{kappa.tri()} has been
renamed to \code{.kappa_tri()} so it is not inadvertently called
as a method for class \code{"tri"}.
\item Functions \code{sessionData()} and \code{browseAll()} in
package \pkg{methods} are on a help page describing them as
\sQuote{deprecated} and are now formally deprecated.
\item For a Windows or Mac OS X binary package install,
\code{install.packages()} will check if a source package is
available on the same repositories, and report if it is a later
version or there is a source package but no binary package
This check can be suppressed: see the help page.
\item \code{install.packages(type = "both")} has been enhanced.
In interactive use it will ask whether to choose the source
version of a package if the binary version is older and contains
compiled code, and also asks if source packages with no binary
version should be installed).
\item There is a new \command{configure} option
\option{--with-libtiff} (mainly in case the system installation
needs to be avoided).
\item LAPACK 3.4.1 does use some Fortran 90 features, so
\command{g77} no longer suffices.
\item If an external LAPACK is used, it must be version 3.2 or later.
\subsection{BUG FIXES}{
\item On Windows, starting \command{Rterm} via \command{R.exe}
caused Ctrl-C to misbehave. (\PR{14948})
\item The \code{tools::latexToUtf8()} function missed conversions that
were contained within braces.
\item Long timezone specifications (such as a file name preceded
by \code{:}) could crash \code{as.POSIXlt}. (\PR{14945})
\item \code{R CMD build --resave-data} could fail if there was no
\file{data} directory but there was an \file{R/sysdata.rda} file.
\item \code{} misbehaved on a 0-column data frame.
\item \code{anova.lmlist()} failed if \code{test} was
supplied. (\PR{14960})
It was unable to compute Cp tests for object of class \code{"lm"}
(it assumed class \code{"glm"}).
\item The \code{formula} method for \code{sunflowerplot()} now
allows \code{xlab} and \code{ylab} to be set. (Reported by Gerrit
\item The \code{"POSIXt"} and \code{"Date"} methods for \code{hist()}
could fail on Windows where adjustments to the right-hand boundary
crossed a DST transition time.
\item On Windows, the code in \code{as.POSIXct()} to handle
incorrectly specified \code{isdst} fields might have resulted in
\code{NA} being returned.
\item \code{aov()} and \code{manova()} gave spurious warning about
singular error model in the multiresponse case.
\item In \code{ns()} and \code{bs()}, specifying \code{knots = NULL}
is now equivalent to omitting it, also when \code{df} is
specified. (\PR{14970})
\item \code{sprintf()} did not accept numbered arguments ending
in zero. (\PR{14975})
\item \code{rWishart()} could overflow the C stack and maybe crash
the \R process for dimensions of several hundreds or more.
(Reported by Michael Braun on R-sig-mac.)
\item Base package vignettes (e.g. \code{vignette("Sweave")}) were
not fully installed in builds of \R from the tarball.
\item \code{lchoose()} and \code{choose()} could overflow the C
stack and crash \R.
\item When given a 0-byte file and asked to keep source
references, \code{parse()} read input from \code{stdin()}
\item \code{pdf(compress = TRUE)} did not delete temporary files
it created until the end of the \R session. (\PR{14991})
\item \code{logLik()} did not detect the error of applying it
to a multiple-response linear model. (\PR{15000})
\item \code{file.copy(recursive = TRUE)} did not always report
\code{FALSE} for a failure two or more directories deep.
\item \code{qgeom()} could return \code{-1} for extremely small
\code{q}. (\PR{14967}.)
\item \code{smooth.spline()} used \code{DUP = FALSE} which allowed
its compiled C code to change the function: this was masked by the
default byte-compilation. (\PR{14965}.)
\item In Windows, the GUI preferences for foreground color were
not always respected. (Reported by Benjamin Wells.)
\item On OS X, the Quartz versions of the bitmap devices did not
respect \code{antialias = "none"}. (\PR{15006}.)
\item \code{unique()} and similar would infinite-loop if called on
a vector of length > \eqn{2^{29}}{2^29} (but reported that the
vector was too long for \eqn{2^{30}}{2^30} or more).
\item \code{parallel::stopCluster()} now works with MPI
clusters without \pkg{snow} being on the search path.
\item \code{terms.formula()} could exhaust the stack, and the
stack check did not always catch this before the segfault.
\item \code{sort.list(method = "radix")} could give incorrect
results on certain compilers (seen with \command{clang} on Mac OS
10.7 and \command{Xcode 4.4.1}).
\item \code{backsolve(T, b)} gave incorrect results when
\code{nrows(b) > ncols(T)} and \code{b} had more than one column.
It could segfault or give nonsense if \code{k} was specified as
more than \code{ncols(T)}.
\item \code{smooth.spline()} did not check that a specified
numeric \code{spar} was of length 1, and gave corrupt results if
it was of length 0.
\item Protection added to \code{do_system}. (\PR{15025})
\item Printing of vectors with names > 1000 characters now works
correctly rather than truncating. (\PR{15028})
\item \code{qr()} for a complex matrix did not pivot the column names.
\item \code{--with-blas='-framework vecLib'} now also works on OS X 10.8.
\item \command{R CMD check} no longer fails with an error if
a \file{DESCRIPTION} file incorrectly contains a blank line.
(Reported by Bill Dunlap.)
\item \code{install.packages(type = "both")} could call
\code{chooseCRANmirror()} twice.
\item \code{lm.wfit()} could segfault in \R 2.15.1 if all the
weights were zero. (\PR{15044})
\item A malformed package name could cause \command{R CMD INSTALL}
to write outside the target library.
\item Some of the quality control functions
(e.g. \code{tools::checkFF()}) were wrongly identifying the source
of S4 methods in a package and so not checking them.
\item The default type of display by \code{browseEnv()} when using
\command{} on Mac OS X has been incorrect for a long time.
\item The implementation of \code{importMethodsFrom} in a
\code{NAMESPACE} file could be confused and fail to find generics
when importing from multiple packages (reported and fixed by
Michael Lawrence).
\item The detection of the C stack direction is better protected
against compiler optimization. (\PR{15011}.)
\item Long custom line types would sometimes segfault on the
cairographics-based devices. (\PR{15055}.)
\item \code{tools::checkPoFile()} unprotected too early in its C
code and so segfaulted from time to time.
\item The Fortran code underlying \code{nlminb()} could
infinite-loop if any of the input functions returned \code{NA} or
\code{NaN}. This is now an error for the gradient or Hessian, and
a warning for the function (with the value replaced by
\code{Inf}). (In part, \PR{15052}.)
\item The code for creating \code{coerce()} methods could
generate false notes about ambiguous selection; the notes have
been suppressed for this function.
\item \code{arima.sim()} could give too long an output in some
corner cases (in part, \PR{15068}).
\item \code{anova.glm()} with \code{test = "Rao"} didn't work when
models included an offset. (Reported by Søren Feodor Nielsen.)
\item \code{} could return invalid data
frame with no \code{row.names} attribute for 0-row matrix. (Reported
by Hervé Pagès.)
\item Compilation with the \code{vecLib} or \code{Accelerate}
frameworks on OS X without using that also for LAPACK is more
likely to be successful.
\section{\Rlogo CHANGES IN R VERSION 2.15.1}{
\subsection{NEW FEATURES}{
\item \code{source()} now uses \code{withVisible()} rather than
\code{.Internal(eval.with.vis)}. This sometimes alters tracebacks
\item \code{install.packages("pkg_version.tgz")} on Mac OS X now
has sanity checks that this is actually a binary package (as
people have tried it with incorrectly named source packages).
\item \code{splineDesign()} and \code{spline.des()} in package
\pkg{splines} have a new option \code{sparse} which can be used
for efficient construction of a sparse B-spline design matrix
(\emph{via} \pkg{Matrix}).
\item \code{norm()} now allows \code{type = "2"} (the
\sQuote{spectral} or 2-norm) as well, mainly for didactical
\item \code{pmin()} and \code{pmax())} now also work when one of
the inputs is of length zero and others are not, returning a
zero-length vector, analogously to, say, \code{+}.
\item \code{colorRamp()} (and hence \code{colorRampPalette()}) now
also works for the boundary case of just one color when the ramp is
\item \code{.C()} gains some protection against the misuse of
character vector arguments. (An all too common error is to pass
\code{character(N)}, which initializes the elements to \code{""},
and then attempt to edit the strings in-place, sometimes forgetting
to terminate them.)
\item Calls to the new function \code{globalVariables()} in
package \pkg{utils} declare that functions and other objects in a
package should be treated as globally defined, so that \code{CMD
check} will not note them.
\item \code{print(packageDescription(*))} trims the \code{Collate}
field by default.
\item The included copy of \code{zlib} has been updated to version
\item A new option \code{"show.error.locations"} has been added.
When set to \code{TRUE}, error messages will contain the
location of the most recent call containing source reference
information. (Other values are supported as well; see
\item The NA warning messages from e.g. \code{pchisq()} now report
the call to the closure and not that of the \code{.Internal}.
\item Added Polish translations by Łukasz Daniel.
\item In package \pkg{parallel}, \code{makeForkCluster()} and the
multicore-based functions use native byte-order for serialization
(deferred from 2.15.0).
\item \code{}, \code{lm.wfit()}, \code{} and
\code{lsfit()} do less copying of objects, mainly by using
\code{.Call()} rather than \code{.Fortran()}.
\item \code{.C()} and \code{.Fortran()} do less copying: arguments
which are raw, logical, integer, real or complex vectors and are
unnamed are not copied before the call, and (named or not) are not
copied after the call. Lists are no longer copied (they are
supposed to be used read-only in the C code).
\item \code{tabulate()} makes use of \code{.C(DUP = FALSE)} and
hence does not copy \code{bin}. (Suggested by Tim Hesterberg.)
It also avoids making a copy of a factor argument \code{bin}.
\item Other functions (often or always) doing less copying include
\code{cut()}, \code{dist()}, the complex case of \code{eigen()},
\code{hclust()}, \code{image()}, \code{kmeans()}, \code{loess()},
\code{stl()} and \code{svd(LINPACK = TRUE)}.
\item There is less copying when using primitive replacement
functions such as \code{names()}, \code{attr()} and
\item The converters for use with \code{.C()} (see
\code{?getCConverterDescriptions}) are deprecated: use the
\code{.Call()} interface instead. There are no known examples
(they were never fully documented).
\item For \command{R CMD check}, a few people have reported
problems with junctions on Windows (although they were tested on
Windows 7, XP and Server 2008 machines and it is unknown under
what circumstances the problems occur). Setting the environment
variable \env{R_WIN_NO_JUNCTIONS} to a non-empty value (e.g. in
\file{~/.R/check.Renviron}) will force copies to be used instead.
\item \command{R CMD INSTALL} with \env{_R_CHECK_INSTALL_DEPENDS_}
set to a true value (as done by \command{R CMD check --as-cran})
now restricts the packages available when lazy-loading as well
as when test-loading (since packages such as \CRANpkg{ETLUtils}
and \CRANpkg{agsemisc} had top-level calls to \code{library()}
for undeclared packages).
This check is now also available on Windows.
\subsection{C-LEVEL FACILITIES}{
\item C entry points \code{mkChar} and \code{mkCharCE} now check
that the length of the string they are passed does not exceed
\eqn{2^{31}-1}{2^31-1} bytes: they used to overflow with
unpredictable consequences.
\item C entry points \code{R_GetCurrentSrcref} and
\code{R_GetSrcFilename} have been added to the API to allow
debuggers access to the source references on the stack.
\item Windows-specific changes will now be announced in this file
(\file{NEWS}). Changes up and including \R 2.15.0 remain in the
\file{CHANGES} file.
\item There are two new environment variables which
control the defaults for command-line options.
If \env{R_WIN_INTERNET2} is set to a non-empty value, it is as if
\option{--internet2} was used.
If \env{R_MAX_MEM_SIZE} is set, it gives the default memory limit
if \option{--max-mem-size} is not specified: invalid values being
\subsection{BUG FIXES}{
\item \code{lsfit()} lost the names from the residuals.
\item More cases in which \code{merge()} could create a data frame
with duplicate column names now give warnings. Cases where
names specified in \code{by} match multiple columns are errors.
\item Nonsense uses such as \code{seq(1:50, by = 5)} (from package
\CRANpkg{plotrix}) and \code{, by = 5)} are now errors.
\item The residuals in the 5-number summary printed by
\code{summary()} on an \code{"lm"} object are now explicitly
labelled as weighted residuals when non-constant weights are
present. (Wish of \PR{14840}.)
\item \code{tracemem()} reported that all objects were copied
by \code{.C()} or \code{.Fortran()} whereas only some object types
were ever copied.
It also reported and marked as copies \emph{some} transformations
such as \code{rexp(n, x)}: it no longer does so.
\item The \code{plot()} method for class \code{"stepfun"} only
used the optional \code{xval} argument to compute \code{xlim} and
not the points at which to plot (as documented). (\PR{14864})
\item Names containing characters which need to be escaped were
not deparsed properly. (\PR{14846})
\item Trying to update (recommended) packages in
\file{R_HOME/library} without write access is now dealt with more
gracefully. Further, such package updates may be skipped (with a
warning), when a newer installed version is already going to be
used from \code{.libPaths()}. (\PR{14866})
\item \code{hclust()} is now fast again (as up to end of 2003),
with a different fix for the "median"/"centroid" problem. (\PR{4195}).
\item \code{get_all_vars()} failed when the data came entirely
from vectors in the global environment. (\PR{14847})
\item \command{R CMD check} with \env{_R_CHECK_NO_RECOMMENDED_}
set to a true value (as done by the \command{--as-cran} option)
could issue false errors if there was an indirect dependency
on a recommended package.
\item \code{formatC()} uses the C entry point \code{str_signif}
which could write beyond the length allocated for the output string.
\item Missing default argument added to implicit S4 generic for
\code{backsolve()}. (\PR{14883})
\item Some bugs have been fixed in handling load actions that
could fail to export assigned items or generate spurious warnings
in \code{CMD check} on loading.
\item For \code{tiff(type = "windows")}, the numbering of per-page
files except the last was off by one.
\item On Windows, loading package \pkg{stats} (which is done for
a default session) would switch line endings on \file{stdout}
and \file{stderr} from CRLF to LF. This affected
\command{Rterm} and \command{R CMD BATCH}.
\item On Windows, the compatibility function \code{x11()} had
not kept up with changes to \code{windows()}, and issued
warnings about bad parameters. (\PR{14880})
\item On Windows, the \code{Sys.glob()} function did not handle
UNC paths as it was designed to try to do. (\PR{14884})
\item In package \pkg{parallel}, \code{clusterApply()} and similar
failed to handle a (pretty pointless) length-1 argument. (\PR{14898})
\item Quartz Cocoa display reacted asynchronously to
\code{dev.flush()} which means that the redraw could be performed
after the plot has been already modified by subsequent code. The
redraw is now done synchronously in \code{dev.flush()} to allow
animations without sleep cycles.
\item Source locations reported in \code{traceback()} were
incorrect when byte-compiled code was on the stack.
\item \code{plogis(x, lower = FALSE, log.p = TRUE)} no longer
underflows early for large x (e.g. 800).
\item \code{?Arithmetic}'s \dQuote{\code{1 ^ y} and \code{y ^ 0}
are \code{1}, \emph{always}} now also applies for \code{integer}
vectors \code{y}.
\item X11-based pixmap devices like \code{png(type = "Xlib")} were
trying to set the cursor style, which triggered some warnings and
\item Code executed by the built-in HTTP server no longer allows
other HTTP clients to re-enter \R until the current worker
evaluation finishes, to prevent cascades.
\item The \code{plot()} and \code{Axis()} methods for class
\code{"table"} now respect graphical parameters such as
\code{cex.axis}. (Reported by Martin Becker.)
\item Under some circumstances \code{package.skeleton()} would
give out progress reports that could not be translated and so were
displayed by question marks. Now they are always in English.
(This was seen for CJK locales on Windows, but may have occurred
\item The evaluator now keeps track of source references outside
of functions, e.g. when \code{source()} executes a script.
\item The replacement method for \code{window()} now works
correctly for multiple time series of class \code{"mts"}.
\item \code{is.unsorted()} gave incorrect results on non-atomic
objects such as data frames. (Reported by Matthew Dowle.)
\item The value returned by \code{tools::psnice()} for invalid
\code{pid} values was not always \code{NA} as documented.
\item Closing an \code{X11()} window while \code{locator()} was
active could abort the \R process.
\item \code{getMethod(f, sig)} produced an incorrect error message
in some cases when \code{f} was not a string).
\item Using a string as a \dQuote{call} in an error condition
with \code{options(showErrorCalls=TRUE)} could cause a segfault.
\item The string \code{"infinity"} allowed by C99 was not accepted
as a numerical string value by e.g. \code{scan()} and
\code{as.numeric()}. (\PR{14933})
\item In \code{legend()}, setting some entries of \code{lwd} to
\code{NA} was inconsistent (depending on the graphics device) in
whether it would suppress those lines; now it consistently does
so. (\PR{14926})
\item \code{by()} failed for a zero-row data frame. (Reported by
Weiqiang Qian.)
\item The Yates' correction in \code{chisq.test()} could be bigger
than the terms it corrected, previously leading to an infinite
test statistic in some corner cases which are now reported as
\item \code{xgettext()} and related functions sometimes returned
items that were not strings for translation. (\PR{14935})
\item \code{plot(<lm>, which=5)} now correctly labels the factor
level combinations for the special case where all
\eqn{h_ii}{h[i,i]} are the same. (\PR{14837})
\item \code{Sys.glob()} caused a segfault if the first element of
\code{path} was \code{NA_character}. (\PR{14990})
\section{\Rlogo CHANGES IN R VERSION 2.15.0}{
\item The behaviour of \code{unlink(recursive = TRUE)} for a
symbolic link to a directory has changed: it now removes the link
rather than the directory contents (just as \command{rm -r} does).
On Windows it no longer follows reparse points (including
junctions and symbolic links).
\subsection{NEW FEATURES}{
\item Environment variable \env{RD2DVI_INPUTENC} has been renamed
\item \code{.Deprecated()} becomes a bit more flexible, getting an
\code{old} argument.
\item Even data-only packages without \R code need a namespace and
so may need to be installed under \R 2.14.0 or later.
\item \code{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.
\item \code{system()} and \code{system2()} when capturing output
report a non-zero status in the new \code{"status"} attribute.
\item \code{kronecker()} now has an S4 generic in package
\pkg{methods} on which packages can set methods. It will be
invoked by \code{X \%x\% Y} if either \code{X} or \code{Y} is an S4
\item \code{pdf()} accepts forms like \code{file = "|lpr"} in the
same way as \code{postscript()}.
\item \code{pdf()} accepts \code{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).
\item \code{format()} (and hence \code{print()}) on
\code{"bibentry"} objects now uses \code{options("width")} to
set the output width.
\item \code{legend()} gains a \code{text.font} argument. (Suggested
by Tim Paine, \PR{14719}.)
\item \code{nchar()} and \code{nzchar()} no longer accept factors
(as integer vectors). (Wish of \PR{6899}.)
\item \code{summary()} behaves slightly differently (or more
precisely, its \code{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 \code{"data.frame"} method is more consistent with the default
method: in particular it now applies \code{zapsmall()} to
numeric/complex summaries.
\item The number of items retained with \code{options(warn = 0)}
can be set by \code{options(nwarnings=)}.
\item There is a new function \code{assignInMyNamespace()} which
uses the namespace of the function it is called from.
\item \code{attach()} allows the default name for an attached file
to be overridden.
\item \code{bxp()}, the work horse of \code{boxplot()}, now uses a
more sensible default \code{xlim} in the case where \code{at} is
specified differently from \code{1:n}, see the discussion on R-devel,
\item New function \code{paste0()}, an efficient version of
\code{paste(*, sep="")}, to be used in many places for more
concise (and slightly more efficient) code.
\item Function \code{setClass()} in package \pkg{methods} now
returns, invisibly, a generator function for the new class,
slightly preferred to calling \code{new()}, as explained on the
\code{setClass} help page.
\item The \code{"dendrogram"} method of \code{str()} now takes
its default for \code{last.str} from option \code{str.dendrogram.last}.
\item New simple \code{fitted()} method for \code{"kmeans"} objects.
\item The \code{traceback()} function can now be called with
an integer argument, to display a current stack trace. (Wish of
\item \code{setGeneric()} calls can be simplified when creating
a new generic function by supplying the default method as the
\code{def} argument. See \code{?setGeneric}.
\item \code{serialize()} has a new option \code{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.
\item The internal (un)serialization code is faster for long
vectors, particularly with XDR on some platforms. (Based on a
suggested patch by Michael Spiegel.)
\item For consistency, circles with zero radius are omitted by
\code{points()} and \code{}. Previously this was
device-dependent, but they were usually invisible.
\item \code{NROW(x)} and \code{NCOL(x)} now work whenever
\code{dim(x)} looks appropriate, e.g., also for more generalized
\item PCRE has been updated to version 8.30.
\item The internal \code{R_Srcref} variable is now updated
before the browser stops on entering a function. (Suggestion of
\item There are \sQuote{bare-bones} functions \code{.colSums()},
\code{.rowSums()}, \code{.colMeans()} and \code{.rowMeans()} for
use in programming where ultimate speed is required.
\item The formerly internal function
\code{.package_dependencies()} from package \pkg{tools} for
calculating (recursive) (reverse) dependencies on package databases
has been renamed to \code{package_dependencies()} and is now
\item There is a new function \code{optimHess()} to compute the
(approximate) Hessian for an \code{optim()} solution if
\code{hessian = TRUE} was forgotten.
\item \code{.filled.contour()} is a \sQuote{bare-bones} function to
add a filled-contour rectangular plot to an already prepared plot
\item 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 \code{if} statements as well as for \code{for} and
\code{while} statements. (Wish of \PR{14814}.)
\item \code{library()} no longer warns about a conflict with a
function from \code{package:base} if the function has the same
code as the base one but with a different environment. (An
example is \code{Matrix::det()}.)
\item When deparsing very large language objects,
\code{as.character()} now inserts newlines after each line of
approximately 500 bytes, rather than truncating to the first
\item New function \code{rWishart()} generates Wishart-distributed
random matrices.
\item Packages may now specify actions to be taken when the
package is loaded (\code{setLoadActions()}).
\item \code{options(max.print = Inf)} and similar now give an
error (instead of warnings later).
\item The \code{"difftime"} replacement method of \code{units}
tries harder to preserve other attributes of the argument. (Wish
of \PR{14839}.)
\item \code{poly(raw = TRUE)} no longer requires more unique
points than the degree. (Requested by John Fox.)
\subsection{PACKAGE parallel}{
\item There is a new function \code{mcmapply()}, a parallel version
of \code{mapply()}, and a wrapper \code{mcMap()}, a parallel
version of \code{Map()}.
\item A default cluster can be registered by the new function
\code{setDefaultCluster()}: this will be used by default in
functions such as \code{parLapply()}.
\item \code{clusterMap()} has a new argument \code{.scheduling} to
allow the use of load-balancing.
\item There are new load-balancing functions \code{parLapplyLB()}
and \code{parSapplyLB()}.
\item \code{makePSOCKCluster()} has a new option \code{useXDR =
FALSE} which can be used to avoid byte-shuffling for
serialization when all the nodes are known to be little-endian (or
all big-endian).
\item Non-ASCII vignettes without a declared encoding are no
longer accepted.
\item C/C++ code in packages is now compiled with \code{-NDEBUG}
to mitigate against the C/C++ function \code{assert} being called
in production use. Developers can turn this off during package
development with \code{PKG_CPPFLAGS = -UNDEBUG}.
\item \command{R CMD INSTALL} has a new option \option{--dsym}
which on Mac OS X (Darwin) dumps the symbols alongside the
\file{.so} file: this is helpful when debugging with
\command{valgrind} (and especially when installing packages into
\file{R.framework}). [This can also be enabled by setting the
undocumented environment variable \env{PKG_MAKE_DSYM}, since \R
\item \command{R CMD INSTALL} will test loading under all installed
sub-architectures even for packages without compiled code, unless
the flag \option{--no-multiarch} is used. (Pure \R packages can
do things which are architecture-dependent: in the case which
prompted this, looking for an icon in a Windows \R executable.)
\item There is a new option \code{install.packages(type = "both")}
which tries source packages if binary packages are not available,
on those platforms where the latter is the default.
\item The meaning of \code{install.packages(dependencies = TRUE)}
has changed: it now means to install the essential dependencies of
the named packages plus the \samp{Suggests}, but only the
essential dependencies of dependencies. To get the previous
behaviour, specify \code{dependencies} as a character vector.
\item \command{R CMD INSTALL --merge-multiarch} is now supported
on OS X and other Unix-alikes using multiple sub-architectures.
\item \command{R CMD INSTALL --libs-only} now by default does a
test load on Unix-alikes as well as on Windows: suppress with
\item \command{R CMD check} now gives a warning rather than a
note if it finds inefficiently compressed datasets. With
\command{bzip2} and \command{xz} compression having been
available since \R 2.10.0, it only exceptionally makes sense to
not use them.
The environment variable \env{_R_CHECK_COMPACT_DATA2_} is
no longer consulted: the check is always done if
\env{_R_CHECK_COMPACT_DATA_} has a true value (its default).
\item Where multiple sub-architectures are to be tested,
\command{R CMD check} now runs the examples and tests for all the
sub-architectures even if one fails.
\item \command{R CMD check} can optionally report timings on
various parts of the check: this is controlled by environment
variable \env{_R_CHECK_TIMINGS_} documented in \sQuote{Writing R
Extensions}. Timings (in the style of \command{R CMD BATCH}) are
given at the foot of the output files from running each test and
the \R code in each vignette.
\item There are new options for more rigorous testing by
\command{R CMD check} selected by environment variables -- see
the \sQuote{Writing R Extensions} manual.
\item \command{R CMD check} now warns (rather than notes) on
undeclared use of other packages in examples and tests:
increasingly people are using the metadata in the
\file{DESCRIPTION} file to compute information about packages,
for example reverse dependencies.
\item The defaults for some of the options in \command{R CMD
check} (described in the \sQuote{R Internals} manual) have
changed: checks for unsafe and \code{.Internal()} calls and
for partial matching of arguments in \R function calls are now
done by default.
\item \command{R CMD check} has more comprehensive facilities for
checking compiled code and so gives fewer reports on entry points
linked into \file{.so}/\file{.dll} files from libraries
(including C++ and Fortran runtimes).
Checking compiled code is now done on FreeBSD (as well as the
existing supported platforms of Linux, Mac OS X, Solaris and
\item \command{R CMD build} has more options for
\option{--compact-vignettes}: see \command{R CMD build --help}.
\item \command{R CMD build} has a new option \option{--md5} to
add an \file{MD5} file (as done by CRAN): this is used by \code{R
CMD INSTALL} to check the integrity of the distribution.
If this option is not specified, any existing (and probably
stale) \file{MD5} file is removed.
\item \command{R CMD Rd2dvi} is now defunct: use \command{R CMD Rd2pdf}.
\item Options such \option{--max-nsize}, \option{--max-vsize} and
the function \code{mem.limits()} are now defunct. (Options
\option{--min-nsize} and \option{--min-vsize} remain available.)
\item Use of \code{library.dynam()} without specifying all the
first three arguments is now disallowed.
Use of an argument \code{chname} in \code{library.dynam()}
including the extension \file{.so} or \file{.dll} (which was never
allowed according to the help page) is defunct. This also applies
to \code{library.dynam.unload()} and to \code{useDynLib}
directives in \file{NAMESPACE} files.
\item The internal functions \code{.readRDS()} and
\code{.saveRDS()} are now defunct.
\item The off-line \code{help()} types \samp{"postscript"} and
\samp{"ps"} are defunct.
\item \code{Sys.putenv()}, replaced and deprecated in \R 2.5.0, is
finally removed.
\item Some functions/objects which have been defunct for five or
more years have been removed completely. These include
\code{.Alias()}, \code{La.chol()}, \code{La.chol2inv()},
\code{La.eigen()}, \code{Machine()}, \code{Platform()},
\code{Version}, \code{codes()}, \code{delay()},
\code{format.char()}, \code{getenv()}, \code{httpclient()},
\code{loadURL()}, \code{machine()}, \code{parse.dcf()},
\code{printNoClass()}, \code{provide()}, \code{read.table.url()},
\code{restart()}, \code{scan.url()}, \code{symbol.C()},
\code{symbol.For()} and \code{unix()}.
\item The \code{ENCODING} argument to \code{.C()} is deprecated.
It was intended to smooth the transition to multi-byte character
strings, but can be replaced by the use of \code{iconv()} in the
rare cases where it is still needed.
\item Building with a positive value of
\option{--with-valgrind-instrumentation} now also instruments logical,
complex and raw vectors.
\subsection{C-LEVEL FACILITIES}{
\item Passing \R objects other than atomic vectors, functions,
lists and environments to \code{.C()} is now deprecated and will
give a warning. Most cases (especially \code{NULL}) are actually
coding errors. \code{NULL} will be disallowed in future.
\code{.C()} now passes a pairlist as a \code{SEXP} to the compiled
code. This is as was documented, but pairlists were in reality
handled differently as a legacy from the early days of \R.
\item \code{call_R} and \code{call_S} are deprecated. They still
exist in the headers and as entry points, but are no longer
documented and should not be used for new code.
\subsection{BUG FIXES}{
\item \code{str(x, width)} now obeys its \code{width}
argument also for function headers and other objects \code{x}
where \code{deparse()} is applied.
\item The convention for \code{x \%/\% 0L} for integer-mode \code{x}
has been changed from \code{0L} to \code{NA_integer_}.
\item The \code{exportMethods} directive in a \file{NAMESPACE}
file now exports S4 generics as necessary, as the extensions
manual said it does. The manual has also been updated to be a
little more informative on this point.
It is now required that there is an S4 generic (imported or
created in the package) when methods are to be exported.
\item Reference methods cannot safely use non-exported entries
in the namespace. We now do not do so, and warn in the documentation.
\item The namespace import code was warning when identical
S4 generic functions were imported more than once, but should
not (reported by Brian Ripley, then Martin Morgan).
\item \code{merge()} is no longer allowed (in some ways) to create
a data frame with duplicate column names (which confused
\item Fixes for rendering raster images on X11 and Windows devices
when the x-axis or y-axis scale is reversed.
\item \code{getAnywhere()} found S3 methods as seen from the
\pkg{utils} namespace and not from the environment from which it
was called.
\item \code{selectMethod(f, sig)} would not return inherited group
methods when caching was off (as it is by default).
\item \code{dev.copy2pdf(out.type = "cairo")} gave an error.
\item Virtual classes (e.g., class unions) had a \code{NULL}
prototype even if that was not a legal subclass. See
\item The C prototypes for \code{zdotc} and \code{zdotu} in
\file{R_ext/BLAS.h} have been changed to the more modern style
rather than that used by \command{f2c}. (Patch by Berwin Turlach.)
\item \code{isGeneric()} produced an error for primitives that
can not have methods.
\item \code{.C()} or \code{.Fortran()} had a lack-of-protection
error if the registration information resulted in an argument
being coerced to another type.
\item \code{boxplot(x=x, at=at)} with non finite elements in \code{x}
and non integer \code{at} could not generate a warning but failed.
\item \code{heatmap(x, symm=TRUE, RowSideColors=*)} no longer
draws the colors in reversed order.
\item \code{predict(<ar>)} was incorrect in the multivariate case,
for p >= 2.
\item \code{print(x, max=m)} is now consistent when \code{x} is a
\code{"Date"}; also the \dQuote{reached ... max.print ..} messages
are now consistently using single brackets.
\item Closed the \samp{<li>} tag in pages generated by \code{
Rd2HTML()}. (\PR{14841}.)
\item Axis tick marks could go out of range when a log scale was
used. (\PR{14833}.)
\item Signature objects in methods were not allocated as S4
objects (caused a problem with \code{trace()} reported by Martin Morgan).
\section{\Rlogo CHANGES IN R VERSION 2.14.2}{
\subsection{NEW FEATURES}{
\item The internal \code{untar()} (as used by default by
\command{R CMD INSTALL}) now knows about some \command{pax}
headers which \command{bsdtar} (e.g., the default \command{tar} for
Mac OS >= 10.6) can incorrectly include in \command{tar} files,
and will skip them with a warning.
\item PCRE has been upgraded to version 8.21: as well as bug fixes
and greater Perl compatibility, this adds a JIT pattern compiler,
about which PCRE's news says
\sQuote{large performance benefits can be had in many situations}.
This is supported on most but not all \R platforms.
\item Function \code{compactPDF()} in package \pkg{tools} now
takes the default for argument \code{gs_quality} from environment
variable \env{GS_QUALITY}: there is a new value \code{"none"}, the
ultimate default, which prevents GhostScript being used in
preference to \command{qpdf} just because environment variable
\env{R_GSCMD} is set. If \env{R_GSCMD} is unset or set to
\code{""}, the function will try to find a suitable GhostScript
\item The included version of zlib has been updated to 1.2.6.
\item For consistency with the \code{logLik()} method,
\code{nobs()} for \code{"nls"} files now excludes observations
with zero weight. (Reported by Berwin Turlach.)
\item \command{R CMD check} now reports by default on licenses not
according to the description in \sQuote{Writing R Extensions}.
\item \command{R CMD check} has a new option \option{--as-cran} to
turn on most of the customizations that CRAN uses for its incoming
\item \command{R CMD INSTALL} will now no longer install certain
file types from \file{inst/doc}: these are almost certainly
mistakes and for some packages are wasting a lot of space. These
are \file{Makefile}, files generated by running LaTeX, and unless
the package uses a \file{vignettes} directory, PostScript and
image bitmap files.
Note that only PDF vignettes have ever been supported: some of
these files come from DVI/PS output from the Sweave defaults prior
to \R 2.13.0.
\subsection{BUG FIXES}{
\item R configured with \option{--disable-openmp} would mistakenly
set \code{HAVE_OPENMP} (internal) and \code{SUPPORT_OPENMP} (in
\file{Rconfig.h}) even though no OpenMP flags were populated.
\item The \code{getS3method()} implementation had an old
computation to find an S4 default method.
\item \code{readLines()} could overflow a buffer if the last line
of the file was not terminated. (\PR{14766})
\item \command{R CMD check} could miss undocumented S4 objects in
packages which used S4 classes but did not \samp{Depends: methods}
in their \file{DESCRIPTION} file.
\item The HTML Help Search page had malformed links.
\item A couple of instances of lack of protection of \code{SEXP}s
have been squashed. (\PR{14772}, \PR{14773})
\item \code{image(x, useRaster=TRUE)} misbehaved on single-column
\code{x}. (\PR{14774})
\item Negative values for \code{options("max.print")} or the \code{max}
argument to \code{print.default()} caused crashes. Now the former
are ignored and the latter trigger an error. (\PR{14779})
\item The text of a function body containing more than 4096
bytes was not properly saved by the parser when entered
at the console.
\item Forgetting the \code{#endif} tag in an Rd file could cause
the parser to go into a loop. (Reported by Hans-Jorg Bibiko.)
\item \code{str(*, ....., strict.width="cut")} now also obeys
\code{list.len = n}. (Reported by Sören Vogel.)
\item Printing of arrays did not have enough protection (C level),
e.g., in the context of \code{capture.output()}. (Reported by
Hervé Pagès and Martin Morgan.)
\item \code{pdf(file = NULL)} would produce a spurious file named
\file{NA}. (\PR{14808})
\item \code{list2env()} did not check the type of its \code{envir}
argument. (\PR{14807})
\item \code{svg()} could segfault if called with a non-existent
file path. (\PR{14790})
\item \command{make install} can install to a path containing
\samp{+} characters. (\PR{14798})
\item The \code{edit()} function did not respect the
\code{options("keep.source")} setting. (Reported by Cleridy
\item \code{predict.lm(*, type="terms", terms=*,} did
not work. (\PR{14817})
\item There is a partial workaround for errors in the TRE
regular-expressions engine with named classes and repeat counts of
at least 2 in a MBCS locale (\PR{14408}): these are avoided when
TRE is in 8-bit mode (e.g. for \code{useBytes = TRUE} and when all
the data are ASCII).
\item The C function \code{R_ReplDLLdo1()} did not call top-level
\item The Quartz device was unable to detect window sessions on
Mac OS X 10.7 (Lion) and higher and thus it was not used as the
default device on the console. Since Lion any application can use
window sessions, so Quartz will now be the default device if the
user's window session is active and \R is not run via
\command{ssh} which is at least close to the behavior in prior OS
X versions.
\item \code{mclapply()} would fail in code assembling the translated
error message if some (but not all) cores encountered an error.
\item \code{format.POSIXlt(x)} raised an arithmetic exception when
\code{x} was an invalid object of class \code{"POSIXlt"} and parts
were empty.
\item \code{installed.packages()} has some more protection against
package installs going on in parallel.
\item \code{.Primitive()} could be mis-used to call
\code{.Internal()} entry points.
\section{\Rlogo CHANGES IN R VERSION 2.14.1}{
\subsection{NEW FEATURES}{
\item \code{parallel::detectCores()} is now able to find the
number of physical cores (rather than CPUs) on Sparc Solaris.
It can also do so on most versions of Windows; however the default
remains \code{detectCores(logical = TRUE)} on that platform.
\item Reference classes now keep a record of which fields are
locked. \code{$lock()} with no arguments returns the names % $
of the locked fields.
\item \code{HoltWinters()} reports a warning rather than an error
for some optimization failures (where the answer might be a
reasonable one).
\item \code{tools::dependsOnPkg()} now accepts the shorthand
\code{dependencies = "all"}.
\item \code{parallel::clusterExport()} now allows specification of
an environment from which to export.
\item The \code{quartz()} device now does tilde expansion on its
\code{file} argument.
\item \code{tempfile()} on a Unix-alike now takes the process ID
into account. This is needed with \CRANpkg{multicore} (and as part of
\pkg{parallel}) because the parent and all the children share a
session temporary directory, and they can share the C random
number stream used to produce the unique part. Further, two
children can call \code{tempfile()} simultaneously.
\item Option \code{print} in Sweave's \code{RweaveLatex()} driver
now emulates auto-printing rather than printing (which can differ
for an S4 object by calling \code{show()} rather than
\item \code{filled.contour()} now accepts infinite values:
previously it might have generated invalid graphics files
(e.g. containing NaN values).
\item On 64-bit Linux systems, \command{configure} now only sets
\samp{LIBnn} to \code{lib64} if \file{/usr/lib64} exists. This
may obviate setting \samp{LIBnn} explicitly on Debian-derived
It is still necessary to set \samp{LIBnn = lib} (or
\samp{lib32}) for 32-bit builds of \R on a 64-bit OS on those Linux
distributions capable for supporting that concept.
\item \command{configure} looks for \file{inconsolata.sty}, and if
not found adjusts the default \env{R_RD4PDF} to not use it (with a
warning, since it is needed for high-quality rendering of manuals).
\item \command{R CMD INSTALL} will now do a test load for all
sub-architectures for which code was compiled (rather than just
the primary sub-architecture).
\item When checking examples under more than one sub-architecture,
\command{R CMD check} now uses a separate directory
\file{examples_arch} for each sub-architecture, and leaves the
output in file \file{pkgname-Ex_arch.Rout}. Some packages
expect their examples to be run in a clean directory \dots{}.
\subsection{BUG FIXES}{
\item \code{stack()} now gives an error if no vector column is
selected, rather than returning a 1-column data frame (contrary to
its documentation).
\item \code{summary.mlm()} did not handle objects where the
formula had been specified by an expression. (Reported by
Helios de Rosario Martinez).
\item \code{tools::deparseLatex(dropBraces=TRUE)} could drop
text as well as braces.
\item \code{colormodel = "grey"} (new in \R 2.14.0))
did not always work in \code{postscript()} and \code{pdf()}.
\item \code{file.append()} could return \code{TRUE} for failures.
\item \code{gzcon()} connections are no longer subject to garbage
collection: it was possible for this to happen when unintended
(e.g. when calling \code{load()}).
\item \code{nobs()} does not count zero-weight observations for
\code{glm()} fits, for consistency with \code{lm()}. This affects
the \code{BIC()} values reported for such \code{glm()} fits.
(Spotted by Bill Dunlap.)
\item \code{options(warn = 0)} failed to end a (C-level) context
with more than 50 accumulated warnings. (Spotted by Jeffrey
\item The internal \code{plot.default()} code did not do sanity
checks on a \code{cex} argument, so invalid input could cause
problems. (Reported by Ben Bolker.)
\item \code{anyDuplicated(<array>, MARGIN=0)} no longer fails.
(Reported by Hervé Pagès.)
\item \code{read.dcf()} removes trailing blanks: unfortunately
on some platforms this included \code{\\xa0} (non-breaking space)
which is the trailing byte of a UTF-8 character. It now only
considers ASCII space and tab to be \sQuote{blank}.
\item There was a sign error in part of the calculations for the
variance returned by \code{KalmanSmooth()}. (\PR{14738})
\item \code{pbinom(10, 1e6, 0.01, log.p = TRUE)} was \code{NaN}
thanks to the buggy fix to \PR{14320} in \R 2.11.0. (\PR{14739})
\item \code{RweaveLatex()} now emulates auto-printing rather than
printing, by calling \code{methods::show()} when auto-printing
\item \code{duplicated()} ignored \code{fromLast} for a
one-column data frame. (\PR{14742})
\item \code{source()} and related functions did not put the correct
timestamp on the source references; \code{srcfilecopy()} has gained
a new argument \code{timestamp} to support this fix. (\PR{14750})
\item \code{srcfilecopy()} has gained a new argument \code{isFile}
and now records the working directory, to allow debuggers to find
the original source file. (\PR{14826})
\item LaTeX conversion of Rd files did not correctly handle
preformatted backslashes. (\PR{14751})
\item HTML conversion of Rd files did not handle markup within
tabular cells properly. (\PR{14708})
\item \code{source()} on an empty file with \code{keep.source =
TRUE} tried to read from \code{stdin()}, in \R 2.14.0 only.
\item The code to check Rd files in packages would abort if
duplicate description sections were present.
\section{\Rlogo CHANGES IN R VERSION 2.14.0}{
\item All packages must have a namespace, and one is created on
installation if not supplied in the sources. This means that any
package without a namespace must be re-installed under this
version of \R (but previously-installed data-only packages without
\R code can still be used).
\item The \code{yLineBias} of the \code{X11()} and
\code{windows()} families of devices has been changed from 0.1 to
0.2: this changes slightly the vertical positioning of text in the
margins (including axis annotations). This is mainly for
consistency with other devices such as \code{quartz()} and
\code{pdf()}. (Wish of \PR{14538}.)
There is a new graphics parameter \code{"ylbias"} which
allows the y-line bias of the graphics device to be tweaked,
including to reproduce output from earlier versions of \R.
\item Labeling of the p-values in various anova tables has been
rationalized to be either \code{"Pr(>F)"} or \code{"Pr(>Chi)"}
(i.e. the \code{"Pr(F)"}, \code{"Pr(Chi)"} and \code{"P(>|Chi|)"}
variants have been eliminated). Code which extracts the p value
\emph{via} indexing by name may need adjustment.
\item \code{::} can now be used for datasets made available for
lazy-loading in packages with namespaces (which makes it consistent
with its use for data-only packages without namespaces in earlier
versions of \R).
\item There is a new package \pkg{parallel}.
It incorporates (slightly revised) copies of packages
\CRANpkg{multicore} and \CRANpkg{snow} (excluding MPI, PVM and NWS
clusters). Code written to use the higher-level API functions in
those packages should work unchanged (apart from changing any
references to their namespaces to a reference to \pkg{parallel},
and links explicitly to \CRANpkg{multicore} or \CRANpkg{snow} on help
It also contains support for multiple RNG streams following
L'Ecuyer \emph{et al} (2002), with support for both
\code{mclapply} and \CRANpkg{snow} clusters. This replaces functions
like \code{clusterSetupRNG()} from \CRANpkg{snow} (which are not in
The version released for \R 2.14.0 contains base functionality:
higher-level convenience functions are planned (and some are
already available in the \sQuote{R-devel} version of \R).
\item Building PDF manuals (for \R itself or packages,
e.g. \emph{via} \command{R CMD check}) by default requires the
LaTeX package \samp{inconsolata}: see the section on
\sQuote{Making the manuals} in the \sQuote{R Installation and
Administration Manual}.
\item \code{axTicks(*, log=TRUE)} has changed in some cases to
satisfy the documented behavior and be consistent.
\subsection{NEW FEATURES}{
\item \code{txtProgressBar()} can write to an open connection
instead of the console.
\item Non-portable package names ending in \file{.} are no longer
allowed. Nor are single-character package names (\pkg{R} was
already disallowed).
\item \code{regexpr()} and \code{gregexpr()} with \code{perl =
TRUE} allows Python-style named captures. (Wish and
contribution of \PR{14518}.)
\item The placement of \sQuote{plotmath} text in the margins of
plots done by base graphics now makes the same vertical adjustment
as ordinary text, so using ordinary and plotmath text on the same
margin line will seem better aligned (but not exactly aligned,
since ordinary text has descenders below the baseline and plotmath
places them on the baseline). (Related to \PR{14537}.)
\item \code{sunflowerplot()} now has a formula interface.
(Wish of \PR{14541}.)
\item \code{iconv()} has a new argument \code{toRaw} to handle
encodings such as \code{UTF-16} with embedded nuls (as was
possible before the \code{CHARSXP} cache was introduced).
It will also accept as input the type of list generated with
\code{toRaw = TRUE}.
\item Garbage-collecting an unused input text connection no longer
gives a warning (since it \sQuote{connects} to nothing outside
\item \code{read.table()} and \code{scan()} have gained a
\code{text} argument, to allow reading data from a (possibly
literal) character string.
\item \code{optim(*, method = .)} now allows \code{method = "Brent"}
as an interface to \code{optimize()}, for use in cases such as
\code{mle()} where \code{optim()} is used internally.
\item \code{mosaicplot()} gains a \code{border} argument.
(Wish of \PR{14550}.)
\item \code{smooth.spline()} gains a \code{tol} argument which
controls how different \code{x} values need to be to be treated as
distinct. The default has been changed to be more reliable for
inputs whose range is small compared to their maximum absolute
value. (Wish of \PR{14452}.)
\item \code{gl()} runs faster by avoiding calling \code{factor()}.
\item The \code{print()} method for \code{object.size()} accepts
\samp{B} as well as \samp{b} as an abbreviation for \sQuote{bytes}.
\item \code{unlink()} gains a \code{force} argument to work like
\command{rm -f} and if possible override restrictive permissions.
\item \code{pbirthday()} and \code{qbirthday()} now use exact
calculations for \code{coincident = 2}.
\item \code{unzip()} and \code{unz()} connections have been
updated with support for more recent Zip64 features (including
large file sizes and \command{bzip2} compression, but not UTF-8
file names).
\code{unzip()} has a new option to restore file times from those
recorded (in an unknown timezone) in the zip file.
\item \code{update.packages()} now accepts a character vector of
package names for the \code{oldPkgs} argument. (Suggestion of
Tal Galili.)
\item The special reference class fields \code{.self} and
\code{.refClassDef} are now read-only to prevent corrupting
the object.
\item \code{decompose()} now returns the original series as part
of its value, so it can be used (rather than reconstructed) when
plotting. (Suggestion of Rob Hyndman.)
\item Rao's efficient score test has been implemented for
\code{glm} objects. Specifically, the \code{add1}, \code{drop1},
and \code{anova} methods now allow \code{test = "Rao"}.
\item If a saved workspace (e.g. \file{.RData}) contains objects
that cannot be loaded, \R will now start with an warning message
and an empty workspace, rather than failing to start.
\item \code{strptime()} now accepts times such as \samp{24:00} for
midnight at the end of the day, for although these are disallowed by
POSIX 1003.1-2008, ISO 8601:2004 allows them.
\item Assignment of \code{names()} to S4 objects now checks for
a corresponding \code{"names"} slot, and generates a warning or
an error if that slot is not defined. See the section on slots
in \code{?Classes}.
\item The default methods for \code{is.finite()}, \code{is.infinite()}
and \code{is.nan()} now signal an error if their argument is not
an atomic vector.
\item The formula method for \code{plot()} no longer places
package \pkg{stats} on the search path (it loads the namespace
\item There now is a genuine \code{"function"} method for
\code{plot()} rather than the generic dispatching internally to
\code{graphics::plot.function()}. It is now exported, so can be
called directly as \code{plot.function()}.
\item The one-sided \code{ks.test()} allows \code{exact = TRUE} to
be specified in the presence of ties (but the approximate
calculation remains the default: the \sQuote{exact} computation
makes assumptions known to be invalid in the presence of ties).
\item The behaviour of \code{curve(add = FALSE)} has changed: it
now no longer takes the default x limits from the previous plot
(if any): rather they default to \code{c(0, 1)} just as the
\code{"function"} method for \code{plot()}. To get the previous
behaviour use \code{curve(add = NA)}, which also takes the default for
log-scaling of the x-axis from the previous plot.
\item Both \code{curve()} and the \code{plot()} method for
functions have a new argument \code{xname} to facilitate plots
such as \code{sin(t)} \emph{vs} \code{t}.
\item The \code{local} argument to \code{source()} can specify an
environment as well as \code{TRUE} (\code{parent.env()}) and
\code{FALSE} (\code{.GlobalEnv}). It gives better error messages
for other values, such as \code{NA}.
\item \code{vcov()} gains methods for classes \code{"summary.lm"} and
\item The \code{plot()} method for class \code{"profile.nls"}
gains \code{ylab} and \code{lty} arguments, and passes
\code{\dots} on to \code{plot.default}.
\item Character-string arguments such as the \code{mode} argument
of \code{vector()}, \code{as.vector()} and \code{is.vector()} and
the \code{description} argument of \code{file()} are required to
be of length exactly one, rather than any further elements being
silently discarded. This helps catch incorrect usage in
\item The \code{length} argument of \code{vector()} and its
wrappers such as \code{numeric()} is required to be of length
exactly one (other values are now an error rather than giving a
warning as previously).
\item \code{vector(len)} and \code{length(x) <- len} no longer
accept \code{TRUE}/\code{FALSE} for \code{len} (not that they
were ever documented to, but there was special-casing in the C
\item There is a new function \code{Sys.setFileTime()} to set the
time of a file (including a directory). See its help for exactly
which times it sets on various OSes.
\item The file times reported by \code{} are reported
to sub-second resolution on systems which support it. (Currently
the POSIX 2008 and FreeBSD/Darwin/NetBSD methods are detected.)
\item New function \code{getCall(m)} as an abstraction for
\code{m$call}, enabling \code{update()}'s default method to apply % $
more universally. (NB: this can be masked by existing functions
in packages.)
\item \code{} gains a \code{euser} component to report
the \sQuote{effective} user on OSes which have that concept.
\item The result returned by \code{try()} now contains the
original error condition object as the \code{"condition"}
\item All packages with \R code are lazy-loaded irrespective of
the \samp{LazyLoad} field in the \file{DESCRIPTION} file. A
warning is given if the \samp{LazyLoad} field is overridden.
\item \code{Rd} markup has a new \samp{\figure} tag so that
figures can be included in help pages when converted to HTML or
LaTeX. There are examples on the help pages for \code{par()} and
\item The built-in httpd server now allows access to files
in the session temporary directory \code{tempdir()},
addressed as the \file{/session} directory on the httpd
\item Development versions of \R are no longer referred to by the
number under which they might be released, e.g. in the startup
banner, \command{R --version} and \code{sessionUtils()}. The
correct way to refer to a development version of R is
\sQuote{R-devel}, preferably with the date and SVN version number.\cr
E.g. \samp{R-devel (2011-07-04 r56266)}
\item There is a new function \code{texi2pdf()} in package
\pkg{tools}, currently a convenience wrapper for
\code{texi2dvi(pdf = TRUE)}.
\item There are two new options for typesetting PDF manuals from
Rd files. These are \samp{beramono} and \samp{inconsolata}, and
used the named font for monospaced output. They are intended to
be used in combination with \samp{times}, and
\samp{times,inconsolata,hyper} is now the default for the
reference manual and package manuals. If you do not have that
font installed, you can set \env{R_RD4PF} to one of the other
options: see the \sQuote{R Installation and Administration Manual}.
\item Automatic printing for reference classes is now done by
the \code{$show()} method. A method is defined for class % $
\samp{envRefClass} and may be overridden for user classes (see
the \code{?ReferenceClasses} example). S4 \code{show()} methods
should no longer be needed for reference classes.
\item \code{tools::Rdiff} (by default) and \code{R CMD Rdiff}
now ignore differences in pointer values when comparing printed
environments, compiled byte code, etc.
\item The \code{"source"} attribute on functions created with
\code{keep.source=TRUE} has been replaced with a \code{"srcref"}
attribute. The \code{"srcref"} attribute references an in-memory
copy of the source file using the \code{"srcfilecopy"} class or
the new \code{"srcfilealias"} class.
\strong{NB:} This means that functions sourced with
\code{keep.source = TRUE} and saved (e.g., by \code{save()} or
\code{readRDS()}) in earlier versions of \R will no longer show
the original sources (including comments).
\item New items \href{UserManuals.html}{User Manuals} and
\href{}{Technical Papers}
have been added to the HTML help main page. These link to
vignettes in the base and recommended packages and to a
collection of papers about R issues, respectively.
\item Documentation and messages have been standardized to
use \dQuote{namespace} rather than \dQuote{name space}.
\item \code{setGeneric()} now looks in the default packages for
a non-generic version of a function if called from a package with a
namespace. (It always did for packages without a namespace.)
\item Setting the environment variable
\env{_R_WARN_ON_LOCKED_BINDINGS_} will give a warning if an
attempt is made to change a locked binding.
\item \code{\\SweaveInput} is now supported when generating
concordances in \code{Sweave()}.
\item \code{findLineNum()} and \code{setBreakpoint()} now allow
the environment to be specified indirectly; the latter gains
a \code{clear} argument to allow it to call \code{untrace()}.
\item The body of a closure can be one of further types of \R
objects, including environments and external pointers.
\item The \code{Rd2HTML()} function in package \pkg{tools} now has
a \code{stylesheet} argument, allowing pages to be displayed in
alternate formats.
\item New function \code{requireNamespace()} analogous to
\code{require()}, returning a logical value after attempting to
load a namespace.
\item There is a new type of RNG, \code{"L'Ecuyer-CMRG"},
implementing L'Ecuyer (1999)'s \sQuote{combined multiple-recursive
generator} \samp{MRG32k3a}. See the comments on \code{?RNG}.
\item \code{} and \code{??} can now display
vignettes and demos as well as help pages. The new option
\code{""} controls the types of documentation
and the order of their display.
This also applies to HTML searches, which now give results in all
of help pages, vignettes and demos.
\item \code{socketConnection()} now has a \code{timeout} argument.
It is now documented that large values (package \CRANpkg{snow} used a
year) do not work on some OSes.
\item The initialization of the random-number generator now uses
the process ID as well as the current time, just in case two \R
processes are launched very rapidly on a machine with
low-resolution wall clock (some have a resolution of a second;
modern systems have microsecond-level resolution).
\item New function \code{pskill()} in the \pkg{tools} package to
send a terminate signal to one or more processes, plus constants
such as \code{SIGTERM} to provide a portable way to refer to
signals (since the numeric values are OS-dependent).
\item New function \code{psnice()} in the \pkg{tools} package to
return or change the \sQuote{niceness} of a process. (Refers to
the \sQuote{priority class} on Windows.)
\item \code{list.dirs()} gains a \code{recursive} argument.
\item An \samp{Authors@R} field in a package \file{DESCRIPTION}
file can now be used to generate \samp{Author} and
\samp{Maintainer} fields if needed, and to auto-generate package
\item New utility \code{getElement()} for accessing either a list
component or a slot in an S4 object.
\item \code{stars()} gains a \code{col.lines} argument, thanks to
Dustin Sallings. (Wish of \PR{14657}.)
\item New function \code{regmatches()} for extracting or replacing
matched or non-matched substrings from match data obtained by
\code{regexpr()}, \code{gregexpr()} and \code{regexec()}.
\item \code{help(package = "pkg_name", help_type = "HTML")} now
gives HTML help on the package rather than text help. (This gives
direct access to the HTML version of the package manual shown
\emph{via} \code{help.start()}'s \sQuote{Packages} menu.)
\item \code{agrep()} gains a \code{fixed} argument to optionally
allow approximate regular expression matching, and a \code{costs}
argument to specify possibly different integer match costs for
insertions, deletions and substitutions.
\item \code{read.dcf()} and \code{write.dcf()} gain a
\code{keep.white} argument to indicate fields where whitespace
should be kept as is.
\item \code{available.packages()} now works around servers that
fail to return an error code when \file{PACKAGES.gz} does not
exist. (Patch submitted by Seth Schommer.)
\item \code{readBin()} can now read more than
\eqn{2^{31}-1}{2^31 - 1} bytes in a single call (the previously
documented limitation).
\item New function \code{regexec()} for finding the positions of
matches as well as all substrings corresponding to parenthesized
subexpressions of the given regular expression.
\item New function \code{adist()} in package \pkg{utils} for
computing \sQuote{edit} (generalized Levenshtein) distances between
\item Class \code{"raster"} gains an \code{} method to avoid
confusion from the misuse of the matrix method (such as \PR{14618}).
\item The \code{identical()} function gains an
\code{ignore.bytecode} argument to control comparison of
compiled functions.
\item \code{pmin} and \code{pmax} now warn if an argument is
partially recycled (wish of \PR{14638}).
\item The default for \code{image(useRaster=)} is now taken from
option \code{"preferRaster"}: for the small print see \code{?image}.
\item \code{str()} now displays reference class objects and their
fields, rather than treating them as classical S4 classes.
\item New function \code{aregexec()} in package \pkg{utils} for
finding the positions of approximate string matches as well as all
substrings corresponding to parenthesized subexpressions of the
given regular expression.
\item \code{download.file()} has an \code{extra} argument to pass
additional command-line options to the non-default methods using
command-line utilities.
\code{cacheOK = FALSE} is now supported for \code{method = "curl"}.
\item \code{interaction.plot(*, type = .)} now also allows type
\code{"o"} or \code{"c"}.
\item \code{axTicks(*, log=TRUE)} did sometimes give more values
than the ticks in the corresponding \code{graphics::axis()}. By
default, it now makes use of the new (\pkg{graphics}-package
independent) \code{axisTicks()} which can make use of a new
utility \code{.axisPars()}. Further, it now returns a decreasing
sequence (as for \code{log=FALSE}) when \code{usr} is decreasing.
\item Using \code{fix()} or \code{edit()} on a \R{} object (except
perhaps a matrix or data frame) writes its temporary file with
extension \file{.R} so editors which select their mode based on
the extension will select a suitable mode.
\subsection{GRAPHICS DEVICES}{
\item The \code{pdf()} device makes use of Flate compression: this
is controlled by the new logical argument \code{compress}, and is
enabled by default.
\item Devices \code{svg()}, \code{cairo_pdf()} and
\code{cairo_ps()} gain a \code{family} argument.
On a Unix-alike \code{X11()} gains a \code{family} argument. This
is one of the \code{x11.options()} and so can be passed as an
argument to the \code{bmp()}, \code{jpeg()}, \code{png()} and
\code{tiff()} devices.
Analogous changes have been made on Windows, so all built-in \R
graphics devices now have a \code{family} argument except
\code{pictex()} (which has no means to change fonts).
\item The \code{bmp()}, \code{jpeg()}, \code{png()} and \code{tiff()}
devices now make use of the \code{antialias} argument for
\code{type = "quartz"}.
\item There are several new built-in font mappings for
\code{X11(type = "Xlib")}: see the help on \code{X11Fonts()}.
\item There is a new type \code{X11(type = "dbcairo")} which
updates the screen less frequently: see its help page.
\item The \code{X11()} device now makes use of cursors to
distinguish its states. The normal cursor is an arrow (rather
than a crosshair); the crosshair is used when the locator is in
use, and a watch cursor is shown when plotting computations are
being done. (These are the standard names for X11 cursors: how
they are actually displayed depends on the window manager.)
\item New functions \code{dev.hold()} and \code{dev.flush()} for
use with graphics devices with buffering. These are used for most
of the high-level graphics functions such as \code{boxplot()}, so
that the plot is only displayed when the page is complete.
Currently implemented for \code{windows(buffered = TRUE)},
\code{quartz()} and the cairographics-based \code{X11()} types
with buffering (which are the default on-screen devices).
\item New function \code{dev.capture()} for capture of bitmap
snapshots of image-based devices (a superset of the functionality
provided by \code{grid.cap()} in \code{grid}).
\item The default \code{colormodel} for \code{pdf()} and
\code{postscript()} is now called \code{"srgb"} to more accurately
describe it. (Instead of \code{"rgb"}, and in the case of
\code{postscript()} it no longer switches to and from the gray
colorspace, by default.)
The \code{colormodel} for \code{postscript()} which does use both
gray and sRGB colorspaces is now called \code{"srgb+gray"}.
Plots which are known to use only black/white/transparent can
advantageously use \code{colormodel = "gray"} (just as before, but
there is now slightly more advantage in doing so).
\item \code{postscript()} with values \code{colormodel = "rgb"} and
\code{colormodel = "rgb-nogray"} give the behaviour prior to \R
2.13.0 of uncalibrated RGB, which under some circumstances can be
rendered much faster by a viewer.
\code{pdf(colormodel = "rgb")} gives the behaviour prior to \R
2.13.0 of uncalibrated RGB, which under some circumstances can be
rendered faster by a viewer, and the files will be smaller (by
about 9KB if compression is not used).
\item The \code{postscript()} device only includes the definition
of the sRGB colorspace in the output file for the colormodels
which use it.
\item The \code{postscript()} and \code{pdf()} devices now output
greyscale raster images (and not RGB) when \code{colormodel = "gray"}.
\item \code{postscript(colormodel = "gray")} now accepts non-grey
colours and uses their luminance (as \code{pdf()} long has).
\item \code{colormodel = "grey"} is allowed as an alternative name
for \code{postscript()} and \code{pdf()}.
\item \code{pdf()} in the default sRGB colorspace outputs many
fewer changes of colorspace, which may speed up rendering in some
viewing applications.
\item There is a new function \code{dev.capabilities()} to query
the capabilities of the current device. The initial set of
capabilities are support for semi-transparent colours, rendering
and capturing raster images, the locator and for interactive
\item For \code{pdf()}, \code{maxRasters} is increased as needed
so the argument is no longer used.
\subsection{SWEAVE & VIGNETTES}{
\item Options \code{keep.source = TRUE, figs.only = FALSE}
are now the default.
\item The way the type of user-defined options is determined has
changed. Previously they were all regarded as logical: now the
type is determined by the value given at first use.
\item The allowed values of logical options are now precisely
those allowed for character inputs to \code{as.logical()}: this
means that \samp{t} and \samp{f} are no longer allowed (although
\code{T} and \code{F} still are).
\item The preferred location for vignette sources is now the
directory \file{vignettes} and not \file{inst/doc}: \command{R CMD
build} will now re-build vignettes in directory \file{vignettes}
and copy the \file{.Rnw} (etc) files and the corresponding PDFs to
\file{inst/doc}. Further files to be copied to \file{inst/doc}
can be specified \emph{via} the file
\item \command{R CMD Sweave} now supports a \option{--driver}
option to select the Sweave driver: the default is equivalent to
\item \command{R CMD Sweave} and \command{R CMD Stangle} support
options \option{--encoding} and \option{--options}.
\item The \code{Rtangle()} driver allows \code{output = "stdout"}
or \code{output = "stderr"} to select the output or message
connection. This is convenient for scripting using something like
\preformatted{ R CMD Stangle --options='output="stdout"' foo.Rnw > foo2.R}
\item There is a new option \code{pdf.compress} controlling
whether PDF figures are generated using Flate compression (they
are by default).
\item \command{R CMD Sweave} now has a \option{--pdf} option to
produce a PDF version of the processed Sweave document.
\item It is no longer allowed to have two vignettes with the
same vignette basename (e.g. \file{vig.Rnw} and \file{vig.Snw}).
(Previously one vignette hid the other in the \code{vignette()}
\subsection{C-LEVEL FACILITIES}{
\item Function \code{R_tmpnam2} has been added to the API to allow
a temporary filename to include a specified extension.
\item Package \file{DESCRIPTION} file field \samp{KeepSource}
forces the package to be installed with \code{keep.source =
TRUE} (or \code{FALSE}). (Suggestion of Greg Snow. Note that
as all packages are lazy-loaded, this is now only relevant at
There are corresponding options \option{--with-keep.source} and
\option{--without-keep.source} for \command{R CMD INSTALL}.
\item \command{R CMD INSTALL} has a new option
\option{--byte-compile} to byte-compile the packages during
installation (since all packages are now lazy-loaded). This can
be controlled on a per-package basis by the optional field
\samp{ByteCompile} in the \file{DESCRIPTION} file.
\item A package \R code but without a \file{NAMESPACE} file will
have a default one created at \command{R CMD build} or \command{R
CMD INSTALL} time, so all packages will be installed with
namespaces. A consequence of this is that \code{.First.lib()}
functions need to be copied to \code{.onLoad()} (usually) or
\code{.onAttach()}. For the time being, if there is an
auto-generated \file{NAMESPACE} file and no \code{.onLoad()} nor
\code{.onAttach()} function is found but \code{.First.lib()} is,
it will be run as the attach hook (unless the package is one of a
list of known exceptions, when it will be run as the load hook).
\item A warning is given if test-loading a package changes a
locked binding in a package other than itself. It is likely that
this will be disallowed in future releases. (There are \emph{pro
tem} some exceptions to the warning.)
\item A dependency on SVN revision is allowed for \code{R},
e.g. \code{R (>= r56550)}. This should be used in conjunction with a
version number, e.g. \code{R (>= 2.14.0), R (>= r56550)} to
distinguish between R-patched and R-devel versions with the same
SVN revision.
\item \code{installed.packages()} now hashes the names of its
cache files to avoid very rare problems with excessively long path
names. (\PR{14669})
\item A top-level \file{COPYING} file in a package is no longer
installed (file names \file{LICENSE} or \file{LICENCE} having long
been preferred).
\item \command{R CMD check} now gives an error if the \R code in a
vignette fails to run, unless this is caused by a missing package.
\item \command{R CMD check} now unpacks tarballs in the same way
as \command{R CMD INSTALL}, including making use of the
environment variable \env{R_INSTALL_TAR} to override the default
\item \command{R CMD check} performs additional code analysis of
package startup functions, and notifies about incorrect argument
lists and (incorrect) calls to functions which modify the search
path or inappropriately generate messages.
\item \command{R CMD check} now also checks compiled code for
symbols corresponding to functions which might terminate \R or
write to \file{stdout}/\file{stderr} instead of the console.
\item \command{R CMD check} now uses a \code{pdf()} device when
checking examples (rather than \code{postscript()}).
\item \command{R CMD check} now checks line-endings of makefiles
and C/C++/Fortran sources in subdirectories of \file{src} as well
as in \file{src} itself.
\item \command{R CMD check} now reports as a NOTE what look like
methods documented with their full names even if there is a
namespace and they are exported. In almost all cases they are
intended to be used only as methods and should use the
\samp{\\method} markup. In the other rare cases the recommended
form is to use a function such as \code{coefHclust} which would
not get confused with a method, document that and register it in
the \file{NAMESPACE} file by \code{s3method(coef, hclust,
\item The default for the environment variable
\env{_R_CHECK_COMPACT_DATA2_} is now true: thus if using the newer
forms of compression introduced in \R 2.10.0 would be beneficial
is now checked (by default).
\item Reference output for a vignette can be supplied when
checking a package by \command{R CMD check}: see \sQuote{Writing R
\item \command{R CMD Rd2dvi} allows the use of LaTeX package
\samp{inputenx} rather than \samp{inputenc}: the value of the
environment variable \env{RD2DVI_INPUTENC} is used. (LaTeX package
\samp{inputenx} is an optional install which provides greater
coverage of the UTF-8 encoding.)
\item \command{Rscript} on a Unix-alike now accepts file names
containing spaces (provided these are escaped or quoted in the
\item \command{R CMD build} on a Unix-alike (only) now tries to
preserve dates on files it copies from its input directory. (This
was the undocumented behaviour prior to \R 2.13.0.)