Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

6320 lines (4873 sloc) 275.487 kb
\newcommand{\PR}{\Sexpr[results=rd]{tools:::Rd_expr_PR(#1)}}
\newcommand{\Rlogo}{\if{html}{\figure{../../html/logo.jpg}}\if{latex}{\figure{logo.jpg}{options: width=0.5in}}}
\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\name{NEWS}
\title{ R News}
\encoding{UTF-8}
\section{\Rlogo CHANGES IN R VERSION 2.15.1}{
\subsection{NEW FEATURES}{
\itemize{
\item \code{source()} now uses \code{withVisible()} rather than
\code{.Internal(eval.with.vis)}. This sometimes alters tracebacks
slightly.
\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
completeness.
\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
flat.
\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 \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
1.2.7.
\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
\code{?options}.)
\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.
}
}
\subsection{PERFORMANCE IMPROVEMENTS}{
\itemize{
\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{lm.fit()}, \code{lm.wfit()}, \code{glm.fit()} 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
\code{attributes()}.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\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).
}
}
\subsection{UTILITIES}{
\itemize{
\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.
}
}
\subsection{INSTALLATION}{
\itemize{
\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}{
\itemize{
\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.
}
}
\subsection{WINDOWS-SPECIFIC CHANGES}{
\itemize{
\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
ignored.
}
}
\subsection{BUG FIXES}{
\itemize{
\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{seq.int(1:50, 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
hangs.
\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
elsewhere.)
\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"}.
(\PR{14925})
\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.
(\PR{14931})
\item The string \code{"infinity"} allowed by C99 was not accepted
as a numerical string value by e.g. \code{scan()} and
\code{as.character()}. (\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 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
\code{NaN}.
\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})
}
}
}
\section{\Rlogo CHANGES IN R VERSION 2.15.0}{
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\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}{
\itemize{
\item Environment variable \env{RD2DVI_INPUTENC} has been renamed
to \env{RD2PDF_INPUTENC}.
\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
object.
\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,
\url{https://stat.ethz.ch/pipermail/r-devel/2011-November/062586.html}.
\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
\PR{14770}.)
\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.)
% https://stat.ethz.ch/pipermail/r-devel/2011-September/062113.html
\item For consistency, circles with zero radius are omitted by
\code{points()} and \code{grid.circle()}. 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
matrices.
\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
\PR{14818}.)
\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
exported.
\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
region.
\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
line.
\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}{
\itemize{
\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).
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\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
2.12.0.]
\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
\option{--no-test-load}.
}
}
\subsection{UTILITIES}{
\itemize{
\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
Windows).
\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.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\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.
}
}
\subsection{INSTALLATION}{
\itemize{
\item Building with a positive value of
\option{--with-valgrind-instrumentation} now also instruments logical,
complex and raw vectors.
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\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}{
\itemize{
\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_}.
(\PR{14754})
\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
\PR{14786}).
\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.
(\PR{14827})
\item Virtual classes (e.g., class unions) had a \code{NULL}
prototype even if that was not a legal subclass. See
\code{?setClassUnion}.
\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}{
\itemize{
\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
executable.
\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.)
}
}
\subsection{UTILITIES}{
\itemize{
\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
checks.
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\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}{
\itemize{
\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.
(\PR{14769})
\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
Lennert.)
\item \code{predict.lm(*, type="terms", terms=*, se.fit=TRUE)} 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
handlers.
\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}{
\itemize{
\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
\code{print()}).
\item \code{filled.contour()} now accepts infinite values:
previously it might have generated invalid graphics files
(e.g. containing NaN values).
}
}
\subsection{INSTALLATION}{
\itemize{
\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
systems.
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).
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\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).
}
}
\subsection{UTILITIES}{
\itemize{
\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}{
\itemize{
\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.
(\PR{14727})
\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
Horner.)
\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
would.
\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.
(\PR{14753})
\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}{
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\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
pages).
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
\pkg{parallel}).
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}{
\itemize{
\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
\R).
\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
instead).
\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
\code{"summary.glm"}.
\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
programming.
\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
code).
\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{file.info()} 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{Sys.info()} 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"}
attribute.
\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
\code{points()}.
\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
server.
\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{http://developer.r-project.org/TechDocs}{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{help.search()} and \code{??} can now display
vignettes and demos as well as help pages. The new option
\code{"help.search.types"} 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
citations.
\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
strings.
\item Class \code{"raster"} gains an \code{is.na} 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}{
\itemize{
\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
events.
\item For \code{pdf()}, \code{maxRasters} is increased as needed
so the argument is no longer used.
}
}
\subsection{SWEAVE & VIGNETTES}{
\itemize{
\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
\file{vignettes/.install_extras}.
\item \command{R CMD Sweave} now supports a \option{--driver}
option to select the Sweave driver: the default is equivalent to
\option{--driver=RweaveLatex}.
\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()}
function.)
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item Function \code{R_tmpnam2} has been added to the API to allow
a temporary filename to include a specified extension.
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\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
installation.)
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).
}
}
\subsection{UTILITIES}{
\itemize{
\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
behaviour.
\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,
coefHclust)}.
\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
Extensions}.
\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
shell).
\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.)
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item \code{require()} no longer has a \code{save} argument.
\item The \code{gamma} argument to \code{hsv()},
\code{rainbow()}, and \code{rgb2hsv()} has been removed.
\item The \option{--no-docs} option for
\command{R CMD build --binary} is defunct: use
\option{--install-args} instead.
\item The option \option{--unsafe} to \command{R CMD INSTALL} is
defunct: use the identical option \option{--no-lock} instead.
\item The entry point \code{pythag} formerly in \file{Rmath.h} is
defunct: use instead the C99 function \code{hypot}.
\item \command{R CMD build --binary} is formally defunct:
\command{R CMD INSTALL --build} has long been the preferred
alternative.
\item \command{zip.file.extract()} is now defunct: use
\code{unzip()} or \code{unz()} instead.
\item \command{R CMD Rd2dvi} without the \option{--pdf} option is
now deprecated: only PDF output will be supported in future
releases (since this allows the use of fonts only supported for
PDF), and only \command{R CMD Rd2pdf} will be available.
\item Options such as \option{--max-nsize} and the function
\code{mem.limits()} are now deprecated: these limits are nowadays
almost never used, and are reported by \code{gc()} when they are
in use.
\item Forms like \code{binomial(link = "link")} for GLM families
deprecated since \R 2.4.0 are now defunct.
\item The \code{declarativeOnly} argument to
\code{loadNamespace()} (not relevant since \R 2.13.0) has been
removed.
\item Use of \code{library.dynam()} without specifying all the
first three arguments is deprecated. (It is often called from a
namespace, and the defaults are only appropriate to a package.)
Use of \code{chname} in \code{library.dynam()} with the extension
\file{.so} or \code{.dll} (which is clearly not allowed according
to the help page) is deprecated. This also applies to
\code{library.dynam.unload()} and \code{useDynLib} directives in
\file{NAMESPACE} files.
%% should become defunct not earlier than end of summer 2013!
\item It is deprecated to use \code{mean(x)} and \code{sd(x)}
directly on data frames (or also matrices, for \code{sd})
\code{x}, instead of simply using \code{sapply}.
In the same spirit, \code{median(x)} now gives an error for a data
frame \code{x} (it often gave nonsensical results).
\item The \code{keep.source} argument to \code{library()} and
\code{require()} is deprecated: it was only used for packages
installed without lazy-loading, and now all packages are
lazy-loaded.
\item Using a false value for the \file{DESCRIPTION} field
\samp{LazyLoad} is deprecated.
}
}
\subsection{INSTALLATION}{
\itemize{
\item The base and recommended packages are now byte-compiled
(equivalent to \command{make bytecode} in \R 2.13.x).
\item Configure option \option{--with-system-zlib} now only makes
use of the basic interface of \code{zlib} and not the
C function \samp{gzseek} which has shown erroneous behaviour in
\code{zlib} 1.2.4 and 1.2.5.
\item The \code{zlib} in the R sources is now version 1.2.5.
(This is safe even on 32-bit Linux systems because only the basic
interface is now used.)
\item The \file{.afm} files in package \pkg{grDevices} are now
installed as compressed files (as long done on Windows), saving ca
2MB on the installed size.
\item The non-screen cairo-based devices are no longer in the X11
module and so can be installed without X11. (We have never seen a
Unix-alike system with cairographics installed but not X11, but a
user might select \option{--without-x}.)
\item Configure will try to use \option{-fobjc-exceptions} for the
Objective-C compiler (if present) to ensure that even compilers
that do not enable exceptions by default (such as vanilla gcc) can
be used. (Objective-C is currently only used on Mac OS X.)
\item The system call \code{times} is required.
\item The C99 functions \code{acosh}, \code{asinh}, \code{atanh},
\code{snprintf} and \code{vsnprintf} are now required.
\item There is no longer support for making DVI manuals \emph{via}
\command{make dvi}, \command{make install-dvi} and similar. Only
PDF manuals are supported (to allow the use of fonts which are
only available for PDF.)
\item The \file{configure} arguments used during configuration of
\R are included as a comment in \file{Makeconf} for informative
purposes on Unix-alikes in a form suitable for shell execution.
Note that those are merely command-line arguments, they do not
include environment variables (one more reason to use configure
variables instead) or site configuration settings.
\item Framework installation now supports \code{DESTDIR}
(Mac OS X only).
\item Java detection (\code{R CMD javareconf}) works around bogus
\code{java.library.path} property in recent Oracle Java binaries.
}
}
\subsection{BUG FIXES}{
\itemize{
\item The locale category \samp{LC_MONETARY} was only being set on
startup on Windows: that is now done on Unix-alikes where
supported.
\item Reference class utilities will detect an attempt to modify
methods or fields in a locked class definition (e.g., in a
namespace) and generate an error.
\item The formula methods for \code{lines()}, \code{points()} and
\code{text()} now work even if package \pkg{stats} is not on the
search path.
\item In principle, S4 classes from different packages could
have the same name. This has not previously worked. Changes
have now been installed that should allow such classes and
permit methods to use them. New functions \code{className()}
and \code{multipleClasses()} are related tools for programming.
\item Work around an issue in Linux (a system \code{select} call
resetting \code{tv}) which prevented internet operations from
timing out properly.
\item Several stack trampling and overflow issues have been fixed
in TRE, triggered by \code{agrep} and friends with long patterns.
(\PR{14627})
\item (\dQuote{design infelicity}) Field assignments in reference
classes are now consistent with slots in S4 classes: the
assigned value must come from the declared class (if any) for the field
or from a subclass.
\item The methods objects constructed for \code{"coerce"} and
\code{"coerce<-"} were lacking some essential information in the
\code{generic}, \code{defined} and \code{target} slots;
\code{as()} did not handle duplicate class definitions correctly.
\item The parser no longer accepts the digit \code{8} in an octal
character code in a string, nor does it accept unterminated
strings in a file. (Reported by Bill Dunlap.)
\item The \code{print()} method for class \code{"summary.aov"} did
not pass on argument \code{digits} when \code{summary()} was
called on a single object, and hence used more digits than
documented.
\item The \code{X11()} device's cairo back-end produced incorrect
capture snapshot images on big-endian machines.
\item \code{loglin()} gave a spurious error when argument
\code{margin} consisted of a single element of length one.
(\PR{14690})
\item \code{loess()} is better protected against misuse,
e.g. zero-length \code{span}. (\PR{14691})
\item \code{HoltWinters()} checks that the optimization
succeeded. (\PR{14694})
\item The (undocumented) inclusion of superclass objects in
default initializing of reference classes overwrote explicit
field arguments. The bug is fixed, the feature documented and a
test added.
\item \code{round(x, -Inf)} now does something sensible (return
zero rather than \code{NA}).
\item \code{signif(x, -Inf)} now behaves as documented
(\code{signif(x, 1)}) rather than giving zero.
\item The \code{"table"} method for \code{Axis()} hardcoded
\code{side = 1}, hence calls to \code{plot(<vector>, <table>)}
labelled the wrong axis. (\PR{14699})
\item Creating a connection might fail under \code{gctorture(TRUE)}.
\item \code{stack()} and \code{unstack()} converted character
columns to factors.
\code{unstack()} sometimes produced incorrect results (a list or a
vector) if the factor on which to un-split had only one level.
\item On some systems \code{help(".C", help_type = "pdf")} and
similar generated file names that TeX was unable to handle.
\item Non-blocking listening socket connections continued to
report \code{isIncomplete()} as true even when the peer had closed
down and all available input had been read.
\item The revised HTML search system now generates better
hyperlinks to help topics found: previously it gave problems with
help pages with names containing e.g. spaces and slashes.
\item A late change in \R 2.13.2 broke \samp{\Sexpr} expressions
in Rd files.
\item The creation of ticks on log axes (including by
\code{axTicks()}) sometimes incorrectly omitted a tick at one end
of the range by rounding error in a platform-dependent way. This
could be seen in the examples for \code{axTicks()}, where with
axis limits \code{c(0.2, 88)} the tick for \code{0.2} was
sometimes omitted.
\item \code{qgamma()} for small \code{shape} underflows to
\code{0} rather than sometimes giving \code{NaN}.
(\PR{8528}, \PR{14710})
\item \code{mapply()} now gives an explicit error message (rather
than an obscure one) if inputs of zero and positive length are
mixed.
\item Setting a Hershey font family followed by string height
query would crash R.
\item \code{R CMD javareconf -e} would fail for some shells due to
a shift error. Also the resulting paths will no longer contain
\code{$(JAVA_HOME)} as that can result in an unintended
substitution based on \file{Makeconf} instead of the shell
setting.
}
}
}
\section{\Rlogo CHANGES IN R VERSION 2.13.2}{
\subsection{NEW FEATURES}{
\itemize{
\item \code{mem.limits()} now reports values larger than the
maximum integer (previously documented to be reported as
\code{NA}), and allows larger values to be set, including
\code{Inf} to remove the limit.
\item The \code{print()} methods for classes \code{"Date"},
\code{"POSIXct"} and \code{"POSIXlt"} respect the option
\code{"max.print"} and so are much faster for very long datetime
vectors. (Suggestion of Yohan Chalabi.)
\item \code{untar2()} now works around errors generated with
\code{tar} files that use more than the standard 6 digits for the
checksum. (\PR{14654})
\item \code{install.packages()} with \code{Ncpus > 1} guards
against simultaneous installation of indirect dependencies as well
as direct ones.
\item Sweave now knows about a few more Windows' encodings
(including \code{cp1250} and \code{cp1257}) and some
\code{inputenx} encodings such as \code{koi8-r}.
\item \code{postscript(colormodel = "rgb-nogray")} no longer sets
the sRGB colorspace for each colour and so some viewers may render
its files much faster than the default \code{colormodel ="rgb"}.
\item The default for \code{pdf(maxRasters=)} has been increased
from 64 to 1000.
\item \code{readBin()} now warns if \code{signed = FALSE} is used
inappropriately (rather than being silently ignored).
It enforces the documented limit of \eqn{2^{31}-1}{2^31-1} bytes
in a single call.
\item PCRE has been updated to version 8.13, a bug-fix release
with updated Unicode tables (version 6.0.0). An additional patch
(r611 from PCRE 8.20-to-be) has been added to fix a collation
symbol recognition issue.
}
}
\subsection{INSTALLATION}{
\itemize{
\item It is possible to build in \file{src/extra/xdr} on more
platforms. (Needed since glibc 2.14 hides its RPC implementation.)
\item \command{configure} will find the Sun TI-RPC implementation
of xdr (in \file{libtirpc}) provided its header files are in the
search path: see the \sQuote{R Installation and Administration
Manual}.
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\item Using a broad \code{exportPattern} directive in a
\file{NAMESPACE} file is no longer allowed to export internal
objects such as \code{.onLoad} and \code{.__S3MethodsTable__.} .
These are also excluded from imports, along with \code{.First.lib}.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{fisher.test()} had a buglet: If arguments were factors
with unused levels, levels were dropped and you would get an error
saying that there should be at least two levels, inconsistently
with pre-tabulated data. (Reported by Michael Fay).
\item \code{package.skeleton()} will no longer dump S4 objects
supplied directly rather than in a code file. These cannot be
restored correctly from the dumped version.
\item Build-time expressions in help files did not have access
to functions in the package being built (with \command{R CMD build}).
\item Because \code{quote()} did not mark its result as being in
use, modification of the result could in some circumstances
modify the original call.
\item Plotting \code{pch = '.'} now guarantees at least a one-pixel
dot if \code{cex > 0}.
\item The very-rarely-used command-line option
\option{--max-vsize} was incorrectly interpreted as a number of
Vcells and not in bytes as documented. (Spotted by Christophe
Rhodes.)
\item The HTML generated by \code{Rd2HTML()} comes closer to
being standards compliant.
\item \code{filter(x, recursive = TRUE)} gave incorrect results on a
series containing \code{NA}s. (Spotted by Bill Dunlap.)
\item Profiling \code{stats::mle()} fits with a \code{fixed}
parameter was not supported. (\PR{14646})
\item \code{retracemem()} was still using positional matching.
(\PR{14650})
\item The \code{quantile} method for \code{"ecdf"} objects now
works and is documented.
\item \code{xtabs(~ .., ..., sparse=TRUE)} now also works together
with an \code{exclude = ..} specification.
\item \code{decompose()} computed an incorrect seasonal component for
time series with odd frequencies.
\item The \code{pdf()} device only includes the definition of the
sRGB colorspace in the output file for the \code{"rgb"} colormodel
(and not for \code{"gray"} nor \code{"cmyk"}): this saves ca
9KB in the output file.
\item \code{.hasSlot()} wrongly gave \code{FALSE} in some cases.
\item \code{Sweave()} with \code{keep.source=TRUE} could generate
spurious \code{NA} lines when a chunk reference appeared last in
a code chunk.
\item \samp{\Sexpr[results=rd]} in an \file{.Rd} file now first tries
\code{parse_Rd(fragment=FALSE)} to allow Rd section-level macros
to be inserted.
\item The \code{print()} method for class \code{"summary.aov"} did
not pass on arguments such as \code{signif.stars} when
\code{summary()} was called on a single object. (\PR{14684})
\item In rare cases \code{ks.test()} could return a p-value
very slightly less than 0 by rounding error. (\PR{14671})
\item If \code{trunc()} was called on a \code{"POSIXlt"} vector
and the result was subsetted, all but the first element was
converted to \code{NA}. (\PR{14679})
\item \code{cbind()} and \code{rbind()} could cause memory
corruption when used on a combination of raw and logical/integer
vectors.
}
}
}
\section{\Rlogo CHANGES IN R VERSION 2.13.1}{
\subsection{NEW FEATURES}{
\itemize{
\item \code{iconv()} no longer translates \code{NA} strings as
\code{"NA"}.
\item \code{persp(box = TRUE)} now warns if the surface extends
outside the box (since occlusion for the box and axes is computed
assuming the box is a bounding box). (\PR{202})
\item \code{RShowDoc()} can now display the licences shipped with
\R, e.g. \code{RShowDoc("GPL-3")}.
\item New wrapper function \code{showNonASCIIfile()} in package
\pkg{tools}.
\item \code{nobs()} now has a \code{"mle"} method in package
\pkg{stats4}.
\item \code{trace()} now deals correctly with S4 reference classes
and corresponding reference methods (e.g., \code{$trace()})%$
have been added.
\item \command{xz} has been updated to 5.0.3 (very minor bugfix
release).
\item \code{tools::compactPDF()} gets more compression (usually a
little, sometimes a lot) by using the compressed object streams of
PDF 1.5.
\item \code{cairo_ps(onefile = TRUE)} generates encapsulated EPS
on platforms with cairo >= 1.6.
\item Binary reads (e.g. by \code{readChar()} and \code{readBin()})
are now supported on clipboard connections. (Wish of \PR{14593}.)
\item \code{as.POSIXlt.factor()} now passes \code{...} to the
character method (suggestion of Joshua Ulrich). [Intended for \R
2.13.0 but accidentally removed before release.]
\item \code{vector()} and its wrappers such as \code{integer()}
and \code{double()} now warn if called with a \code{length}
argument of more than one element. This helps track down user
errors such as calling \code{double(x)} instead of
\code{as.double(x)}.
}
}
\subsection{INSTALLATION}{
\itemize{
\item Building the vignette PDFs in packages \pkg{grid} and
\pkg{utils} is now part of running \command{make} from an SVN
checkout on a Unix-alike: a separate \command{make vignettes} step
is no longer required.
These vignettes are now made with \code{keep.source = TRUE} and
hence will be laid out differently.
\item \command{make install-strip} failed under some configuration
options.
\item Packages can customize non-standard installation of compiled
code via a \code{src/install.libs.R} script. This allows packages that
have architecture-specific binaries (beyond the package's shared
objects/DLLs) to be installed in a multi-architecture setting.
}
}
\subsection{SWEAVE & VIGNETTES}{
\itemize{
\item \code{Sweave()} and \code{Stangle()} gain an \code{encoding}
argument to specify the encoding of the vignette sources if the
latter do not contain a \samp{\\usepackage[]{inputenc}} statement
specifying a single input encoding.
\item There is a new Sweave option \code{figs.only = TRUE} to run
each figure chunk only for each selected graphics device, and not
first using the default graphics device. This will become the
default in \R 2.14.0.
\item Sweave custom graphics devices can have a custom function
\code{foo.off()} to shut them down.
\item Warnings are issued when non-portable filenames are found
for graphics files (and chunks if \code{split = TRUE}). Portable
names are regarded as alphanumeric plus hyphen, underscore, plus
and hash (periods cause problems with recognizing file
extensions).
\item The \code{Rtangle()} driver has a new option
\code{show.line.nos} which is by default false; if true it
annotates code chunks with a comment giving the line number of the
first line in the sources (the behaviour of \R >= 2.12.0).
\item Package installation tangles the vignette sources: this step
now converts the vignette sources from the vignette/package
encoding to the current encoding, and records the encoding (if not
ASCII) in a comment line at the top of the installed \file{.R}
file.
}
}
\subsection{LICENCE}{
\itemize{
\item No parts of \R are now licensed solely under GPL-2. The
licences for packages \CRANpkg{rpart} and \CRANpkg{survival} have been
changed, which means that the licence terms for \R as distributed
are GPL-2 | GPL-3.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item The internal functions \code{.readRDS()} and
\code{.saveRDS()} are now deprecated in favour of the public
functions \code{readRDS()} and \code{saveRDS()} introduced in \R
2.13.0.
\item Switching off lazy-loading of code \emph{via} the
\samp{LazyLoad} field of the \file{DESCRIPTION} file is now
deprecated. In future all packages will be lazy-loaded.
\item The off-line \code{help()} types \samp{"postscript"} and
\samp{"ps"} are deprecated.
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD check} on a multi-architecture installation now
skips the user's \file{.Renviron} file for the
architecture-specific tests (which do read the
architecture-specific \file{Renviron.site} files). This is
consistent with single-architecture checks, which use
\option{--no-environ}.
\item \command{R CMD build} now looks for \file{DESCRIPTION}
fields \samp{BuildResaveData} and \samp{BuildKeepEmpty} for
per-package overrides. See \sQuote{Writing R Extensions}.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{plot.lm(which = 5)} was intended to order factor
levels in increasing order of mean standardized residual. It
ordered the factor labels correctly, but could plot the wrong
group of residuals against the label. (\PR{14545})
\item \code{mosaicplot()} could clip the factor labels, and could
overlap them with the cells if a non-default value of
\code{cex.axis} was used. (Related to \PR{14550}.)
\item \code{dataframe[[row,col]]} now dispatches on \code{[[}
methods for the selected column. (Spotted by Bill Dunlap).
\item \code{sort.int()} would strip the class of an object, but
leave its object bit set. (Reported by Bill Dunlap.)
\item \code{pbirthday()} and \code{qbirthday()} did not implement
the algorithm exactly as given in their reference and so were
unnecessarily inaccurate.
\code{pbirthday()} now solves the approximate formula analytically
rather than using \code{uniroot()} on a discontinuous function.
The description of the problem was inaccurate: the probability is
a tail probability (\sQuote{2 \emph{or more} people share a birthday})
\item Complex arithmetic sometimes warned incorrectly about
producing NAs when there were NaNs in the input.
\item \code{seek(origin = "current")} incorrectly reported it was
not implemented for a \code{gzfile()} connection.
\item \code{c()}, \code{unlist()}, \code{cbind()} and
\code{rbind()} could silently overflow the maximum vector length
and cause a segfault. (\PR{14571})
\item The \code{fonts} argument to \code{X11(type = "Xlib")} was
being ignored.
\item Reading (e.g. with \code{readBin()}) from a raw connection
was not advancing the pointer, so successive reads would read the
same value. (Spotted by Bill Dunlap.)
\item Parsed text containing embedded newlines was printed
incorrectly by \code{as.character.srcref()}. (Reported by Hadley
Wickham.)
\item \code{decompose()} used with a series of a non-integer
number of periods returned a seasonal component shorter than the
original series. (Reported by Rob Hyndman.)
\item \code{fields = list()} failed for \code{setRefClass()}.
(Reported by Michael Lawrence.)
\item Reference classes could not redefine an inherited field
which had class \code{"ANY"}. (Reported by Janko Thyson.)
\item Methods that override previously loaded versions will now
be installed and called. (Reported by Iago Mosqueira.)
\item \code{addmargins()} called \code{numeric(apos)} rather than
\code{numeric(length(apos))}.
\item The HTML help search sometimes produced bad links.
(\PR{14608})
\item Command completion will no longer be broken if
\code{tail.default()} is redefined by the user. (Problem reported
by Henrik Bengtsson.)
\item LaTeX rendering of markup in titles of help pages has been
improved; in particular, \code{\\eqn{}} may be used there.
\item \code{isClass()} used its own namespace as the default of
the \code{where} argument inadvertently.
\item Rd conversion to latex mishandled multi-line titles
(including cases where there was a blank line in the \samp{\title}
section). (It seems this happened only in 2.13.0 patched.)
\item \code{postscript()} with an sRGB colormodel now uses sRGB
for raster images (in \R 2.13.[01] it used uncalibrated RGB).
There is no longer an undocumented 21845-pixel limit on raster images.
}
}
}
\section{\Rlogo CHANGES IN R VERSION 2.13.0}{
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\item \code{replicate()} (by default) and \code{vapply()} (always)
now return a higher-dimensional array instead of a matrix in the case
where the inner function value is an array of dimension >= 2.
\item Printing and formatting of floating point numbers is now
using the correct number of digits, where it previously rarely
differed by a few digits. (See \dQuote{scientific} entry below.)
This affects \emph{many} \file{*.Rout.save} checks in packages.
}
}
\subsection{NEW FEATURES}{
\itemize{
\item \code{normalizePath()} has been moved to the \pkg{base}
package (from \pkg{utils}): this is so it can be used by
\code{library()} and friends.
It now does tilde expansion.
It gains new arguments \code{winslash} (to select the separator on
Windows) and \code{mustWork} to control the action if a canonical
path cannot be found.
\item The previously barely documented limit of 256 bytes on a
symbol name has been raised to 10,000 bytes (a sanity check).
Long symbol names can sometimes occur when deparsing expressions
(for example, in \code{model.frame}).
\item \code{reformulate()} gains a \code{intercept} argument.
\item \code{cmdscale(add = FALSE)} now uses the more common
definition that there is a representation in \code{n-1} or less
dimensions, and only dimensions corresponding to positive
eigenvalues are used. (Avoids confusion such as \PR{14397}.)
\item Names used by \code{c()}, \code{unlist()}, \code{cbind()}
and \code{rbind()} are marked with an encoding when this can be
ascertained.
\item R colours are now defined to refer to the sRGB color space.
The PDF, PostScript, and Quartz graphics devices record this fact.
X11 (and cairo) and Windows just assume that your screen conforms.
\item \code{system.file()} gains a \code{mustWork} argument
(suggestion of Bill Dunlap).
\item \code{new.env(hash = TRUE)} is now the default.
\item \code{list2env(envir = NULL)} defaults to hashing (with a
suitably sized environment) for lists of more than 100 elements.
\item \code{text()} gains a formula method.
\item \code{IQR()} now has a \code{type} argument which is passed
to \code{quantile()}.
\item \code{as.vector()}, \code{as.double()} etc duplicate less
when they leave the mode unchanged but remove attributes.
\code{as.vector(mode = "any")} no longer duplicates when it does
not remove attributes. This helps memory usage in \code{matrix()}
and \code{array()}.
\code{matrix()} duplicates less if \code{data} is an atomic vector
with attributes such as names (but no class).
\code{dim(x) <- NULL} duplicates less if \code{x} has neither
dimensions nor names (since this operation removes names and
dimnames).
\item \code{setRepositories()} gains an \code{addURLs} argument.
\item \code{chisq.test()} now also returns a \code{stdres}
component, for standardized residuals (which have unit variance,
unlike the Pearson residuals).
\item \code{write.table()} and friends gain a \code{fileEncoding}
argument, to simplify writing files for use on other OSes (e.g. a
spreadsheet intended for Windows or Mac OS X Excel).
\item Assignment expressions of the form \code{foo::bar(x) <- y}
and \code{foo:::bar(x) <- y} now work; the replacement functions
used are \code{foo::`bar<-`} and \code{foo:::`bar<-`}.
\item \code{Sys.getenv()} gains a \code{names} argument so
\code{Sys.getenv(x, names = FALSE)} can replace the common idiom
of \code{as.vector(Sys.getenv())}. The default has been changed
to not name a length-one result.
\item Lazy loading of environments now preserves attributes and
locked status. (The locked status of bindings and active bindings
are still not preserved; this may be addressed in the future).
\item \code{options("install.lock")} may be set to \code{FALSE}
so that \code{install.packages()} defaults to \option{--no-lock}
installs, or (on Windows) to \code{TRUE} so that binary installs
implement locking.
\item \code{sort(partial = p)} for large \code{p} now tries
Shellsort if quicksort is not appropriate and so works for
non-numeric atomic vectors.
\item \code{sapply()} gets a new option \code{simplify = "array"}
which returns a \dQuote{higher rank} array instead of just a matrix
when \code{FUN()} returns a \code{dim()} length of two or more.
\code{replicate()} has this option set by default, and
\code{vapply()} now behaves that way internally.
\item \code{aperm()} becomes S3 generic and gets a \code{table}
method which preserves the class.
\item \code{merge()} and \code{as.hclust()} methods for objects of
class \code{"dendrogram"} are now provided.
\item The character method of \code{as.POSIXlt()} now tries to
find a format that works for all non-\code{NA} inputs, not just
the first one.
\item \code{str()} now has a method for class \code{"Date"}
analogous to that for class \code{"POSIXt"}.
\item New function \code{file.link()} to create hard links on
those file systems (POSIX, NTFS but not FAT) that support them.
\item New \code{Summary()} group method for class \code{"ordered"}
implements \code{min()}, \code{max()} and \code{range()} for
ordered factors.
\item \code{mostattributes<-()} now consults the \code{"dim"}
attribute and not the \code{dim()} function, making it more useful
for objects (such as data frames) from classes with methods for
\code{dim()}. It also uses \code{attr<-()} in preference to the
generics \code{name<-()}, \code{dim<-()} and \code{dimnames<-()}.
(Related to \PR{14469}.)
\item There is a new option \code{"browserNLdisabled"} to disable
the use of an empty (e.g. via the \sQuote{Return} key) as a synonym
for \code{c} in \code{browser()} or \code{n} under \code{debug()}.
(Wish of \PR{14472}.)
\item \code{example()} gains optional new arguments
\code{character.only} and \code{give.lines} enabling programmatic
exploration.
\item \code{serialize()} and \code{unserialize()} are no longer
described as \sQuote{experimental}. The interface is now regarded
as stable, although the serialization format may well change in
future releases. (\code{serialize()} has a new argument
\code{version} which would allow the current format to be written
if that happens.)
New functions \code{saveRDS()} and \code{readRDS()} are public
versions of the \sQuote{internal} functions \code{.saveRDS()} and
\code{.readRDS()} made available for general use. The dot-name
versions remain available as several package authors have made use
of them, despite the documentation. \code{readRDS()} no longer
wraps non-file connections in a call to \code{gzcon()}, for
efficiency (see its documentation).
\code{saveRDS()} supports \code{compress = "xz"}.
\item Many functions when called with a not-open connection will
now ensure that the connection is left not-open in the event of
error. These include \code{read.dcf()}, \code{dput()},
\code{dump()}, \code{load()}, \code{parse()}, \code{readBin()},
\code{readChar()}, \code{readLines()}, \code{save()},
\code{writeBin()}, \code{writeChar()}, \code{writeLines()},
\code{.readRDS()}, \code{.saveRDS()} and \code{tools::parse_Rd()},
as well as functions calling these.
\item Public functions \code{find.package()} and \code{path.package()}
replace the internal dot-name versions.
\item The default method for \code{terms()} now looks for a
\code{"terms"} attribute if it does not find a \code{"terms"}
component, and so works for model frames.
\item \code{httpd()} handlers receive an additional argument
containing the full request headers as a raw vector (this can be
used to parse cookies, multi-part forms etc.). The recommended
full signature for handlers is therefore \code{function(url,
query, body, headers, ...)}.
\item \code{file.edit()} gains a \code{fileEncoding} argument to
specify the encoding of the file(s).
\item The format of the HTML package listings has changed. If
there is more than one library tree , a table of links to
libraries is provided at the top and bottom of the page. Where a
library contains more than 100 packages, an alphabetic index is
given at the top of the section for that library. (As a
consequence, package names are now sorted case-insensitively
whatever the locale.)
\item \code{isSeekable()} now returns \code{FALSE} on connections
which have non-default \code{encoding}. Although documented to
record if \sQuote{in principle} the connection supports seeking,
it seems safer to report \code{FALSE} when it may not work.
\item \command{R CMD REMOVE} and \code{remove.packages()} now
remove file \code{R.css} when removing all remaining packages in a
library tree. (Related to the wish of \PR{14475}: note that this
file is no longer installed.)
\item \code{unzip()} now has a \code{unzip} argument like
\code{zip.file.extract()}. This allows an external
\command{unzip} program to be used, which can be useful to access
features supported by Info-ZIP's \command{unzip} version 6 which
is now becoming more widely available.
\item There is a simple \code{zip()} function, as wrapper for an
external \command{zip} command.
\item \code{bzfile()} connections can now read from concatenated
\command{bzip2} files (including files written with
\code{bzfile(open = "a")}) and files created by some other
compressors (such as the example of \PR{14479}).
\item The primitive function \code{c()} is now of type BUILTIN.
\item \code{plot(<dendrogram>, .., nodePar=*)} now obeys an optional
\code{xpd} specification (allowing clipping to be turned off
completely).
\item \code{nls(algorithm="port")} now shares more code with
\code{nlminb()}, and is more consistent with the other
\code{nls()} algorithms in its return value.
\item \command{xz} has been updated to 5.0.1 (very minor bugfix
release).
\item \code{image()} has gained a logical \code{useRaster}
argument allowing it to use a bitmap raster for plotting a
regular grid instead of polygons. This can be more efficient, but
may not be supported by all devices. The default is \code{FALSE}.
\item \code{list.files()}/\code{dir()} gains a new argument
\code{include.dirs()} to include directories in the listing when
\code{recursive = TRUE}.
\item New function \code{list.dirs()} lists all directories,
(even empty ones).
\item \code{file.copy()} now (by default) copies
read/write/execute permissions on files, moderated by the current
setting of \code{Sys.umask()}.
\item \code{Sys.umask()} now accepts \code{mode = NA} and returns
the current \code{umask} value (visibly) without changing it.
\item There is a \code{!} method for classes \code{"octmode"} and
\code{"hexmode"}: this allows \code{xor(a, b)} to work if both
\code{a} and \code{b} are from one of those classes.
\item \code{as.raster()} no longer fails for vectors or matrices
containing \code{NA}s.
\item New hook \code{"before.new.plot"} allows functions to be run
just before advancing the frame in \code{plot.new}, which is
potentially useful for custom figure layout implementations.
\item Package \pkg{tools} has a new function \code{compactPDF()}
to try to reduce the size of PDF files \emph{via} \command{qpdf}
or \command{gs}.
\item \code{tar()} has a new argument \code{extra_flags}.
\item \code{dotchart()} accepts more general objects \code{x} such
as 1D tables which can be coerced by \code{as.numeric()} to a
numeric vector, with a warning since that might not be
appropriate.
\item The previously internal function \code{create.post()} is now
exported from \pkg{utils}, and the documentation for
\code{bug.report()} and \code{help.request()} now refer to that
for \code{create.post()}.
It has a new \code{method = "mailto"} on Unix-alikes similar to
that on Windows: it invokes a default mailer via \command{open}
(Mac OS X) or \code{xdg-open} or the default browser (elsewhere).
The default for \code{ccaddress} is now
\code{getOption("ccaddress")} which is by default unset: using the
username as a mailing address nowadays rarely works as expected.
\item The default for \code{options("mailer")} is now
\code{"mailto"} on all platforms.
\item \code{unlink()} now does tilde-expansion (like most other
file functions).
\item \code{file.rename()} now allows vector arguments (of the
same length).
\item The \code{"glm"} method for \code{logLik()} now returns an
\code{"nobs"} attribute (which \code{stats4::BIC()} assumed it
did).
The \code{"nls"} method for \code{logLik()} gave incorrect results
for zero weights.
\item There is a new generic function \code{nobs()} in package
\pkg{stats}, to extract from model objects a suitable value for
use in BIC calculations. An S4 generic derived from it is defined
in package \pkg{stats4}.
\item Code for S4 reference-class methods is now examined for
possible errors in non-local assignments.
\item \code{findClasses}, \code{getGeneric}, \code{findMethods}
and \code{hasMethods} are revised to deal consistently with
the \code{package=} argument and be consistent with soft namespace
policy for finding objects.
\item \code{tools::Rdiff()} now has the option to return not only
the status but a character vector of observed differences (which
are still by default sent to \file{stdout}).
\item The startup environment variables \env{R_ENVIRON_USER},
\env{R_ENVIRON}, \env{R_PROFILE_USER} and \env{R_PROFILE} are now
treated more consistently. In all cases an empty value is
considered to be set and will stop the default being used, and for
the last two tilde expansion is performed on the file name. (Note
that setting an empty value is probably impossible on Windows.)
\item Using \command{R --no-environ CMD}, \command{R
--no-site-file CMD} or \command{R --no-init-file CMD} sets
environment variables so these settings are passed on to child \R
processes, notably those run by \code{INSTALL}, \code{check} and
\code{build}. \command{R --vanilla CMD} sets these three options
(but not \option{--no-restore}).
\item \code{smooth.spline()} is somewhat faster. With
\code{cv=NA} it allows some leverage computations to be skipped,
\item The internal (C) function \samp{scientific()}, at the heart
of \R's \code{format.info(x)}, \code{format(x)}, \code{print(x)},
etc, for numeric \code{x}, has been re-written in order to provide
slightly more correct results, fixing \PR{14491}, notably in
border cases including when \code{digits >= 16}, thanks to
substantial contributions (code and experiments) from Petr
Savicky. This affects a noticeable amount of numeric output from
\R.
\item A new function \code{grepRaw()} has been introduced for
finding subsets of raw vectors. It supports both literal searches
and regular expressions.
\item Package \pkg{compiler} is now provided as a standard
package. See \code{?compiler::compile} for information on how to
use the compiler. This package implements a byte code compiler
for \R: by default the compiler is not used in this release. See
the \sQuote{R Installation and Administration Manual} for how to
compile the base and recommended packages.
\item Providing an \code{exportPattern} directive in a NAMESPACE
file now causes classes to be exported according to the same
pattern, for example the default from \code{package.skeleton()}
to specify all names starting with a letter. An explicit
directive to \code{exportClassPattern} will still over-ride.
\item There is an additional marked encoding \code{"bytes"} for
character strings. This is intended to be used for non-ASCII
strings which should be treated as a set of bytes, and never
re-encoded as if they were in the encoding of the current locale:
\code{useBytes = TRUE} is automatically selected in functions such
as \code{writeBin()}, \code{writeLines()}, \code{grep()} and
\code{strsplit()}.
Only a few character operations are supported (such as \code{substr()}).
Printing, \code{format()} and \code{cat()} will represent non-ASCII
bytes in such strings by a \samp{\xab} escape.
\item The new function \code{removeSource()} removes the internally
stored source from a function.
\item \code{"srcref"} attributes now include two additional
line number values, recording the line numbers in the order they
were parsed.
\item New functions have been added for source reference access:
\code{getSrcFilename()}, \code{getSrcDirectory()},
\code{getSrcLocation()} and \code{getSrcref()}.
\item \code{Sys.chmod()} has an extra argument \code{use_umask}
which defaults to true and restricts the file mode by the current
setting of \code{umask}. This means that all the \R functions
which manipulate file/directory permissions by default respect
\code{umask}, notably \command{R CMD INSTALL}.
\item \code{tempfile()} has an extra argument \code{fileext} to
create a temporary filename with a specified extension.
(Suggestion and initial implementation by Dirk Eddelbuettel.)
There are improvements in the way \code{Sweave()} and
\code{Stangle()} handle non-ASCII vignette sources, especially in
a UTF-8 locale: see \sQuote{Writing R Extensions} which now has a
subsection on this topic.
\item \code{factanal()} now returns the rotation matrix if a
rotation such as \code{"promax"} is used, and hence factor
correlations are displayed. (Wish of \PR{12754}.)
\item The \code{gctorture2()} function provides a more refined
interface to the GC torture process. Environment variables
\env{R_GCTORTURE}, \env{R_GCTORTURE_WAIT}, and
\env{R_GCTORTURE_INHIBIT_RELEASE} can also be used to control the
GC torture process.
\item \code{file.copy(from, to)} no longer regards it as an error
to supply a zero-length \code{from}: it now simply does nothing.
\item \code{rstandard.glm()} gains a \code{type} argument which can
be used to request standardized Pearson residuals.
\item A start on a Turkish translation, thanks to Murat Alkan.
\item \code{.libPaths()} calls \code{normalizePath(winslash = "/")}
on the paths: this helps (usually) to present them in a
user-friendly form and should detect duplicate paths accessed via
different symbolic links.
\item \code{download.file()} can be now used with external methods
even if there are spaces in the URL or the target filename.
}
}
\subsection{SWEAVE CHANGES}{
\itemize{
\item \code{Sweave()} has options to produce PNG and JPEG figures,
and to use a custom function to open a graphics device (see
\code{?RweaveLatex}).\cr
(Based in part on the contribution of \PR{14418}.)
\item The default for \code{Sweave()} is to produce only PDF
figures (rather than both EPS and PDF).
\item Environment variable \env{SWEAVE_OPTIONS} can be used to
supply defaults for existing or new options to be applied after
the Sweave driver setup has been run.
\item The Sweave manual is now included as a vignette in the
\pkg{utils} package.
\item \code{Sweave()} handles \code{keep.source=TRUE} much better:
it could duplicate some lines and omit comments. (Reported by John
Maindonald and others.)
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item Because they use a C99 interface which a C++ compiler is not
required to support, \code{Rvprintf} and \code{REvprintf} are only
defined by \file{R_ext/Print.h} in C++ code if the macro
\code{R_USE_C99_IN_CXX} is defined when it is included.
\item \code{pythag} duplicated the C99 function \code{hypot}. It
is no longer provided, but is used as a substitute for \code{hypot}
in the very unlikely event that the latter is not available.
\item \code{R_inspect(obj)} and \code{R_inspect3(obj, deep, pvec)}
are (hidden) C-level entry points to the internal \code{inspect}
function and can be used for C-level debugging (e.g., in conjunction
with the \code{p} command in \code{gdb}).
\item Compiling R with \option{--enable-strict-barrier} now also
enables additional checking for use of unprotected objects. In
combination with \code{gctorture()} or \code{gctorture2()} and a
C-level debugger this can be useful for tracking down memory
protection issues.
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD Rdiff} is now implemented in \R on
Unix-alikes (as it has been on Windows since \R 2.12.0).
\item \command{R CMD build} no longer does any cleaning in the
supplied package directory: all the cleaning is done in the copy.
It has a new option \option{--install-args} to pass arguments to
\command{R CMD INSTALL} for \option{--build} (but not when
installing to rebuild vignettes).
There is new option, \option{--resave-data}, to call
\code{tools::resaveRdaFiles()} on the \file{data} directory, to
compress tabular files (\file{.tab}, \file{.csv} etc) and to
convert \file{.R} files to \file{.rda} files. The default,
\option{--resave-data=gzip}, is to do so in a way compatible even
with years-old versions of \R, but better compression is given by
\option{--resave-data=best}, requiring \R >= 2.10.0.
It now adds a \file{datalist} file for \file{data} directories of
more than 1Mb.
Patterns in \file{.Rbuildignore} are now also matched against all
directory names (including those of empty directories).
There is a new option, \option{--compact-vignettes}, to try
reducing the size of PDF files in the \file{inst/doc} directory.
Currently this tries \command{qpdf}: other options may be used in
future.
When re-building vignettes and a \file{inst/doc/Makefile} file is
found, \code{make clean} is run if the makefile has a
\code{clean:} target.
After re-building vignettes the default clean-up operation will
remove any directories (and not just files) created during the
process: e.g. one package created a \file{.R_cache} directory.
Empty directories are now removed unless the option
\option{--keep-empty-dirs} is given (and a few packages do
deliberately include empty directories).
If there is a field \code{BuildVignettes} in the package
\file{DESCRIPTION} file with a false value, re-building the
vignettes is skipped.
\item \command{R CMD check} now also checks for filenames that are
case-insensitive matches to Windows' reserved file names with
extensions, such as \file{nul.Rd}, as these have caused problems
on some Windows systems.
It checks for inefficiently saved \file{data/*.rda} and
\file{data/*.RData} files, and reports on those large than 100Kb.
A more complete check (including of the type of compression, but
potentially much slower) can be switched on by setting environment
variable \env{_R_CHECK_COMPACT_DATA2_} to \samp{TRUE}.
The types of files in the \file{data} directory are now checked,
as packages are \emph{still} misusing it for non-\R data files.
It now extracts and runs the \R code for each vignette in a
separate directory and \R process: this is done in the package's
declared encoding. Rather than call
\code{tools::checkVignettes()}, it calls
\code{tools::buildVignettes()} to see if the vignettes can be
re-built as they would be by \command{R CMD build}. Option
\option{--use-valgrind} now applies only to these runs, and not
when running code to rebuild the vignettes. This version does a
much better job of suppressing output from successful vignette
tests.
The \file{00check.log} file is a more complete record of what is
output to \file{stdout}: in particular contains more details of
the tests.
It now checks all syntactically valid Rd usage entries, and warns
about assignments (unless these give the usage of replacement
functions).
\file{.tar.xz} compressed tarballs are now allowed, if
\command{tar} supports them (and setting environment variable
\env{TAR} to \samp{internal} ensures so on all platforms).
\item \command{R CMD check} now warns if it finds
\file{inst/doc/makefile}, and \command{R CMD build} renames such a
file to \file{inst/doc/Makefile}.
}
}
\subsection{INSTALLATION}{
\itemize{
\item Installing \R no longer tries to find \command{perl}, and
\command{R CMD} no longer tries to substitute a full path for
\command{awk} nor \command{perl} -- this was a legacy from the
days when they were used by \R itself. Because a couple of
packages do use \command{awk}, it is set as the \command{make}
(rather than environment) variable \env{AWK}.
\item \command{make check} will now fail if there are differences
from the reference output when testing package examples and if
environment variable \env{R_STRICT_PACKAGE_CHECK} is set to a true
value.
\item The C99 double complex type is now required.
The C99 complex trigonometric functions (such as \samp{csin}) are
not currently required (FreeBSD lacks most of them): substitutes
are used if they are missing.
\item The C99 system call \samp{va_copy} is now required.
\item If environment variable \env{R_LD_LIBRARY_PATH} is set
during configuration (for example in \file{config.site}) it is
used unchanged in file \file{etc/ldpaths} rather than being
appended to.
\item \command{configure} looks for support for OpenMP and if
found compiles \R with appropriate flags and also makes them
available for use in packages: see \sQuote{Writing R Extensions}.
This is currently experimental, and is only used in \R with a
single thread for \code{colSums()} and \code{colMeans()}. Expect
it to be more widely used in later versions of \R.
This can be disabled by the \option{--disable-openmp} flag.
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\item \command{R CMD INSTALL --clean} now removes copies of a
\file{src} directory which are created when multiple
sub-architectures are in use. (Following a comment from
Berwin Turlach.)
\item File \file{R.css} is now installed on a per-package basis
(in the package's \file{html} directory) rather than in each
library tree, and this is used for all the HTML pages in the
package. This helps when installing packages with static HTML
pages for use on a webserver. It will also allow future versions
of \R to use different stylesheets for the packages they install.
\item A top-level file \file{.Rinstignore} in the package sources
can list (in the same way as \file{.Rbuildignore}) files under
\code{inst} that should not be installed. (Why should there be any
such files? Because all the files needed to re-build vignettes
need to be under \code{inst/doc}, but they may not need to be
installed.)
\item \command{R CMD INSTALL} has a new option
\option{--compact-docs} to compact any PDFs under the
\file{inst/doc} directory. Currently this uses \command{qpdf},
which must be installed (see \sQuote{Writing R Extensions}).
\item There is a new option \option{--lock} which can be used to
cancel the effect of \option{--no-lock} or \option{--pkglock} earlier
on the command line.
\item Option \option{--pkglock} can now be used with more than one
package, and is now the default if only one package is specified.
\item Argument \code{lock} of \code{install.packages()} can now be
use for Mac binary installs as well as for Windows ones. The
value \code{"pkglock"} is now accepted, as well as \code{TRUE} and
\code{FALSE} (the default).
\item There is a new option \option{--no-clean-on-error} for
\command{R CMD INSTALL} to retain a partially installed package for
forensic analysis.
\item Packages with names ending in \file{.} are not portable
since Windows does not work correctly with such directory names.
This is now warned about in \command{R CMD check}, and will not be
allowed in \R 2.14.x.
\item The vignette indices are more comprehensive (in the style of
\code{browseVignetttes()}).
}
}
\subsection{DEPRECATED & DEFUNCT}{
\itemize{
\item \code{require(save = TRUE)} is defunct, and use of the
\code{save} argument is deprecated.
\item \command{R CMD check --no-latex} is defunct: use
\option{--no-manual} instead.
\item \command{R CMD Sd2Rd} is defunct.
\item The \code{gamma} argument to \code{hsv()},
\code{rainbow()}, and \code{rgb2hsv()} is deprecated
and no longer has any effect.
\item The previous options for \command{R CMD build --binary}
(\option{--auto-zip}, \option{--use-zip-data} and
\option{--no-docs}) are deprecated (or defunct):
use the new option \option{--install-args} instead.
\item When a character value is used for the \code{EXPR}
argument in \code{switch()}, only a single unnamed alternative
value is now allowed.
\item The wrapper \code{utils::link.html.help()} is no longer
available.
\item Zip-ing data sets in packages (and hence \command{R CMD
INSTALL} options \option{--use-zip-data} and \option{--auto-zip}, as
well as the \samp{ZipData: yes} field in a \code{DESCRIPTION} file)
is defunct.
Installed packages with zip-ed data sets can still be used, but a
warning that they should be re-installed will be given.
\item The \sQuote{experimental} alternative specification of a
namespace via \code{.Export()} etc is now defunct.
\item The option \option{--unsafe} to \command{R CMD INSTALL} is
deprecated: use the identical option \option{--no-lock} instead.
\item The entry point \code{pythag} in \file{Rmath.h} is deprecated
in favour of the C99 function \code{hypot}. A wrapper for
\code{hypot} is provided for \R 2.13.x only.
\item Direct access to the \code{"source"} attribute of functions
is deprecated; use \code{deparse(fn, control="useSource")} to access
it, and \code{removeSource(fn)} to remove it.
\item \command{R CMD build --binary} is now formally deprecated:
\command{R CMD INSTALL --build} has long been the preferred
alternative.
\item Single-character package names are deprecated (and \pkg{R}
is already disallowed to avoid confusion in \samp{Depends:}
fields).
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{drop.terms} and the \code{[} method for class
\code{"terms"} no longer add back an intercept. (Reported by
Niels Hansen.)
\item \code{aggregate} preserves the class of a column (e.g. a
date) under some circumstances where it discarded the class
previously.
\item \code{p.adjust()} now always returns a vector result, as
documented. In previous versions it copied attributes (such as
dimensions) from the \code{p} argument: now it only copies names.
\item On PDF and PostScript devices, a line width of zero was
recorded verbatim and this caused problems for some viewers
(a very thin line combined with a non-solid line dash pattern
could also cause a problem). On these devices, the line width is
now limited at 0.01 and for very thin lines with complex dash
patterns the device may force the line dash pattern to be solid.
(Reported by Jari