R Portable Changelog

What's new in R Portable 4.2.0

Jun 1, 2022
  • SIGNIFICANT USER-VISIBLE CHANGES:
  • The formula method of aggregate() now matches the generic in naming its first argument x (resolving PR#18299 by Thomas Soeiro).
  • This means that calling aggregate() with a formula as a named first argument requires name formula in earlier versions of R and name x now, so portable code should not name the argument (code in many packages did).
  • Calling && or || with either argument of length greater than one now gives a warning (which it is intended will become an error).
  • Calling if() or while() with a condition of length greater than one gives an error rather than a warning. Consequently, environment variable R_CHECK_LENGTH_1_CONDITION no longer has any effect.
  • Windows users should consult the WINDOWS section below for some profound changes including
  • Support for 32-bit builds has been dropped.
  • UTF-8 locales are used where available.
  • The default locations for the R installation and personal library folder have been changed.
  • Thanks to Tomas Kalibera for months of work on the Windows port for this release.
  • NEW FEATURES:
  • matrix(x, n, m) now warns in more cases where length(x) differs from n * m, as suggested by Abby Spurdle and Wolfgang Huber in Feb 2021 on the R-devel mailing list.
  • This warning can be turned into an error by setting environment variable R_CHECK_MATRIX_DATA to TRUE: R CMD check --as-cran does so unless it is already set.
  • Function file_test() in package utils gains tests for symlinks, readability and writability.
  • capabilities("libxml") is now false.
  • The description of capabilities("http/ftp") now reflects that it refers to the default method, no longer the internal one.
  • simplify2array() gains an except argument for controlling the exceptions used by sapply().
  • Environment variables R_LIBS_USER and R_LIBS_SITE are both now set to the R system default if unset or empty, and can be set to NULL to indicate an empty list of user or site library directories.
  • The warning for axis()(-like) calls in cases of relatively small ranges (typically in log-scale situations) is slightly improved and suppressed from explicit calls to .axisPars() as has always been the intention.
  • The contrasts setter function contrasts<- gains an explicit default how.many = NULL rather than just using missing(how.many).
  • grid.pretty() gains a new optional argument n = 5.
  • There is a new function .pretty() with option bounds as a technical-utility version of pretty(). It and pretty() gain a new argument f.min with a better than back-compatible default.
  • Function grDevices::axisTicks() and related functions such as graphics::axis() work better, notably for the log scale; partly because of the pretty() improvements, but also because care is taken e.g., when ylim is finite but diff(ylim) is infinite.
  • nclass.FD() gains a digits option.
  • The R Mathlib internal C function bd0() (called indirectly from a dozen probability density and distribution functions such as dpois(), dbinom(), dgamma(), pgamma() etc) has been complemented by a more sophisticated and (mostly) more accurate C function ebd0(), currently called only by internal dpois_raw() improving accuracy for R level dpois() and potentially others calling it such as dnbinom(), dgamma() or pgamma(). (Thanks to Morten Welinder's PR#15628.)
  • write.ftable() gains sep = " " argument as suggested by Thomas Soeiro.
  • The names of the locale categories supported by R's Sys.getlocale() and Sys.setlocale() are now provided by variable .LC.categories in the base namespace.
  • The Date and POSIXt methods for hist() and the histogram method for plot() now also use the new default col = "lightgray" in consistency with the corresponding change to hist()'s default for R 4.0.0.
  • hist.default() gains new fuzz argument, and the histogram plot method no longer uses fractional axis ticks when displaying counts ("Frequency").
  • mapply() and hence Map() now also obey the "max-or-0-if-any" recycling rule, such that, e.g., Map(+, 1:3, 1[0]) is valid now.
  • as.character(<obj>) for "hexmode" or "octmode" objects now fulfils the important basic rule as.character(x)[j] === as.character(x[j]).
  • The set utility functions, notably intersect() have been tweaked to be more consistent and symmetric in their two set arguments, also preserving a common mode.
  • substr(ch, start,end) <- new now e.g., preserves names(ch); ditto for substring(), thanks to a patch from Brodie Gaslam.
  • plot(<lm>) gains a extend.ylim.f argument, in partial response to PR#15285; further PR#17784 is fixed thanks to several contributors and a patch by Elin Waring. The Cook's dist contours get customizable via cook.col and cook.lty with a different default color and their legend is nicer by default and customizable via cook.legendChanges.
  • Attempting to subset an object that is not subsettable now signals an error of class notSubsettableError. The non-subsettable object is contained in the object field of the error condition.
  • Subscript-out-of-bounds errors are now signaled as errors of class subscriptOutOfBoundsError.
  • Stack-overflow errors are now signaled as errors inheriting from class stackOverflowError. See ?stackOverflowError for more details.
  • New partly experimental Sys.setLanguage() utility, solving the main problem of PR#18055.
  • gettext() and gettextf() get a new option trim = TRUE which when set to false allows translations for strings such as "Execution haltedn" typical for C code.
  • An experimental implementation of hash tables is now available. See ?hashtab for more details.
  • identical() gains a extptr.as.ref argument for requesting that external pointer objects be compared as reference objects.
  • reorder() gets an argument decreasing which it passes to sort() for level creation; based on the wish and patch by Thomas Soeiro in PR#18243.
  • as.vector() gains a data.frame method which returns a simple named list, also clearing a long standing 'FIXME' to enable as.vector(<data.frame>, mode="list"). This breaks code relying on as.vector(<data.frame>) to return the unchanged data frame.
  • legend() is now vectorized for arguments cex, x.intersp, and text.width. The latter can now also be specified as a vector (one element for each column of the legend) or as NA for computing a proper column wise maximum value of strwidth(legend). The argument y.intersp can be specified as a vector with one entry for each row of the legend.
  • legend() also gains new arguments title.cex and title.font. Thanks to Swetlana Herbrandt.
  • Deparsing no longer remaps attribute names dim, dimnames, levels, names and tsp to historical S-compatible names (which structure() maps back).
  • sample() and sample.int() have additional sanity checks on their size and n arguments.
  • all.equal.numeric() gains a sanity check on its tolerance argument - calling all.equal(a, b, c) for three numeric vectors is a surprisingly common error.
  • mean(na.rm =), rank(na.last =), barplot(legend.text =), boxplot(), contour(drawlabels =), polygon(border =) and methods::is(class2 =) have more robust sanity checks on their arguments.
  • R CMD Rd2pdf (used by R CMD check) has a more robust sanity check on the format of alias{} commands.
  • psigamma(x, deriv) for negative x now also works for deriv = 4 and 5; their underlying C level dpsifn() is documented in 'Writing R Extensions'.
  • The HTML help system now uses HTML5 (wish of PR#18149).
  • ks.test() now provides exact p-values also with ties and MC p-values in the two-sample (Smirnov) case. By Torsten Hothorn.
  • ks.test() gains a formula interface, with y ~ 1 for the one-sample (Kolmogorov) test and y ~ group for the two-sample (Smirnov) test. Contributed by Torsten Hothorn.
  • The return value from ks.test() now has class c("ks.test", "htest") - packages using try() need to take care to use inherits() and not == on the class.
  • New functions psmirnov(), qsmirnov() and rsmirnov() in package stats implementing the asymptotic and exact distributions of the two-sample Smirnov statistic.
  • iconv() now allows sub = "c99" to use C99-style escapes for UTF-8 inputs which cannot be converted to encoding to.
  • In a forward pipe |> expression it is now possible to use a named argument with the placeholder _ in the rhs call to specify where the lhs is to be inserted. The placeholder can only appear once on the rhs.
  • The included LAPACK sources have been updated to version 3.10.0, except for the four Fortran 77 routines which 3.10.0 has re-implemented in Fortran 90 (where the older versions have been retained as the R build process does not support Fortran 90).
  • path.expand() and most other uses of tilde expansion now warn if a path would be too long if expanded. (An exception is file.exists(), which silently returns false.)
  • trunc(<Date>, *) now supports units = "months" or "years" for consistency with the POSIXt method, thanks to Dirk Eddelbuettel's proposal in PR#18099.
  • list2DF() now checks that its arguments are of the same length, rather than use recycling.
  • The HTML help system has several new features: LaTeX-like math can be typeset using either KaTeX or MathJax, usage and example code is highlighted using Prism, and for dynamic help the output of examples and demos can be shown within the browser if the knitr package is installed. These features can be disabled by setting the environment variable R_HELP_ENABLE_ENHANCED_HTML to a false value.
  • GRAPHICS:
  • The graphics engine version, R_GE_version, has been bumped to 15 and so packages that provide graphics devices should be reinstalled.
  • The grid package now allows the user to specify a "vector" of pattern fills. The fill argument to gpar() accepts a list of gradients and/or patterns and the functions linearGradient(), radialGradient(), and pattern() have a new group argument.
  • Points grobs (data symbols) can now also have a pattern fill.
  • The grobCoords() function now returns a more informative and complex result.
  • The grid package has new functions for drawing isolated groups: grid.group(), grid.define(), and grid.use(). These functions add compositing operators and affine transformations to R's graphics capabilities.
  • The grid package also has new functions for stroking and filling paths: grid.stroke(), grid.fill(), and grid.fillStroke().
  • A new function as.path() allows the user to specify the fill rule for a path that is to be used for clipping, stroking, or filling; available options are "winding" and "evenodd". A new function as.mask() allows the user to specify the type of a mask; available options are "alpha" and "luminance".
  • These new features are only supported so far (at most) on the Cairo-based graphics devices and on the pdf() device.
  • dev.capabilities() reports on device support for the new features.
  • par() now warns about unnamed non-character arguments to prevent misuse such as {usr <- par("usr"); par(usr)}.
  • WINDOWS:
  • R uses UTF-8 as the native encoding on recent Windows systems (at least Windows 10 version 1903, Windows Server 2022 or Windows Server 1903). As a part of this change, R uses UCRT as the C runtime. UCRT should be installed manually on systems older than Windows 10 or Windows Server 2016 before installing R.
  • The default personal library on Windows, folder Rwin-libraryx.y where x.y stands for R release x.y.z, is now a subdirectory of Local Application Data directory (usually a hidden directory C:UsersusernameAppDataLocal). Use shell.exec(.libPaths()[1]) from R to open the personal library in Explorer when it is first in the list (PR#17842).
  • R uses a new 64-bit Tcl/Tk bundle. The previous 32-bit/64-bit bundle had a different layout and can no longer be used.
  • Make files and installer scripts for Windows have been tailored to Rtools42, the newly recommended 64-bit gcc 10.3 MinGW-W64 UCRT toolchain.
  • Rtools42 by default uses the Windows security features ASLR and DEP; hence CRAN builds of R and packages also do.
  • R now supports files Makevars.ucrt, Makefile.ucrt, configure.ucrt and cleanup.ucrt in packages, which are used in preference to the .win variants. This allows keeping the .win files around to support older versions of R. This feature will be removed in the future once support for older versions of R would no longer be needed.
  • R.version gains a new field crt (only on Windows) to denote the C runtime. The value is "ucrt".
  • On Windows, download.file(method = "auto") and url(method = "default") now follow Unix in using "libcurl" for all except file:// URIs.
  • Rtools42 includes an unpatched Msys2 build of GNU tar. Paths including drive letters can be made to work by adding --force-local to environment variable TAR_OPTIONS. (Rtools40 and earlier included a patched version which defaulted to this option.)
  • Installer builds of R automatically find the Rtools42 software collection as well as the compiler toolchain. No PATH setting is required from the user.
  • The default installation directory of R for a user-only installation has been changed to the User Program Files directory (usually a hidden directory C:UsersusernameAppDataLocalPrograms) to follow Windows conventions. Use shell.exec(R.home()) from R to open the R installation directory in Explorer (PR#17842).
  • R now supports installation-time patching of packages. Patches may be installed from a supplied URL or a local directory or disabled. Patches are included into the installed packages for reference. This experimental feature may be removed in the future.
  • libcurl is now required for building from source.
  • The clipboard connection now works also with text in other than the current native encoding (PR#18267, with Hiroaki Yutani). Text is always pasted to the clipboard in UTF16-LE and the encoding argument is ignored.
  • The internal case-changing functions are now used by default on Windows - this circumvents problems (for example with E acute) of the UCRT Windows' runtime.
  • R on Windows now uses the system memory allocator. Doug Lea's allocator was used since R 1.2.0 to mitigate performance limitations seen with system allocators on earlier versions of Windows.
  • memory.limit() and memory.size() are now stubs on Windows (as on Unix-alikes).
  • Applications embedding R on Windows can now use additional callbacks, which have so far only been available only on Unix (PR#18286).
  • INSTALLATION:
  • Facilities for accessing ftp:// sites are no longer tested (except pro tem for curlGetHeaders()) as modern browsers have removed support.
  • R can now be built with DEFS = -DSTRICT_R_HEADERS .
  • PACKAGE INSTALLATION:
  • R CMD INSTALL no longer tangles vignettes. This completes an R CMD build change in R 3.0.0 and affects packages built before R 3.0.2. Such packages should be re-made with R CMD build to have the tangled R code of vignettes shipped with the tarball.
  • USE_FC_LEN_T will become the default: this uses the correct prototypes for Fortran BLAS/LAPACK routines called from C/C++, and requires adjustment of most such calls - see 'Writing R Extensions' SS6.6.2. (This has been supported since R 3.6.2.)
  • Package installation speed for packages installed with keep.source has been improved. This resolve the issue reported by Ofek Shilon in PR#18236.
  • UTILITIES:
  • R CMD check can optionally report files/directories left behind in home, /tmp (even though TMPDIR is set) and other directories. See the "R Internals" manual for details.
  • R CMD check now reports byte-compilation errors during installation. These are not usually fatal but may result in parts of the package not being byte-compiled.
  • R_CHECK_DEPENDS_ONLY can be applied selectively to examples, tests and/or vignettes in R CMD check: see the "R Internals" manual.
  • R_CHECK_SRC_MINUS_W_IMPLICIT now defaults to true: recent versions of Apple clang on macOS have made implicit function declarations in C into a compilation error.
  • R CMD check --as-cran makes use of the environment variable AUTORECONF. See the "R Internals" manual SS8 for further details.
  • R CMD check --use-valgrind also uses valgrind when re-building vignettes as some non-Sweave vignettes unhelpfully comment out all their code when R CMD check runs vignettes.
  • Errors in re-building vignettes (unless there are LaTeX errors) are reported by R CMD check as ERROR rather than WARNING when running vignettes has been skipped (as it frequently is in CRAN checks and by --as-cran).
  • R CMD Rd2pdf gains a --quiet option that is used by R CMD build when building the PDF package manual.
  • R CMD Rd2pdf now always runs LaTeX in batch mode, consistent with Texinfo >= 6.7. The --batch option is ignored.
  • R CMD build and R CMD check now include the Rd file name and line numbers in the error message of an Sexpr evaluation failure.
  • For packages using the doi Rd macro (now an install-time Sexpr) but no other dynamic Rd content, R CMD build now produces a smaller tarball and is considerably faster - skipping temporary package installation.
  • C-LEVEL FACILITIES:
  • The non-API header R_ext/R-ftp-http.h is no longer provided, as the entry points it covered are now all defunct.
  • A number of non-API declarations and macro definitions have been moved from the installed header Rinternals.h to the internal header Defn.h. Packages that only use entry points and definitions documented to be part of the API as specified in 'Writing R Extensions' SS6 should not be affected.
  • The macro USE_RINTERNALS no longer has any effect when compiling package code. Packages which also use R_NO_REMAP will need to ensure that the remapped names are used for calls to API functions that were formerly also made available as macros.
  • The deprecated legacy S-compatibility macros PROBLEM, MESSAGE, ERROR, WARN, WARNING, RECOVER, ... are no longer defined in R_exts/RS.h (included by R.h). Replace these by calls to Rf_error and Rf_warning (defined in header R_ext/Error.h included by R.h). Header R_ext/RS.h no longer includes R_ext/Error.h.
  • Header R_ext/Constants.h (included by R.h) when included from C++ now includes the C++ header cfloat rather than the C header float.h (now possible as C++11 is required).
  • The legacy S-compatibility macros DOUBLE_* in R_ext/Constants.h (included by R.h) are deprecated.
  • The deprecated S-compatibility macros SINGLE_* in R_ext/Constants.h (included by R.h) have been removed.
  • R_Calloc, R_Free and R_Realloc are preferred to their unprefixed forms and error messages now use the prefix. These forms were introduced in R 3.4.0 and are available even when STRICT_R_HEADERS is defined.
  • rmultinom has been documented in 'Writing R Extensions' SS6 so is now part of the R API.
  • Similarly, Rtanpi, called from R level tanpi() is now part of the R API.
  • The long-deprecated, undocumented and non-API entry point call_R is no longer declared in R_ext/RS.h (included by R.h).
  • The header S.h which has been unsupported since Jan 2016 has been removed. Use R.h instead.
  • DEPRECATED AND DEFUNCT:
  • The (non-default and deprecated) method = "internal" for download.file() and url() no longer supports http:// nor ftp:// URIs. (It is used only for file:// URIs.) On Windows, download.file(method = "wininet") no longer supports ftp:// URIs. (It is no longer the default method, which is "libcurl" and does.) On Windows, the deprecated method = "wininet" now gives a warning for http:// and https:// URIs for both download.file() and url(). (It is no longer the default method.)
  • On Windows, the command-line option --max-mem-size and environment variable R_MAX_MEM_SIZE are defunct. The memory allocation limit was important for 32-bit builds, but these are no longer supported.
  • default.stringsAsFactors() is now formally deprecated, where that was only mentioned on its regular help page, previously. So it now gives a warning if called.
  • unix.time() is defunct now; it had been deprecated since R 3.4.0.
  • BUG FIXES:
  • Setting digits = 0 in format(), print.default() (and hence typically print()) or options() is again invalid. Its behaviour was platform-dependent, and it is unclear what "zero significant digits" should mean (PR#18098).
  • Messages from C code in the cairo section of package grDevices are now also offered for translation, thanks to Michael Chirico's PR#18123.
  • mean(x) with finite x now is finite also without "long.double" capability.
  • R CMD Rd2pdf no longer leaves an empty build directory behind when it aborts due to an already existing output file. (Thanks to Sebastian Meyer's PR#18141.)
  • density(x, weights = w, na.rm = TRUE) when anyNA(x) is true, now removes weights "in parallel" to x, fixing PR#18151, reported by Matthias Gondan. Additionally, it gets a subdensity option.
  • Conversion of Sexpr[]{<expR>} to LaTeX or HTML no longer produces long blocks of empty lines when <expR> itself contains several lines all producing empty output. Thanks to a report and patch by Ivan Krylov posted to R-devel.
  • R CMD build no longer fails if a package vignette uses child documents and inst/doc exists. (Thanks to Sebastian Meyer's PR#18156.)
  • When an R documentation ('help' source) file man/foo.Rd in a package has donttest{..} examples with a syntax error, it is now signalled as ERROR and with correct line numbers relating to the *-Ex.R file, thanks to Duncan Murdoch and Sebastian Meyer's reports and patch proposals in PR#17501.
  • Improved determination of the correct translation domain in non-base packages, addressing the combination of PR#18092 and PR#17998 (#c6) with reports and augmented patch #2904 by Suharto Anggono.
  • Note that "R-base" is no longer the default domain e.g., for top-level calls to gettext(); rather translation needs explicit domain = * specification in such cases.
  • identical(attrib.as.set=FALSE) now works correctly with data frames with default row names (Thanks to Charlie Gao's PR#18179).
  • txtProgressBar() now enforces a non-zero width for argument char, without which no progress can be visible.
  • dimnames(table(d)) is more consistent in the case where d is a list with a single component, thanks to Thomas Soeiro's report to R-devel.
  • Further, table(d1, d2) now gives an error when d1 and d2 are data frames as suggested by Thomas in PR#18224.
  • Fix for drawing semi-transparent lines and fills on the native Windows graphics device (PR#18219 and PR#16694). Thanks to Nick Ray for helpful diagnosis on Bugzilla.
  • The deparser now wraps sub-expressions such as if(A) .. with parentheses when needed; thanks to Duncan Murdoch's PR#18232 and Lionel Henry's patches there.
  • remove.packages() no longer tries to uninstall Priority: base packages, thanks to a report and suggestions by Colin Fay in PR#18227.
  • win.metafile() now has xpinch and ypinch arguments so that the user can override Windows' (potentially wrong) guess at device dimensions.
  • x[i] and x[[i]] for non-integer i should now behave in all cases as always documented: the index used is equivalent to as.integer(i) unless that would overflow where trunc(i) is used instead; thanks to Suharto Anggono's report and patch proposals in PR#17977.
  • asOneSidedFormula() now associates the resulting formula with the global environment rather than the evaluation environment created for the call.
  • <bibentry>$name now matches the field name case-insensitively, consistent with bibentry() creation and the replacement method.
  • cbind() failed to detect some length mismatches with a mixture of time-series and non-time-series inputs.
  • The default LaTeX style file Sweave.sty used by the RweaveLatex driver no longer loads the obsolete ae package; thanks to a report by Thomas Soeiro in PR#18271. Furthermore, it now skips usepackage[T1]{fontenc} for engines other than pdfTeX (if detected) or if the new [nofontenc] option is used.
  • smooth.spline() now stores its logical cv argument more safely, fixing a rare bug when printing, and also stores n.
  • smooth.spline(x,y,*) now computes the cv.crit statistic correctly, also when is.unsorted(x), fixing PR#18294.
  • The data.frame method of rbind() now warns when binding not-wholly-recycling vectors, by analogy to the default method (for matrices).
  • setAs() finds the correct class for name to when multiple packages define a class with that name. Thanks to Gabor Csardi for the report.
  • Fix for detaching a package when two classes of the same name are present in method signatures for the same generic. Thanks to Gabor Csardi for the report.
  • match.arg("", c("", "a", "B")) gives a better error message, in part from PR#17959, thanks to Elin Waring.
  • R CMD Sweave --clean no longer removes pre-existing files or subdirectories (PR#18242).
  • The quartz() device no longer splits polylines into subpaths. That has caused narrowly-spaced lines with many points to always look solid even when dashed line type was used due to dash phase restarts.
  • Deparsing constructs such as quote(1 + !(2) + 3) works again as before R 3.5.0, thanks to the report and patch in PR#18284 by Suharto Anggono.
  • as.list(f) for a factor f now keeps names(f), fixing PR#18309.
  • qbeta(.001, .9, .009) and analogous qf() calls now return a correct value instead of NaN or wrongly 1, all with a warning; thanks to the report by Ludger Goeminne in PR#18302.
  • plot.lm() failed to produce the plot of residuals vs. factor levels (i.e., which=5 when leverages are constant) for models with character predictors (PR#17840).
  • interaction.plot(..., xtick = TRUE) misplaced the x-axis line (PR#18305).
  • Not strictly fixing a bug, format()ing and print()ing of non-finite Date and POSIXt values NaN and +/-Inf no longer show as NA but the respective string, e.g., Inf, for consistency with numeric vector's behaviour, fulfilling the wish of PR#18308.
  • R CMD check no longer runs test scripts generated from corresponding .Rin files twice and now signals an ERROR if processing an .Rin script fails.
  • tools::Rd2txt() used for plain-text help pages now renders hrefs (if tools::Rd2txt_options(showURLs = TRUE)) and urls with percent-encoding and standards-compliant delimiting style (angle brackets and no URL: prefix). email is now rendered with a mailto: prefix.

New in R Portable 4.1.2 (Nov 16, 2021)

  • C-LEVEL FACILITIES:
  • The workaround in headers R.h and Rmath.h (using namespace std;) for the Oracle Developer Studio compiler is no longer needed now C++11 is required so has been removed. A couple more usages of log() (which should have been std::log()) with an int argument are reported on Solaris.
  • The undocumented limit of 4095 bytes on messages from the S-compatibility macros PROBLEM and MESSAGE is now documented and longer messages will be silently truncated rather than potentially causing segfaults.
  • If the R_NO_SEGV_HANDLER environment variable is non-empty, the signal handler for SEGV/ILL/BUS signals (which offers recovery user interface) is not set. This allows more reliable debugging of crashes that involve the console.
  • DEPRECATED AND DEFUNCT:
  • The legacy S-compatibility macros PROBLEM, MESSAGE, ERROR, WARN, WARNING, RECOVER, ... are deprecated and will be hidden in R 4.2.0. R's native interface of Rf_error and Rf_warning has long been preferred.
  • BUG FIXES:
  • .mapply(F, dots, .) no longer segfaults when dots is not a list and uses match.fun(F) as always documented; reported by Andrew Simmons in PR#18164.
  • hist(<Date>, ...) and hist(<POSIXt>, ...) no longer pass arguments for rect() (such as col and density) to axis(). (Thanks to Sebastian Meyer's PR#18171.)
  • Sexpr{ch} now preserves Encoding(ch). (Thanks to report and patch by Jeroen Ooms in PR#18152.)
  • Setting the RNG to "Marsaglia-Multicarry" e.g., by RNGkind(), now warns in more places, thanks to Andr'e Gillibert's report and patch in PR#18168.
  • gray(numeric(), alpha=1/2) no longer segfaults, fixing PR#18183, reported by Till Krenz.
  • Fixed dnbinom(x, size=<very_small>, .., log=TRUE) regression, reported by Martin Morgan.
  • as.Date.POSIXlt(x) now keeps names(x), thanks to Davis Vaughan's report and patch in PR#18188.
  • model.response() now strips an "AsIs" class typically, thanks to Duncan Murdoch's report and other discussants in PR#18190.
  • try() is considerably faster in case of an error and long call, as e.g., from some do.call(). Thanks to Alexander Kaever's suggestion posted to R-devel.
  • qqline(y = <object>) such as y=I(.), now works, see also PR#18190.
  • Non-integer mgp par() settings are now handled correctly in axis() and mtext(), thanks to Mikael Jagan and Duncan Murdoch's report and suggestion in PR#18194.
  • formatC(x) returns length zero character() now, rather than "" when x is of length zero, as documented, thanks to Davis Vaughan's post to R-devel.
  • removeSource(fn) now retains (other) attributes(fn).

New in R Portable 4.1.1 (Sep 27, 2021)

  • CHANGES IN R 4.1.1:
  • FUTURE DIRECTIONS:
  • It is planned that the 4.1.x series will be the last to support 32-bit Windows, with production of binary packages for that series continuing until early 2023.
  • SIGNIFICANT USER-VISIBLE CHANGES:
  • Data set esoph in package datasets now provides the correct numbers of controls; previously it had the numbers of cases added to these. (Reported by Alexander Fowler in PR#17964.)
  • NEW FEATURES:
  • require(pkg, quietly = TRUE) is quieter and in particular does not warn if the package is not found.
  • DEPRECATED AND DEFUNCT
  • Use of ftp:// URIs should be regarded as deprecated, with on-going support confined to method = "libcurl" and not routinely tested. (Nowadays no major browser supports them.)
  • The non-default method = "internal" is deprecated for http:// and ftp:// URIs for both download.file and url.
  • On Windows, method = "wininet" is deprecated for http://, https:// and ftp:// URIs for both download.file and url. (A warning is only given for ftp://.)

New in R Portable 4.0.0 (Apr 30, 2020)

  • SIGNIFICANT USER-VISIBLE CHANGES:
  • Packages need to be (re-)installed under this version (4.0.0) of R.
  • matrix objects now also inherit from class "array", so e.g., class(diag(1)) is c("matrix", "array"). This invalidates code incorrectly assuming that class(matrix_obj)) has length one.
  • S3 methods for class "array" are now dispatched for matrix objects.
  • There is a new syntax for specifying raw character constants similar to the one used in C++: r"(...)" with ... any character sequence not containing the sequence )". This makes it easier to write strings that contain backslashes or both single and double quotes. For more details see ?Quotes.
  • R now uses a stringsAsFactors = FALSE default, and hence by default no longer converts strings to factors in calls to data.frame() and read.table().
  • A large number of packages relied on the previous behaviour and so have needed/will need updating.
  • The plot() S3 generic function is now in package base rather than package graphics, as it is reasonable to have methods that do not use the graphics package. The generic is currently re-exported from the graphics namespace to allow packages importing it from there to continue working, but this may change in future. Packages which define S4 generics for plot() should be re-installed and package code using such generics from other packages needs to ensure that they are imported rather than rely on their being looked for on the search path (as in a namespace, the base namespace has precedence over the search path).
  • REFERENCE COUNTING:
  • Reference counting is now used instead of the NAMED mechanism for determining when objects can be safely mutated in base C code. This reduces the need for copying in some cases and should allow further optimizations in the future. It should help make the internal code easier to maintain.
  • This change is expected to have almost no impact on packages using supported coding practices in their C/C++ code.
  • MIGRATION TO PCRE2:
  • This version of R is built against the PCRE2 library for Perl-like regular expressions, if available. (On non-Windows platforms PCRE1 can optionally be used if PCRE2 is not available at build time.) The version of PCRE in use can be obtained via extSoftVersion(): PCRE1 (formerly known as 'PCRE') has versions <= 8, PCRE2 versions >= 10.
  • Making PCRE2 available when building R from source is strongly recommended (preferably version 10.30 or later) as PCRE1 is no longer developed: version 8.44 is 'likely to be the final release'.
  • PCRE2 reports errors for some regular expressions that were accepted by PCRE1. A hyphen now has to be escaped in a character class to be interpreted as a literal (unless first or last in the class definition). R, B and X are no longer allowed in character classes (PCRE1 treated these as literals).
  • Option PCRE_study is no longer used with PCRE2, and is reported as FALSE when that is in use.
  • NEW FEATURES:
  • assertError() and assertWarning() (in package tools) can now check for specific error or warning classes via the new optional second argument classes (which is not back compatible with previous use of an unnamed second argument).
  • DF2formula(), the utility for the data frame method of formula(), now works without parsing and explicit evaluation, starting from Suharto Anggono's suggestion in PR#17555.
  • approxfun() and approx() gain a new argument na.rm defaulting to true. If set to false, missing y values now propagate into the interpolated values.
  • Long vectors are now supported as the seq argument of a for() loop.
  • str(x) gets a new deparse.lines option with a default to speed it up when x is a large call object.
  • The internal traceback object produced when an error is signalled (.Traceback), now contains the calls rather than the deparse()d calls, deferring the deparsing to the user-level functions .traceback() and traceback(). This fulfils the wish of PR#17580, reported including two patch proposals by Brodie Gaslam.
  • data.matrix() now converts character columns to factors and from this to integers.
  • package.skeleton() now explicitly lists all exports in the NAMESPACE file.
  • New function .S3method() to register S3 methods in R scripts.
  • file.path() has some support for file paths not in the session encoding, e.g. with UTF-8 inputs in a non-UTF-8 locale the output is marked as UTF-8.
  • Most functions with file-path inputs will give an explicit error if a file-path input in a marked encoding cannot be translated (to the native encoding or in some cases on Windows to UTF-8), rather than translate to a different file path using escapes. Some (such as dir.exists(), file.exists(), file.access(), file.info(), list.files(), normalizePath() and path.expand()) treat this like any other non-existent file, often with a warning.
  • There is a new help document accessed by help("file path encoding") detailing how file paths with marked encodings are handled.
  • New function list2DF() for creating data frames from lists of variables.
  • iconv() has a new option sub = "Unicode" to translate UTF-8 input invalid in the to encoding using <U+xxxx> escapes.
  • There is a new function infoRDS() providing information about the serialization format of a serialized object.
  • S3 method lookup now by default skips the elements of the search path between the global and base environments.
  • Added an argument add_datalist(*, small.size = 0) to allow the creation of a data/datalist file even when the total size of the data sets is small.
  • The backquote function bquote() has a new argument splice to enable splicing a computed list of values into an expression, like ,@ in LISP's backquote.
  • The formula interface to t.test() and wilcox.test() has been extended to handle one-sample and paired tests.
  • The palette() function has a new default set of colours (which are less saturated and have better accessibility properties). There are also some new built-in palettes, which are listed by the new palette.pals() function. These include the old default palette under the name "R3". Finally, the new palette.colors() function allows a subset of colours to be selected from any of the built-in palettes.
  • n2mfrow() gains an option asp = 1 to specify the aspect ratio, fulfilling the wish and extending the proposal of Michael Chirico in PR#17648.
  • For head(x, n) and tail() the default and other S3 methods notably for vector n, e.g. to get a "corner" of a matrix, has been extended to array's of higher dimension thanks to the patch proposal by Gabe Becker in PR#17652. Consequently, optional argument addrownums is deprecated and replaced by the (more general) argument keepnums. An invalid second argument n now leads to typically more easily readable error messages.
  • New function .class2() provides the full character vector of class names used for S3 method dispatch.
  • Printing methods(..) now uses a new format() method.
  • sort.list(x) now works for non-atomic objects x and method = "auto" (the default) or "radix" in cases order(x) works.
  • Where they are available, writeBin() allows long vectors.
  • New function deparse1() produces one string, wrapping deparse(), to be used typically in deparse1(substitute(*)), e.g., to fix PR#17671.
  • wilcox.test() enhancements: In the (non-paired) two-sample case, Inf values are treated as very large for robustness consistency. If exact computations are used, the result now has "exact" in the method element of its return value. New arguments tol.root and digits.rank where the latter may be used for stability to treat very close numbers as ties.
  • readBin() and writeBin() now report an error for an invalid endian value. The affected code needs to be fixed with care as the old undocumented behavior was to swap endian-ness in such cases.
  • sequence() is now an S3 generic with an internally implemented default method, and gains arguments to generate more complex sequences. Based on code from the S4Vectors Bioconductor package and the advice of Herv'e Pag`es.
  • print()'s default method and many other methods (by calling the default eventually and passing ...) now make use of a new optional width argument, avoiding the need for the user to set and reset options("width").
  • memDecompress() supports the RFC 1952 format (e.g. in-memory copies of gzip-compressed files) as well as RFC 1950.
  • memCompress() and memDecompress() support long raw vectors for types "gzip" and "zx".
  • sweep() and slice.index() can now use names of dimnames for their MARGIN argument (apply has had this for almost a decade).
  • New function proportions() and marginSums(). These should replace the unfortunately named prop.table() and margin.table(). They are drop-in replacements, but also add named-margin functionality. The old function names are retained as aliases for back-compatibility.
  • Functions rbinom(), rgeom(), rhyper(), rpois(), rnbinom(), rsignrank() and rwilcox() which have returned integer since R 3.0.0 and hence NA when the numbers would have been outside the integer range, now return double vectors (without NAs, typically) in these cases.
  • matplot(x,y) (and hence matlines() and matpoints()) now call the corresponding methods of plot() and lines(), e.g, when x is a "Date" or "POSIXct" object; prompted by Spencer Graves' suggestion.
  • stopifnot() now allows customizing error messages via argument names, thanks to a patch proposal by Neal Fultz in PR#17688.
  • unlink() gains a new argument expand to disable wildcard and tilde expansion. Elements of x of value "~" are now ignored.
  • mle() in the stats4 package has had its interface extended so that arguments to the negative log-likelihood function can be one or more vectors, with similar conventions applying to bounds, start values, and parameter values to be kept fixed. This required a minor extension to class "mle", so saved objects from earlier versions may need to be recomputed.
  • The default for pdf() is now useDingbats = FALSE.
  • The default fill colour for hist() and boxplot() is now col = "lightgray".
  • The default order of the levels on the y-axis for spineplot() and cdplot() has been reversed.
  • If the R_ALWAYS_INSTALL_TESTS environment variable is set to a true value, R CMD INSTALL behaves as if the --install-tests option is always specified. Thanks to Reinhold Koch for the suggestion.
  • New function R_user_dir() in package tools suggests paths appropriate for storing R-related user-specific data, configuration and cache files.
  • capabilities() gains a new logical option Xchk to avoid warnings about X11-related capabilities.
  • The internal implementation of grid units has changed, but the only visible effects at user-level should be
  • a slightly different print format for some units (especially unit arithmetic),
  • faster performance (for unit operations) and
  • two new functions unitType() and unit.psum().
  • Based on code contributed by Thomas Lin Pedersen.
  • When internal dispatch for rep.int() and rep_len() fails, there is an attempt to dispatch on the equivalent call to rep().
  • Object .Machine now contains new longdouble.* entries (when R uses long doubles internally).
  • news() has been enhanced to cover the news on R 3.x and 2.x.
  • For consistency, N <- NULL; N[[1]] <- val now turns N into a list also when val) has length one. This enables dimnames(r1)[[1]] <- "R1" for a 1-row matrix r1, fixing PR#17719 reported by Serguei Sokol.
  • deparse(..), dump(..), and dput(x, control = "all") now include control option "digits17" which typically ensures 1:1 invertibility. New option control = "exact" ensures numeric exact invertibility via "hexDigits".
  • When loading data sets via read.table(), data() now uses LC_COLLATE=C to ensure locale-independent results for possible string-to-factor conversions.
  • A server socket connection, a new connection type representing a listening server socket, is created via serverSocket() and can accept multiple socket connections via socketAccept().
  • New function socketTimeout() changes the connection timeout of a socket connection.
  • The time needed to start a homogeneous PSOCK cluster on localhost with many nodes has been significantly reduced (package parallel).
  • New globalCallingHandlers() function to establish global condition handlers. This allows registering default handlers for specific condition classes. Developed in collaboration with Lionel Henry.
  • New function tryInvokeRestart() to invoke a specified restart if one is available and return without signaling an error if no such restart is found. Contributed by Lionel Henry in PR#17598.
  • str(x) now shows the length of attributes in some cases for a data frame x.
  • Rprof() gains a new argument filter.callframes to request that intervening call frames due to lazy evaluation or explicit eval() calls be omitted from the recorded profile data. Contributed by Lionel Henry in PR#17595.
  • The handling of ${FOO-bar} and ${FOO:-bar} in Renviron files now follows POSIX shells (at least on a Unix-alike), so the first treats empty environment variables as set and the second does not. Previously both ignored empty variables. There are several uses of the first form in etc/Renviron.
  • New classes argument for suppressWarnings() and suppressMessages() to selectively suppress only warnings or messages that inherit from particular classes. Based on patch from Lionel Henry submitted with PR#17619.
  • New function activeBindingFunction() retrieves the function of an active binding.
  • New "cairoFT" and "pango" components in the output of grSoftVersion().
  • New argument symbolfamily in cairo-based graphics devices and new function cairoSymbolFont() that can be used to provide the value for that argument.
  • Windows:
  • Rterm now works also when invoked from MSYS2 terminals. Line editing is possible when command winpty is installed.
  • normalizePath() now resolves symbolic links and normalizes case of long names of path elements in case-insensitive folders (PR#17165).
  • md5sum() supports UTF-8 file names with characters that cannot be translated to the native encoding (PR#17633).
  • Rterm gains a new option --workspace to specify the workspace to be restored. This allows equals to be part of the name when opening via Windows file associations (reported by Christian Asseburg).
  • Rterm now accepts ALT+xxx sequences also with NumLock on. Tilde can be pasted with an Italian keyboard (PR#17679).
  • R falls back to copying when junction creation fails during package checking (patch from Duncan Murdoch).
  • DEPRECATED AND DEFUNCT
  • Make macro F77_VISIBILITY has been removed and replaced by F_VISIBILITY.
  • Make macros F77, FCPIFCPLAGS and SHLIB_OPENMP_FCFLAGS have been removed and replaced by FC, FPICFLAGS and SHLIB_OPENMP_FFLAGS respectively. (Most make programs will set F77 to the value of FC, which is set for package compilation. But portable code should not rely on this.)
  • The deprecated support for specifying C++98 for package installation has been removed.
  • R CMD config no longer knows about the unused settings F77 and FCPIFCPLAGS, nor CXX98 and similar.
  • Either PCRE2 or PCRE1 >= 8.32 (Nov 2012) is required: the deprecated provision for 8.20-8.31 has been removed.
  • Defunct functions mem.limits(), .readRDS(), .saveRDS(),..find.package(), and .path.package() from package base and allGenerics(), getAccess(), getAllMethods(), getClassName(), getClassPackage(), getExtends(), getProperties(), getPrototype(), getSubclasses(), getVirtual(), mlistMetaName(), removeMethodsObject(), seemsS4Object(), traceOff(), and traceOn() from methods have been removed.
  • C-LEVEL FACILITIES
  • installChar is now remapped in Rinternals.h to installTrChar, of which it has been a wrapper since R 3.6.0. Neither are part of the API, but packages using installChar can replace it if they depend on R >= 3.6.2.
  • Header R_ext/Print.h defines R_USE_C99_IN_CXX and hence exposes Rvprintf and REvprintf if used with a C++11 (or later) compiler.
  • There are new Fortran subroutines dblepr1, realpr1 and intpr1 to print a scalar variable (gfortran 10 enforces the distinction between scalars and length-one arrays). Also labelpr to print just a label.
  • R_withCallingErrorHandler is now available for establishing a calling handler in C code for conditions inheriting from class error.
  • INSTALLATION on a UNIX-ALIKE
  • User-set DEFS (e.g., in config.site) is now used for compiling packages (including base packages).
  • There is a new variant option --enable-lto=check for checking consistency of BLAS/LAPACK/LINPACK calls - see 'Writing R Extensions'.
  • A C++ compiler default is set only if the C++11 standard is supported: it no longer falls back to C++98.
  • PCRE2 is used if available. To make use of PCRE1 if PCRE2 is unavailable, configure with option --with-pcre1.
  • The minimum required version of libcurl is now 7.28.0 (Oct 2012).
  • New make target distcheck checks
  • R can be rebuilt from the tarball created by make dist,
  • the build from the tarball passes make check-all,
  • the build installs and uninstalls,
  • the source files are properly cleaned by make distclean.
  • UTILITIES
  • R --help now mentions the option --no-echo (renamed from --slave) and its previously undocumented short form -s.
  • R CMD check now optionally checks configure and cleanup scripts for non-Bourne-shell code ('bashisms').
  • R CMD check --as-cran now runs donttest examples (which are run by example()) instead of instructing the tester to do so. This can be temporarily circumvented during development by setting environment variable R_CHECK_DONTTEST_EXAMPLES to a false value.
  • PACKAGE INSTALLATION
  • There is the beginnings of support for the recently approved C++20 standard, specified analogously to C++14 and C++17. There is currently only limited support for this in compilers, with flags such as -std=c++20 and -std=c++2a. For the time being the configure test is of accepting one of these flags and compiling C++17 code.
  • BUG FIXES
  • formula(x) with length(x) > 1 character vectors, is deprecated now. Such use has been rare, and has 'worked' as expected in some cases only. In other cases, wrong x have silently been truncated, not detecting previous errors.
  • Long-standing issue where the X11 device could lose events shortly after startup has been addressed (PR#16702).
  • The data.frame method for rbind() no longer drops <NA> levels from factor columns by default (PR#17562).
  • available.packages() and hence install.packages() now pass their ... argument to download.file(), fulfilling the wish of PR#17532; subsequently, available.packages() gets new argument quiet, solving PR#17573.
  • stopifnot() gets new argument exprObject to allow an R object of class expression (or other 'language') to work more consistently, thanks to suggestions by Suharto Anggono.
  • conformMethod() now works correctly in cases containing a "&& logic" bug, reported by Henrik Bengtsson. It now creates methods with "missing" entries in the signature. Consequently, rematchDefinition() is amended to use appropriate .local() calls with named arguments where needed.
  • format.default(*, scientific = FALSE) now corresponds to a practically most extreme options(scipen = n) setting rather than arbitrary n = 100.
  • format(as.symbol("foo")) now works (returning "foo").
  • postscript(.., title = *) now signals an error when the title string contains a character which would produce corrupt PostScript, thanks to PR#17607 by Daisuko Ogawa.
  • Certain Ops (notably comparison such as ==) now also work for 0-length data frames, after reports by Hilmar Berger.
  • methods(class = class(glm(..))) now warns more usefully and only once.
  • write.dcf() no longer mangles field names (PR#17589).
  • Primitive replacement functions no longer mutate a referenced first argument when used outside of a complex assignment context.
  • A better error message for contour(*, levels = Inf).
  • The return value of contourLines() is no longer invisible().
  • The Fortran code for calculating the coefficients component in lm.influence() was very inefficient. It has (for now) been replaced with much faster R code (PR#17624).
  • cm.colors(n) etc no longer append the code for alpha = 1, "FF", to all colors. Hence all eight *.colors() functions and rainbow() behave consistently and have the same non-explicit default (PR#17659).
  • dnorm had a problematic corner case with sd == -Inf or negative sd which was not flagged as an error in all cases. Thanks to Stephen D. Weigand for reporting and Wang Jiefei for analyzing this; similar change has been made in dlnorm().
  • The optional iter.smooth argument of plot.lm(), (the plot() method for lm and glm fits) now defaults to 0 for all glm fits. Especially for binary observations with high or low fitted probabilities, this effectively deleted all observations of 1 or 0. Also, the type of residuals used in the glm case has been switched to "pearson" since deviance residuals do not in general have approximately zero mean.
  • In plot.lm, Cook's distance was computed from unweighted residuals, leading to inconsistencies. Replaced with usual weighted version. (PR#16056)
  • Time-series ts(*, start, end, frequency) with fractional frequency are supported more consistently; thanks to a report from Johann Kleinbub and analysis and patch by Duncan Murdoch in PR#17669.
  • In case of errors mcmapply() now preserves attributes of returned "try-error" objects and avoids simplification, overriding SIMPLIFY to FALSE. (PR#17653)
  • as.difftime() gets new optional tz = "UTC" argument which should fix behaviour during daylight-savings-changeover days, fixing PR#16764, thanks to proposals and analysis by Johannes Ranke and Kirill M"uller.
  • round() does a better job of rounding "to nearest" by measuring and "to even"; thanks to a careful algorithm originally prompted by the report from Adam Wheeler and then others, in PR#17668. round(x, dig) for negative digits is much more rational now, notably for large |dig|.
  • Inheritance information on S4 classes is maintained more consistently, particularly in the case of class unions (in part due to PR#17596 and a report from Ezra Tucker).
  • is() behaves more robustly when its argument class2 is a classRepresentation object.
  • The warning message when attempting to export an nonexistent class is now more readable; thanks to Thierry Onkelinx for recognizing the problem.
  • choose() misbehaved in corner cases where it switched n - k for k and n was only nearly integer (report from Erik Scott Wright).
  • mle() in the stats4 package had problems combining use of box constraints and fixed starting values (in particular, confidence intervals were affected).
  • Operator ? now has lower precedence than = to work as documented, so = behaves like <- in help expressions (PR#16710).
  • smoothEnds(x) now returns integer type in both cases when x is integer, thanks to a report and proposal by Bill Dunlap PR#17693.
  • The methods package does a better job of tracking inheritance relationships across packages.
  • norm(diag(c(1, NA)), "2") now works.
  • subset() had problems with 0-col dataframes (reported by Bill Dunlap, PR#17721).
  • Several cases of integer overflow detected by the 'undefined behaviour sanitizer' of clang 10 have been circumvented. One in rhyper() may change the generated value for large input values.
  • dotchart() now places the y-axis label (ylab) much better, not overplotting labels, thanks to a report and suggestion by Alexey Shipunov.
  • A rare C-level array overflow in chull() has been worked around.
  • Some invalid specifications of the day-of-the-year (via %j, e.g. day 366 in 2017) or week plus day-of-the-week are now detected by strptime(). They now return NA but give a warning as they may have given random results or corrupted memory in earlier versions of R.
  • socketConnection(server = FALSE) now respects the connection timeout also on Linux.
  • socketConnection(server = FALSE) no longer leaks a connection that is available right away without waiting (e.g. on localhost).
  • Socket connections are now robust against spurious readability and spurious availability of an incoming connection.
  • blocking = FALSE is now respected also on the server side of a socket connection, allowing non-blocking read operations.
  • anova.glm() and anova.glmlist() computed incorrect score (Rao) tests in no-intercept cases. (Andr'e Gillibert, PR#17734)
  • summaryRprof() now should work correctly for the Rprof(*, memory.profiling=TRUE) case with small chunk size (and "tseries" or similar) thanks to a patch proposal by Benjamin Tyner, in PR#15886.
  • xgettext() ignores strings passed to ngettext(), since the latter is handled by xngettext(). Thanks to Daniele Medri for the report and all the recent work he has done on the Italian translations.
  • data(package = "P") for P in base and stats no longer reports the data sets from package datasets (which it did for back compatibility for 16 years), fixing PR#17730.
  • x[[Inf]] (returning NULL) no longer leads to undefined behavior, thanks to a report by Kirill M"uller in PR#17756. Further, x[[-Inf]] and x[[-n]] now give more helpful error messages.
  • Gamma() family sometimes had trouble storing link name PR#15891
  • BUG FIXES (Windows)
  • Sys.glob() now supports all characters from the Unicode Basic Multilingual Plane, no longer corrupting some (less commonly used) characters (PR#17638).
  • Rterm now correctly displays multi-byte-coded characters representable in the current native encoding (at least on Windows 10 they were sometimes omitted, PR#17632).
  • scan() issues with UTF-8 data when running in a DBCS locale have been resolved (PR#16520, PR#16584).
  • RTerm now accepts enhanced/arrow keys also with ConPTY.
  • R can can now be started via the launcher icon in a user documents directory whose path is not representable in the system encoding.
  • socketConnection(server = FALSE) now returns instantly also on Windows when connection failure is signalled.
  • Problems with UTF-16 surrogate pairs have been fixed in several functions, including tolower() and toupper() (PR#17645).
  • CHANGES in previous versions
  • Older news can be found in text format in files NEWS.0, NEWS.1, NEWS.2 and NEWS.3 in the doc directory. News in HTML format for R versions 3.x and from 2.10.0 to 2.15.3 is available at doc/html/NEWS.3.html and doc/html/NEWS.2.html

New in R Portable 3.6.3 (Mar 3, 2020)

  • NEW FEATURES:
  • The included LAPACK has been updated to version 3.9.0 (for the
  • included routines, just bug fixes).
  • BUG FIXES:
  • Fixed a C level integer overflow in rhyper(); reported by Benjamin Tyner in PR#17694.
  • Uses of url(gzcon(.)) needing to extend buffer size have failed with HTTP/2 servers), reported by G'abor Cs'ardi. predict(loess(..), se=TRUE) now errors out (instead of seg.faulting etc) for large sample sizes, thanks to a report and patch by Benjamin Tyner in PR#17121.
  • tools:assertCondition(., "error") and hence assertError() no longer return errors twice (invisibly).
  • update(form, new) in the case of a long new formula sometimes wrongly eliminated the intercept from form, or (more rarely)
  • added a garbage term (or seg.faulted !); the fix happened by simplifying the C-level logic of terms.formula(). Reported by Mathias Amb"uhl in PR#16326.
  • The error message from stopifnot(.., <error producing call>) again contains the full "stopifnot(.......)" call: Its attempted suppression did not work consistently.
  • On Windows, download.file(., , "wininet", headers=character()) would fail; rep

New in R Portable 3.6.2 (Dec 16, 2019)

  • NEW FEATURES:
  • runmed(x, *) gains a new option na.action determining how to handle NaN or NA in x.
  • dotchart() gains new options ann, xaxt, frame.plot and log.
  • INSTALLATION on a UNIX-ALIKE:
  • Detection of the C stack direction has been moved from run-time to configure: this is safer with LTO builds and allows the detection to be overridden - see file config.site.
  • Source-code changes enable installation on platforms using gcc -fno-common (the expected default for gcc 10.x).
  • C-LEVEL FACILITIES:
  • installTrChar (which is nowadays is wrapped by installChar) is defined in Rinternals.h. (Neither are part of the API.)
  • PACKAGE INSTALLATION:
  • Header Rconfig.h contains the value of FC_LEN_T deduced at installation which is used by the prototypes in headers R_ext/BLAS.h and R_ext/Lapack.h but to avoid extensive breakage this is only exposed when USE_FC_LEN_T is defined.
  • If a package's C/C++ calls to BLAS/LAPACK allow for the 'hidden' arguments used by most Fortran compilers to pass the lengths of Fortran character arguments, define USE_FC_LEN_T and include Rconfig.h (possibly via R.h) before including R_ext/BLAS.h or R_ext/Lapack.h.
  • A package with Fortran source code and perhaps C (but not C++) sources can request for its shared object/DLL to be linked by the Fortran compiler by including a line USE_FC_TO_LINK= in src/Makevars[.win] and using $(SHLIB_OPENMP_FFLAGS) as part of PKG_LIBS.
  • The known reason for doing so is a package which uses Fortran (only) OpenMP on a platform where the Fortran OpenMP runtime is incompatible with the C one (e.g. gfortran 9.x with clang).
  • UTILITIES:
  • R CMD check has a new option to mitigate checks leaving files/directories in /tmp. See the 'R Internals' manual - this is part of --as-cran.
  • Windows - The default standard for C++ in package installation is C++11 (as it has been on other platforms where available since R 3.6.0: the default toolchain on Windows was defaulting to C++98).
  • DEPRECATED AND DEFUNCT:
  • Support for specifying C++98 in package installation is deprecated.
  • Support in R CMD config for F77, FCPIFCPLAGS, CPP, CXXCPP and CXX98 and similar is deprecated. (CPP is found from the system make and may well not be set.) Use $CC -E and $CXX -E instead of CPP and CXXCPP.
  • BUG FIXES:
  • runmed(x, *) when x contains missing values now works consistently for both algorithm="Stuetzle" and "Turlach", and no longer segfaults for "Turlach", as reported by Hilmar Berger.
  • apply(diag(3), 2:3, mean) now gives a helpful error message.
  • dgamma(x, shape, log=TRUE) now longer overflows to Inf for shape < 1 and very small x, fixing PR#17577, reported by Jonathan Rougier.
  • Buffer overflow in building error messages fixed. Reported by Benjamin Tremblay.
  • options(str = .) is correctly initialized at package utils load time, now. A consequence is that str() in scripts now is more consistent to interactive use, e.g., when displaying function(**) argument lists.
  • as.numeric(<call>) now gives correct error message.
  • Printing ls.str() no longer wrongly shows "<missing>" in rare cases.
  • Auto-printing S4 objects no longer duplicates the object, for faster speed and reduced memory consumption. Reported by Aaron Lun.
  • pchisq(<LRG>, <LRG>, ncp=100) no longer takes practically forever in some cases. Hence ditto for corresponding qchisq() calls.
  • x %% L for finite x no longer returns NaN when L is infinite, nor suffers from cancellation for large finite L, thanks to Long Qu's PR#17611. Analogously, x %/% L and L %/% x suffer less from cancellation and return values corresponding to limits for large L.
  • grepl(NA, *) now returns logical as documented.
  • options(warn=1e11) is an error now, instead of later leading to C stack overflow because of infinite recursion.
  • R_tryCatch no longer transfers control for all conditions. Reported and patch provided by Lionel Henry in PR#17617.
  • format(object.size(.), digits=NULL) now works, fixing PR#17628 reported by Jonathan Carroll.
  • get_all_vars(f, d) now also works for cases, e.g. where d contains a matrix. Reported by Simon Wood in 2009 and patch provided by Ben Bolker in PR#13624. Additionally, it now also works when some variables are data frames, fixing PR#14905, reported by Patrick Breheny.
  • barplot() could get spacings wrong if there were exactly two bars PR#15522. Patch by Michael Chirico.
  • power.t.test() works in more cases when returning values of n smaller than 2.
  • dotchart(*, pch=., groups=.) now works better. Reported by Robert and confirmed by Nic Rochette in PR#16953.
  • canCoerce(obj, cl) no longer assumes length(class(obj)) == 1.
  • plot.formula(, subset = ) now also works in a boundary case reported by Robert Schlicht (TU Dresden).
  • readBin() and writeBin() of a rawConnection() now also work in large cases, thanks to a report and proposal by Taeke Harkema in PR#17665.

New in R Portable 3.6.1 (Jul 24, 2019)

  • UTILITIES:
  • R CMD config knows the values of AR and RANLIB, often set for LTO builds.
  • DEPRECATED AND DEFUNCT
  • The use of a character vector with .Fortran() is formally deprecated and gives a non-portability warning. (It has long been strongly discouraged in ‘Writing R Extensions’.)
  • BUG FIXES:
  • On Windows, GUI package installation via menuInstallPkgs() works again, thanks to Len Weil's and Duncan Murdoch's PR#17556.
  • R CMD check on data() fixing PR#17558 thanks to Duncan Murdoch.
  • quasi(*, variance = list(..)) now works more efficiently, and should work in all cases fixing PR#17560. Further, quasi(var = mu(1-mu)) and quasi(var = "mu ^ 3") now work, and quasi(variance = "log(mu)") now gives a correct error message.
  • Creation of lazy loading database during package installation is again robust to Rprofile changing the current working directory (PR#17559).
  • boxplot(y ~ f, horizontal=TRUE) now produces correct x- and y-labels.
  • rbind.data.frame() allows to keep <NA> levels from factor columns (PR#17562) via new option factor.exclude.
  • Additionally, it works in one more case with matrix-columns which had been reported on 2017-01-16 by Krzysztof Banas.
  • Correct messaging in C++ pragma checks in tools code for R CMD check, fixing PR#17566 thanks to Xavier Robin.
  • print()ing and auto-printing no longer differs for functions with a user defined print.function, thanks to Bill Dunlap's report.
  • On Windows, writeClipboard(.., format = <n>) now does correctly pass format to the underlying C code, thanks to a bug report (with patch) by Jenny Bryan.
  • as.data.frame() treats 1D arrays the same as vectors, PR#17570.
  • Improvements in smoothEnds(x, *) working with NAs (towards runmed() working in that case, in the next version of R).
  • vcov(glm(<quasi>), dispersion = *) works correctly again, fixing PR#17571 thanks to Pavel Krivitsky.
  • R CMD INSTALL of binary packages on Windows now works also with per-directory locking.
  • R CMD INSTALL and install.packages() on Windows are now more robust against a locked file in an earlier installation of the package to be installed. The default value of option install.lock on Windows has been changed to TRUE.
  • On Unix alikes (when readline is active), only expand tilde (~) file names starting with a tilde, instead of almost all tildes.
  • In R documentation ('*.Rd') files, item [..] is no longer treated specially when rendered in LaTeX and hence pdf, but rather shows the brackets in all cases.

New in R Portable 3.6.0 (Jun 5, 2019)

  • SIGNIFICANT USER-VISIBLE CHANGES:
  • Serialization format version 3 becomes the default for serialization and saving of the workspace (save(), serialize(), saveRDS(), compiler::cmpfile()). Serialized data in format 3 cannot be read by versions of R prior to version 3.5.0. Serialization format version 2 is still supported and can be selected by version = 2 in the save/serialization functions. The default can be changed back for the whole R session by setting environment variables R_DEFAULT_SAVE_VERSION and R_DEFAULT_SERIALIZE_VERSION to 2. For maximal back-compatibility, files vignette.rds and partial.rdb generated by R CMD build are in serialization format version 2, and resave by default produces files in serialization format version 2 (unless the original is already in format version 3).
  • The default method for generating from a discrete uniform distribution (used in sample(), for instance) has been changed. This addresses the fact, pointed out by Ottoboni and Stark, that the previous method made sample() noticeably non-uniform on large populations. See PR#17494 for a discussion. The previous method can be requested using RNGkind() or RNGversion() if necessary for reproduction of old results. Thanks to Duncan Murdoch for contributing the patch and Gabe Becker for further assistance.
  • The output of RNGkind() has been changed to also return the 'kind' used by sample().
  • NEW FEATURES:
  • Sys.setFileTime() has been vectorized so arguments path and time of length greater than one are now supported.
  • axis() gets new option gap.axis = NA for specifying a multiplication factor for the minimal "gap" (distance) between axis labels drawn. Its default is 1 for labels _parallel_ to the axis, and 0.25 for perpendicular ones.
  • Perpendicular labels no longer overlap, fixing bug PR#17384.
  • The default method of plot() gains new arguments xgap.axis = NA and ygap.axis = NA to be passed to the x- and y- axis(.., gap.axis=*) calls.
  • removeSource() now works not only for functions but also for some language objects.
  • as.call(), rep.int(), rep_len() and nchar() dispatch internally.
  • is(object, class2) looks for class2 in the calling namespace after looking in the namespace of class(object).
  • extendrange(.., f) with a length-2 f now extends separately to the left and the right.
  • lengths() dispatches internally to S4 methods.
  • download.file() on Windows now uses URLdecode() to determine the file extension, and uses binary transfer (mode = "wb") also for file extension .rds.
  • The help page for download.file() now contains the same information on all platforms.
  • Setting C locale for collation _via_ environment variables LC_ALL and LC_COLLATE and _via_ a call to Sys.setlocale() now takes precedence over environment variable R_ICU_LOCALE.
  • There is a new function, nullfile(), to give the file name of the null system device (e.g., /dev/null) on the current platform.
  • There are two new options, keep.parse.data and keep.parse.data.pkgs, which control whether parse data are included into sources when keep.source or keep.source.pkgs is TRUE. By default, keep.parse.data.pkgs is now FALSE, which changes previous behavior and significantly reduces space and time overhead when sources are kept when installing packages.
  • In rapply(x, ..), x can also be "list-like" and of length >= 2^{31}.
  • trimws() gets new optional whitespace argument, allowing more extensive definitions of "space", such as including Unicode spaces (as wished in PR#17431).
  • weighted.mean() no longer coerces the weights to a double/numeric vector, since sum() now handles integer overflow. This makes weighted.mean() more polymorphic and endomorphic, but be aware that the results are no longer guaranteed to be a vector of type double.
  • When loading namespaces, S3 method registrations which overwrite previous registrations are now noted by default (using packageStartupMessage()).
  • compiler::cmpfile() gains a version argument, for use when the output file should be saved in serialization format 2.
  • The axis labeling in the default method of pairs() may now be toggled by new options horOdd and verOdd.
  • (Not Windows nor macOS.) Package tcltk now supports an environment variable R_DONT_USE_TK which if set disables Tk initialization. This is intended for use to circumvent errors in loading the package, e.g. with recent Linux running under an address sanitizer.
  • The numeric method of all.equal() gets optional arguments countEQ and formatFUN. If countEQ is true, the mean error is more sensible when many entries are equal.
  • outer(x,y, FUN = "") is more efficient using tcrossprod(u,v) instead of u %% t(v).
  • vcov(<mlm>) is more efficient via new optional arguments in summary.mlm().
  • The default method of summary() gets an option to choose the _kind_ of quantile()s to use; wish of PR#17438.
  • Fitting multiple linear models _via_ lm() does work with _matrix_ offsets, as suggested in PR#17407.
  • The new functions mem.maxVSize() and mem.maxMSize() allow the maximal size of the vector heap and the maximal number of nodes allowed in the current R process to be queried and set.
  • news() gains support for NEWS.md files.
  • An effort has been started to have our reference manuals, i.e., all help pages. show platform-independent information (rather than Windows or Unix-alike specifics visible only on that platform). Consequently, the Windows version of X11() / x11() got identical formal arguments to the Unix one.
  • sessionInfo()$running has been factored out in a new variable osVersion.
  • slice.index() now also works for multi-dimensional margins.
  • untar() used with an external tar command assumes this supports decompression including xz and automagically detecting the compression type. This has been true of all mainstream implementations since 2009 (for GNU tar, since version 1.22): older implementations are still supported _via_ the new argument support_old_tars whose default is controlled by environment variable R_SUPPORT_OLD_TARS. (It looks like NetBSD and OpenBSD have 'older' tar commands for this purpose.)
  • The new function asplit() allow splitting an array or matrix by its margins.
  • New functions errorCondition() and warningCondition() provide a convenient way to create structured error and warning objects.
  • .Deprecated() now signals a warning of class "deprecatedWarning", and .Defunct() now signals an error of class "defunctError".
  • Many 'package not found' errors are now signaled as errors of class "packageNotFoundError".
  • As an experimental feature, when loadNamespace() fails because the requested package is not available the error is initially signaled with a retry_loadNamespace restart available. This allows a calling handler to try to install the package and continue.
  • S3method() directives in NAMESPACE can now also be used to perform _delayed_ S3 method registration.
  • Experimentally, setting environment variable _R_CHECK_LENGTH_1_LOGIC2_ will lead to warnings (or errors if the variable is set to a 'true' value) when && or || encounter and use arguments of length more than one.
  • Added "lines" and "chars" coordinate systems to grconvertX() and grconvertY().
  • getOption() is more efficient notably for the rare case when called with two arguments, from several contributors in PR#17394.
  • In .col(dim) and .row(dim), dim now may also be an integer-valued "double".
  • sQuote() and dQuote() get an explicit q argument with obvious default instead of using getOption("fancyQuotes") implicitly and unconditionally.
  • unzip() can list archives with comments and with spaces in file names even using an external unzip command.
  • Command line completion has a new setting rc.settings(dots = FALSE) to remove ... from the list of possible function arguments.
  • library() no longer checks packages with compiled code match R.version$platform.loadNamespace() never has, and increasingly the 'canonical name' does not reflect the important characteristics of compiled code.
  • The primitive functions drop() and unclass() now avoid duplicating their data for atomic vectors that are large enough, by returning ALTREP wrapper objects with adjusted attributes.
  • R-level assignments to change attributes will also use wrapper objects to avoid duplicating data for larger atomic vectors. R functions like structure() and unname() will therefore not duplicate data in these settings. Generic vectors as produced by list() are not yet covered by this optimization but may be in due course.
  • In formals(), envir becomes an optional argument instead of being hardwired.
  • Instead of signalling an error for an invalid S4 object x, str(x) now gives a warning and subsequently still shows most parts of x, e.g., when slots are missing.
  • gamma(x) and lgamma(x) no longer warn when correctly returning Inf or underflowing to zero. This helps maximum likelihood and similar computations.
  • convertColor() is now vectorized, so a lot faster for converting many colours at once. The new argument vectorized to colorConverter() ensures that non-vectorized colour converters still work.(Thanks to Brodie Gaslam.)
  • download.file() and url() get new argument headers for custom HTTP headers, e.g., allowing to perform basic http authentication, thanks to a patch contributed by G'abor Cs'ardi.
  • File-based connection functions file(), gzfile(), bzfile() and xzfile() now signal an error when used on a directory.
  • For approx(), splinefun() _etc_, a new setting ties = c("ordered", <fun>) allows skipping the sorting and still treat ties.
  • format(x) gives a more user friendly error message in the case where no method is defined. A minimal method is provided in format.default(x) when isS4(x) is true.
  • which(x) now also works when x is a long vector, thanks to Suharto Anggono's PR#17201. NB: this may return a double result, breaking the previous guarantee of an integer result.
  • seq.default() is more careful to return an integer (as opposed to double) result when its arguments are large and/or classed objects; see comment #9 of Suharto Anggono's PR#17497.
  • The plot() method for lm and glm fits, plot.lm(), gains a new option iter.smooth with a default of 0 for binomial fits, no longer down-weighting when smoothing the residuals.
  • zip() passes its list of files _via_ standard input to the external command when too long for the command line (on some platforms).
  • data() gains an overwrite argument.
  • t.test() now also returns the standard error (in list component stderr).
  • model.matrix(*, contrasts.arg = CC) now warns about invalid contrasts.args.
  • Performance of substr() and substring() has been improved.
  • stopifnot() has been simplified thanks to Suharto Anggono's proposals to become considerably faster for cheap expressions.
  • The default 'user agent' has been changed when accessing http:// and https:// sites using libcurl. (A site was found which caused libcurl to infinite-loop with the previous default.)
  • sessionInfo() now also contains RNGkind() and prints it when it differs from the default; based on a proposal and patch by Gabe Becker in PR#17535. Also, RNGversion(getRversion()) works directly.
  • library() and require() now allow more control over handling search path conflicts when packages are attached. The policy is controlled by the new conflicts.policy option.
  • barplot() gets a formula method, thanks to a patch proposal by Arni Magnusson in PR#17521.
  • pmax() and pmin(x) now also work for long vectors, thanks to Suharto Anggono's PR#17533.
  • bxp() now warns when omitting duplicated arguments.
  • New hcl.colors() function to provide wide range of HCL-based colour palettes with much better perceptual properties than the existing RGB/HSV-based palettes like rainbow(). Also a new hcl.pals() function to list available palette names for hcl.colors(). Contributed by Achim Zeileis.
  • The default colours for image() and filled.contour() are now based on hcl.colors().
  • The palette-generating functions rainbow(), gray.colors(), etc. get a new rev argument to facilitate reversing the order of colors.
  • New str2lang() and str2expression() as streamlined versions of parse(text=., keep.source=FALSE) allow to abstract typical call constructions, e.g., in formula manipulations. (Somewhat experimental)
  • Add update_PACKAGES() for incrementally updating a package repository index, instead of rebuilding the index from scratch.
  • Thanks to Gabe Becker in PR#17544 for the patch, based on part of his switchr package.

New in R Portable 3.5.3 (Mar 19, 2019)

  • PACKAGE INSTALLATION:
  • New macro F_VISIBILITY as an alternative to F77_VISIBILITY. This will become the preferred form in R 3.6.0.
  • BUG FIXES:
  • writeLines(readLines(fnam), fnam) now works as expected, thanks to Peter Meissner's PR#17528.
  • setClassUnion() no longer warns, but uses message() for now, when encountering "non local" subclasses of class members.
  • stopifnot(exprs = T) no longer fails.

New in R Portable 3.5.2 (Dec 24, 2018)

  • PACKAGE INSTALLATION:
  • New macro CXX_VISIBILITY analogous to C_VISIBILITY (which several packages have been misusing for C++ code) for the default C++ compiler (but not necessarily one used for non-default C++ dialects like C++14).
  • TESTING:
  • The random number generator tests in tests/p-r-random-tests.R no longer fail occasionally as they now randomly sample from "certified" random seeds.
  • BUG FIXES:
  • The "glm" method of drop1() miscalculated the score test (test="Rao") when the model contained an offset.
  • Linear multiple empty models such as lm(y ~ 0) now have a correctly dimensioned empty coefficient matrix; reported by Brett Presnell.
  • vcov() and hence confint() now work (via a consistency change in summary.lm()).
  • confint(<multiple lm()>) now works correctly; reported on R-devel by Steven Pav.
  • quade.test() now also works correctly when its arguments are not yet sorted along groups, fixing PR#15842.
  • Installation on a Unix-alike tries harder to link to the pthread library where required (rather than relying on OpenMP to provide it: configuring with --disable-openmp was failing on some Linux systems).
  • The data.frame method for print(x) is fast now also for large data frames x and got an optional argument max, thanks to suggestions by Juan Telleria.
  • hist() no longer integer overflows in very rare cases, fixing PR#17450.
  • untar() ignored a character compressed argument: however many external tar programs ignore the flags which should have been set and automagically choose the compression type, and if appropriate gzip or bzip2 compression would have been chosen from the magic header of the tarball.
  • zapsmall(x) now works for more "number-like" objects.
  • The tools-internal function called from R CMD INSTALL now gets a warnOption = 1 argument and only sets options(warn = warnOption) when that increases the warning level (PR#17453).
  • Analogously, the tools-internal function called from R CMD check gets a warnOption = 1 argument and uses the larger of that and getOption("warn"), also allowing to be run with increased warning level.
  • Parse data now have deterministic parent nodes (PR#16041).
  • Calling match() with length one x and POSIXlt table gave a segfault (PR#17459).
  • Fork clusters could hang due to a race condition in cluster initialization (makeCluster()).
  • nextn(n) now also works for larger n and no longer loops infinitely for e.g, n <- 214e7.
  • cooks.distance() and rstandard() now work correctly for multiple linear models ("mlm").
  • polym() and corresponding lm() prediction now also work for a boundary "vector" case fixing PR#17474, reported by Alexandre Courtiol.
  • With a very large number of variables terms() could segfault (PR#17480).
  • cut(rep(0, 7)) now works, thanks to Joey Reid and Benjamin Tyner (PR#16802).
  • download.file(*, method = "curl", cacheOK = FALSE) should work now on Windows, thanks to Kevin Ushey's patch in PR#17323.
  • duplicated() now works, too, thanks to Andreas Kersting's PR#17485; ditto for anyDuplicated().
  • legend(*, cex = 1:2) now works less badly.
  • The print() method for POSIXct and POSIXlt now correctly obeys getOption("max.print"), fixing a long-standing typo, and it also gets a corresponding optional max argument.
  • Unserialization of raw vectors serialized in ASCII representation now works correctly.
  • [TRUE, ] <- list(c1, c2) now works correctly thanks to Suharto Anggono's PR#15362 and Emil Bode's patch in PR#17504.
  • seq.int(*, by=by, length=n) no longer wrongly "drops fractional parts" when by is integer, thanks to Suharto Anggono's report PR#17506.
  • Buffering is disabled for file() connections to non-regular files (like sockets), as well as fifo() and pipe() connections. Fixes PR#17470, reported by Chris Culnane.

New in R Portable 3.5.1 (Jul 8, 2018)

  • BUG FIXES:
  • file("stdin") is no longer considered seekable.
  • dput() and dump() are no longer truncating when options(deparse.max.lines = *) is set.
  • Calls with an S3 class are no longer evaluated when printed, fixing part of PR#17398, thanks to a patch from Lionel Henry.
  • Allow file argument of Rscript to include space even when it is first on the command line.
  • callNextMethod() uses the generic from the environment of the calling method. Reported by Herv'e Pag`es with well documented examples.
  • Compressed file connections are marked as blocking.
  • optim(*, lower = c(-Inf, -Inf)) no longer warns (and switches the method), thanks to a suggestion by John Nash.
  • predict(fm, newdata) is now correct also for models where the formula has terms such as splines::ns(..) or stats::poly(..), fixing PR#17414, based on a patch from Duncan Murdoch.
  • simulate.lm(glm(*, gaussian(link = <non-default>))) has been corrected, fixing PR#17415 thanks to Alex Courtiol.
  • unlist(x) no longer fails in some cases of nested empty lists. Reported by Steven Nydick.
  • qr.coef(qr(<all 0, w/ colnames>)) now works. Reported by Kun Ren.
  • The radix sort is robust to vectors with >1 billion elements (but long vectors are still unsupported). Thanks to Matt Dowle for the fix.
  • Terminal connections (e.g., stdin) are no longer buffered. Fixes PR#17432.
  • deparse(x), dput(x) and dump() now respect c()'s argument names recursive and use.names, e.g., for x <- setNames(0, "recursive"), thanks to Suharto Anggono's PR#17427.
  • Unbuffered connections now work with encoding conversion. Reported by Stephen Berman.
  • Renviron on Windows with Rgui is again by default searched for in user documents directory when invoked via the launcher icon. Reported by Jeroen Ooms.
  • printCoefmat() now also works with explicit right=TRUE.
  • print.noquote() now also works with explicit quote=FALSE.
  • The default method for pairs(.., horInd=, verInd=) now gets the correct order, thanks to reports by Chris Andrews and Gerrit Eichner. Additionally, when horInd or verInd contain only a subset of variables, all the axes are labeled correctly now.
  • agrep("..|..", .., fixed=FALSE) now matches when it should, thanks to a reminder by Andreas Kolter.
  • str(ch) now works for more invalid multibyte strings.

New in R Portable 3.5.0 (May 15, 2018)

  • SIGNIFICANT USER-VISIBLE CHANGES:
  • All packages are by default byte-compiled on installation. This makes the installed packages larger (usually marginally so) andmay affect the format of messages and tracebacks (which oftenexclude .Call and similar).
  • NEW FEATURES:
  • factor() now uses order() to sort its levels, rather thansort.list(). This allows factor() to support custom vector-likeobjects if methods for the appropriate generics are defined. Ithas the side effect of making factor() succeed on empty orlength-one non-atomic vector(-like) types (e.g., "list"), whereit failed before.
  • diag() gets an optional names argument: this may require updatesto packages defining S4 methods for it.
  • chooseCRANmirror() and chooseBioCmirror() no longer have a use HTTPS argument, not needed now all R builds support https://downloads.
  • New summary() method for warnings() with a (somewhatexperimental) print() method.
  • methods package.) .self is now automatically registered as aglobal variable when registering a reference class method.
  • tempdir(check = TRUE) recreates the tempdir() directory if it isno longer valid (e.g. because some other process has cleaned upthe /tmp directory).
  • New askYesNo() function and "askYesNo" option to ask the userbinary response questions in a customizable but consistent way.(Suggestion of PR#17242.)
  • New low level utilities ...elt(n) and ...length() for workingwith ... parts inside a function.
  • isTRUE() is more tolerant and now true in x <- rlnorm(99) isTRUE(median(x) == quantile(x)["50%"]) New function isFALSE() defined analogously to isTRUE().
  • The default symbol table size has been increased from 4119 to49157; this may improve the performance of symbol resolution whenmany packages are loaded. (Suggested by Jim Hester.)
  • line() gets a new option iter = 1.
  • Reading from connections in text mode is buffered, significantlyimproving the performance of readLines(), as well as scan() andread.table(), at least when specifying colClasses.
  • order() is smarter about picking a default sort method when itsarguments are objects.
  • available.packages() has two new arguments which control if thevalues from the per-session repository cache are used (defaulttrue, as before) and if so how old cached values can be to beused (default one hour). These arguments can be passed from install.packages(),update.packages() and functions calling that: to enable thisavailable.packages(), packageStatus() and download.file() gain a... argument.
  • packageStatus()'s upgrade() method no longer ignores its ...argument but passes it to install.packages().
  • installed.packages() gains a ... argument to allow arguments(including noCache) to be passed from new.packages(),old.packages(), update.packages() and packageStatus().
  • factor(x, levels, labels) now allows duplicated labels (notduplicated levels!). Hence you can map different values of x tothe same level directly.
  • Attempting to use names<-() on an S4 derivative of a basic typeno longer emits a warning.
  • The list method of within() gains an option keepAttrs = FALSE forsome speed-up.
  • system() and system2() now allow the specification of a maximumelapsed time ('timeout').
  • debug() supports debugging of methods on any object of S4 class"genericFunction", including group generics.
  • Attempting to increase the length of a variable containing NULLusing length()<- still has no effect on the target variable, butnow triggers a warning.
  • type.convert() becomes a generic function, with additionalmethods that operate recursively over list and data.frameobjects. Courtesy of Arni Magnusson (PR#17269).
  • lower.tri(x) and upper.tri(x) only needing dim(x) now work vianew functions .row() and .col(), so no longer call as.matrix() bydefault in order to work efficiently for all kind of matrix-likeobjects.
  • print() methods for "xgettext" and "xngettext" now useencodeString() which keeps, e.g. "n", visible. (Wish ofPR#17298.)
  • package.skeleton() gains an optional encoding argument.
  • approx(), spline(), splinefun() and approxfun() also work forlong vectors.
  • deparse() and dump() are more useful for S4 objects, dput() nowusing the same internal C code instead of its previous imperfectworkaround R code. S4 objects now typically deparse perfectly,i.e., can be recreated identically from deparsed code.dput(), deparse() and dump() now print the names() informationonly once, using the more readable (tag = value) syntax, notablyfor list()s, i.e., including data frames. These functions gain a new control option "niceNames" (see.deparseOpts()), which when set (as by default) also uses the(tag = value) syntax for atomic vectors. On the other hand,without deparse options "showAttributes" and "niceNames", namesare no longer shown also for lists. as.character(list( c (one =1))) now includes the name, as as.character(list(list(one = 1)))has always done. m:n now also deparses nicely when m > n. The "quoteExpressions" option, also part of "all", no longerquote()s formulas as that may not re-parse identically.(PR#17378)
  • If the option setWidthOnResize is set and TRUE, R run in aterminal using a recent readline library will set the widthoption when the terminal is resized. Suggested by Ralf Goertz.
  • If multiple on.exit() expressions are set using add = TRUE thenall expressions will now be run even if one signals an error.
  • mclapply() gets an option affinity.list which allows moreefficient execution with heterogeneous processors, thanks toHelena Kotthaus.
  • The character methods for as.Date() and as.POSIXlt() are moreflexible via new arguments tryFormats and optional: see theirhelp pages.
  • on.exit() gains an optional argument after with default TRUE.Using after = FALSE with add = TRUE adds an exit expressionbefore any existing ones. This way the expressions are run in afirst-in last-out fashion. (From Lionel Henry.)
  • On Windows, file.rename() internally retries the operation incase of error to attempt to recover from possible anti-virusinterference.
  • Command line completion on :: now also includes lazy-loaded data.
  • If the TZ environment variable is set when date-time functionsare first used, it is recorded as the session default and so willbe used rather than the default deduced from the OS if TZ issubsequently unset.
  • There is now a [ method for class "DLLInfoList".
  • glm() and glm.fit get the same singular.ok = TRUE argument thatlm() has had forever. As a consequence, in glm(*, method =<your_own>), user specified methods need to accept a singular.okargument as well.
  • aspell() gains a filter for Markdown (.md and .Rmd) files.
  • intToUtf8(multiple = FALSE) gains an argument to allow surrogatepairs to be interpreted.
  • The maximum number of DLLs that can be loaded into R e.g. _via_dyn.load() has been increased up to 614 when the OS limit on thenumber of open files allows.
  • Sys.timezone() on a Unix-alike caches the value at first use in asession: inter alia this means that setting TZ later in thesession affects only the current time zone and not the _system_one.Sys.timezone() is now used to find the system timezone to pass tothe code used when R is configured with --with-internal-tzcode
  • When tar() is used with an external command which is detected tobe GNU tar or libarchive tar (aka bsdtar), a differentcommand-line is generated to circumvent line-length limits in theshell.
  • system(*, intern = FALSE), system2() (when not capturing output),file.edit() and file.show() now issue a warning when the externalcommand cannot be executed.
  • The "default" ("lm" etc) methods of vcov() have gained newoptional argument complete = TRUE which makes the vcov() methodsmore consistent with the coef() methods in the case of singulardesigns. The former (back-compatible) behavior is given byvcov(*, complete = FALSE).
  • coef() methods (for lm etc) also gain a complete = TRUE optionalargument for consistency with vcov().For "aov", both coef() and vcov() methods remain back-compatiblyconsistent, using the other default, complete = FALSE.
  • attach(*, pos = 1) is now an error instead of a warning.
  • New function getDefaultCluster() in package parallel to get thedefault cluster set via setDefaultCluster().
  • str(x) for atomic objects x now treats both cases of is.vector(x)similarly, and hence much less often prints "atomic". This is aslight non-back-compatible change producing typically both moreinformative and shorter output.
  • write.dcf() gets optional argument useBytes.
  • New, partly experimental packageDate() which tries to get a valid"Date" object from a package DESCRIPTION file, thanks tosuggestions in PR#17324.
  • tools::resaveRdaFiles() gains a version argument, for use whenpackages should remain compatible with earlier versions of R.
  • ar.yw(x) and hence by default ar(x) now work when x has NAs,mostly thanks to a patch by Pavel Krivitsky in PR#17366. Thear.yw.default()'s AIC computations have become more efficient byusing determinant().
  • New warnErrList() utility (from package nlme, improved).
  • By default the (arbitrary) signs of the loadings from princomp()are chosen so the first element is non-negative.
  • If --default-packages is not used, then Rscript now checks theenvironment variable R_SCRIPT_DEFAULT_PACKAGES. If this is set,then it takes precedence over R_DEFAULT_PACKAGES. If defaultpackages are not specified on the command line or by one of theseenvironment variables, then Rscript now uses the same defaultpackages as R. For now, the previous behavior of not includingmethods can be restored by setting the environment variableR_SCRIPT_LEGACY to yes.
  • When a package is found more than once, the warning fromfind.package(*, verbose=TRUE) lists all library locations.
  • POSIXt objects can now also be rounded or truncated to month oryear.
  • stopifnot() can be used alternatively via new argument exprswhich is nicer and useful when testing several expressions in onecall.
  • The environment variable R_MAX_VSIZE can now be used to specifythe maximal vector heap size. On macOS, unless specified by thisenvironment variable, the maximal vector heap size is set to themaximum of 16GB and the available physical memory. This is toavoid having the R process killed when macOS over-commits memory.
  • sum(x) and sum(x1,x2,..,x<N>) with many or long logical orinteger vectors no longer overflows (and returns NA with awarning), but returns double numbers in such cases.
  • Single components of "POSIXlt" objects can now be extracted andreplaced via [ indexing with 2 indices.
  • S3 method lookup now searches the namespace registry after thetop level environment of the calling environment.
  • Arithmetic sequences created by 1:n, seq_along, and the like nowuse compact internal representations via the ALTREP framework.Coercing integer and numeric vectors to character also now usesthe ALTREP framework to defer the actual conversion until firstuse.
  • Finalizers are now run with interrupts suspended.
  • merge() gains new option no.dups and by default suffixes thesecond of two duplicated column names, thanks to a proposal byScott Ritchie (and Gabe Becker).
  • scale.default(x, center, scale) now also allows center or scaleto be "numeric-alike", i.e., such that as.numeric(.) coerces themcorrectly. This also eliminates a wrong error message in suchcases.
  • parapply and parapplyLB gain an optional argument chunk.sizewhich allows to specify the granularity of scheduling.
  • Some as.data.frame() methods, notably the matrix one, are nowmore careful in not accepting duplicated or NA row names, and bydefault produce unique non-NA row names. This is based on newfunction .rowNamesDF(x, make.names = *) <- rNms where the logicalargument make.names allows to specify how invalid row namesrNms are handled. .rowNamesDF() is a "workaround" compatibledefault.
  • R has new serialization format (version 3) which supports customserialization of ALTREP framework objects. These objects canstill be serialized in format 2, but less efficiently.Serialization format 3 also records the current native encodingof unflagged strings and converts them when de-serialized in Rrunning under different native encoding. Format 3 comes with newserialization magic numbers (RDA3, RDB3, RDX3). Format 3 can beselected by version = 3 in save(), serialize() and saveRDS(), butformat 2 remains the default for all serialization and saving ofthe workspace. Serialized data in format 3 cannot be read byversions of R prior to version 3.5.0.
  • The "Date" and "date-time" classes "POSIXlt" and "POSIXct" nowhave a working length<- method, as wished in PR#17387.
  • optim(*, control = list(warn.1d.NelderMead = FALSE)) allows toturn off the warning when applying the default "Nelder-Mead"method to 1-dimensional problems.
  • matplot(.., panel.first = .) etc now work, as log becomesexplicit argument and ... is passed to plot() unevaluated, assuggested by Sebastian Meyer in PR#17386.
  • Interrupts can be suspended while evaluating an expression usingsuspendInterrupts. Subexpression can be evaluated withinterrupts enabled using allowInterrupts. These functions can beused to make sure cleanup handlers cannot be interrupted.
  • R 3.5.0 includes a framework that allows packages to providealternate representations of basic R objects (ALTREP). Theframework is still experimental and may undergo changes in futureR releases as more experience is gained. For now, documentationis provided in <URL:https://svn.r-project.org/R/branches/ALTREP/ALTREP.html>.
  • UTILITIES:
  • install.packages() for source packages now has the possibility toset a 'timeout' (elapsed-time limit). For serial installs thisuses the timeout argument of system2(): for parallel installs itrequires the timeout utility command from GNU coreutils.
  • It is now possible to set 'timeouts' (elapsed-time limits) formost parts of R CMD check via environment variables documentedin the 'R Internals' manual.
  • The 'BioC extra' repository which was dropped from Bioconductor3.6 and later has been removed from setRepositories(). Thischanges the mapping for 6-8 used by setRepositories(ind=).
  • R CMD check now also applies the settings of environmentvariables R_CHECK_SUGGESTS_ONLY and R_CHECK_DEPENDS_ONLY tothe re-building of vignettes.
  • R CMD check with environment variable R_CHECK_DEPENDS_ONLY setto a true value makes test-suite-management packages availableand (for the time being) works around a common omission ofrmarkdown from the VignetteBuilder field.
  • INSTALLATION on a UNIX-ALIKE:
  • Support for a system Java on macOS has been removed - install afairly recent Oracle Java (see 'R Installation andAdministration' SSC.3.2).
  • configure works harder to set additional flags in SAFE_FFLAGSonly where necessary, and to use flags which have little or noeffect on performance. In rare circumstances it may be necessary to override the settingof SAFE_FFLAGS.
  • C99 functions expm1, hypot, log1p and nearbyint are now required.
  • configure sets a -std flag for the C++ compiler for all supportedC++ standards (e.g., -std=gnu++11 for the C++11 compiler).Previously this was not done in a few cases where the defaultstandard passed the tests made (e.g. clang 6.0.0 for C++11).
  • C-LEVEL FACILITIES:
  • Writing R Extensions' documents macros MAYBE_REFERENCED,MAYBE_SHARED and MARK_NOT_MUTABLE that should be used by packageC code instead NAMED or SET_NAMED.
  • The object header layout has been changed to support merging theALTREP branch. This requires re-installing packages that usecompiled code.
  • Writing R Extensions' now documents the R_tryCatch,R_tryCatchError, and R_UnwindProtect functions.
  • NAMEDMAX has been raised to 3 to allow protection of intermediateresults from (usually ill-advised) assignments in arguments toBUILTIN functions. Package C code using SET_NAMED may need to berevised.
  • DEPRECATED AND DEFUNCT:
  • Sys.timezone(location = FALSE) is defunct, and is ignored (with awarning).
  • methods:::bind_activation() is defunct now; it typically has beenunneeded for years.The undocumented 'hidden' objects .H.cbind and .H.rbindin package base are deprecated (in favour of cbind and rbind).
  • The declaration of pythag() in Rmath.h has been removed - theentry point has not been provided since R 2.14.0.
  • BUG FIXES:
  • printCoefmat() now also works without column names.
  • The S4 methods on Ops() for the "structure" class no longer causeinfinite recursion when the structure is not an S4 object.
  • nlm(f, ..) for the case where f() has a "hessian" attribute nowcomputes LL' = H + uI correctly. (PR#17249).
  • An S4 method that "rematches" to its generic and overrides thedefault value of a generic formal argument to NULL no longerdrops the argument from its formals.
  • Rscript can now accept more than one argument given on the #!line of a script. Previously, one could only pass a singleargument on the #! line in Linux.
  • Connections are now written correctly with encoding "UTF-16LE".(PR#16737).
  • Evaluation of ..0 now signals an error. When ..1 is used and ...is empty, the error message is more appropriate.
  • Windows mainly.) Unicode code points which require surrogatepairs in UTF-16 are now handled. All systems should properlyhandle surrogate pairs, even those systems that do not need tomake use of them. (PR#16098)
  • stopifnot(e, e2, ...) now evaluates the expressions sequentiallyand in case of an error or warning shows the relevant expressioninstead of the full stopifnot(..) call.
  • path.expand() on Windows now accepts paths specified asUTF-8-encoded character strings even if not representable in thecurrent locale. (PR#17120)
  • line(x, y) now correctly computes the medians of the left andright group's x-values and in all cases reproduces straightlines.
  • Extending S4 classes with slots corresponding to specialattributes like dim and dimnames now works.
  • Fix for legend() when fill has multiple values the first of whichis NA (all colours used to default to par(fg)). (PR#17288)
  • installed.packages() did not remove the cached value for alibrary tree that had been emptied (but would not use the oldvalue, just waste time checking it).
  • The documentation for installed.packages(noCache = TRUE)incorrectly claimed it would refresh the cache.
  • aggregate(<data.frame>) no longer uses spurious names in somecases. (PR#17283)
  • object.size() now also works for long vectors.
  • packageDescription() tries harder to solve re-encoding issues,notably seen in some Windows locales. This fixes the citation()issue in PR#17291.
  • poly(<matrix>, 3) now works, thanks to prompting by MarcSchwartz.
  • readLines() no longer segfaults on very large files with embedded'' (aka 'nul') characters. (PR#17311)
  • ns() (package splines) now also works for a single observation.interpSpline() gives a more friendly error message when thenumber of points is less than four.
  • dist(x, method = "canberra") now uses the correct definition; theresult may only differ when x contains values of differing signs,e.g. not for 0-1 data.
  • methods:::cbind() and methods:::rbind() avoid deep recursion,thanks to Suharto Anggono via PR#17300.
  • Arithmetic with zero-column data frames now works moreconsistently; issue raised by Bill Dunlap. Arithmetic with data frames gives a data frame for ^ (whichpreviously gave a numeric matrix).
  • pretty(x, n) for large n or large diff(range(x)) now works better(though it was never meant for large n); internally it uses thesame rounding fuzz (1e-10) as seq.default() - as it did up to2010-02-03 when both were 1e-7.
  • Internal C-level R_check_class_and_super() and henceR_check_class_etc() now also consider non-direct super classesand hence return a match in more cases. This e.g., fixesbehaviour of derived classes in package Matrix.
  • Reverted unintended change in behavior of return calls in on.exitexpressions introduced by stack unwinding changes in R 3.3.0.
  • Attributes on symbols are now detected and prevented; attempt toadd an attribute to a symbol results in an error.
  • fisher.test(*, workspace = <n>) now may also increase theinternal stack size which allows larger problem to be solved,fixing PR#1662.
  • The methods package no longer directly copies slots (attributes)into a prototype that is of an "abnormal" (reference) type, likea symbol.
  • The methods package no longer attempts to call length<-() on NULL(during the bootstrap process).
  • The methods package correctly shows methods when there aremultiple methods with the same signature for the same generic(still not fully supported, but at least the user can see them).
  • sys.on.exit() is now always evaluated in the right frame. (FromLionel Henry.)
  • seq.POSIXt(*, by = "<n> DSTdays") now should work correctly inall cases and is faster. (PR#17342)
  • C() when returning a logical vector now always maps values otherthan FALSE and NA to TRUE (as documented).
  • Subassignment with zero length vectors now coerces as documented(PR#17344).Further, x <- numeric(); x[1] <- character() now signals an error'replacement has length zero' (or a translation of that) insteadof doing nothing.
  • Package parallel.) mclapply(), pvec() and mcparallel() (whenmccollect() is used to collect results) no longer leave zombieprocesses behind.
  • R CMD INSTALL <pkg> now produces the intended error message when,e.g., the LazyData field is invalid.
  • as.matrix(dd) now works when the data frame dd contains a columnwhich is a data frame or matrix, including a 0-column matrix/d.f..
  • mclapply(X, mc.cores) now follows its documentation and callslapply() in case mc.cores = 1 also in the case mc.preschedule isfalse. (PR#17373)
  • aggregate(<data.frame>, drop=FALSE) no longer calls the functionon <empty> parts but sets corresponding results to NA. (Thanksto Suharto Anggono's patches in PR#17280).
  • The duplicated() method for data frames is now based on the listmethod (instead of string coercion). Consequently unique() isbetter distinguishing data frame rows, fixing PR#17369 andPR#17381. The methods for matrices and arrays are changedaccordingly.
  • Calling names() on an S4 object derived from "environment"behaves (by default) like calling names() on an ordinaryenvironment.
  • read.table() with a non-default separator now supports quotesfollowing a non-whitespace character, matching the behavior ofscan().
  • parLapplyLB and parSapplyLB have been fixed to do load balancing(dynamic scheduling). This also means that results ofcomputations depending on random number generators will nowreally be non-reproducible, as documented.
  • Indexing a list using dollar and empty string (l$"") returnsNULL.
  • Using usage{ data(<name>, package="<pkg>") } no longer producesR CMD check warnings.
  • match.arg() more carefully chooses the environment forconstructing default choices, fixing PR#17401 as proposed byDuncan Murdoch.
  • Deparsing of consecutive ! calls is now consistent with deparsingunary - and + calls and creates code that can be reparsedexactly; thanks to a patch by Lionel Henry in PR#17397. (As aside effect, this uses fewer parentheses in some other deparsinginvolving ! calls.)

New in R Portable 3.4.4 (Apr 3, 2018)

  • NEW FEATURES:
  • Sys.timezone() tries more heuristics on Unix-alikes and so is more likely to succeed (especially on Linux). For the slowest method, a warning is given recommending that TZ is set to avoid the search.
  • The version of LAPACK included in the sources has been updated to 3.8.0 (for the routines used by R, a very minor bug-fix change).
  • Parallel::detectCores(logical = FALSE) is ignored on Linux systems, since the information is not available with virtualized OSes.
  • INSTALLATION on a UNIX-ALIKE:
  • Configure will use pkg-config to find the flags to link to jpeg if available (as it should be for the recently-released jpeg-9c and libjpeg-turbo). (This amends the code added in R 3.3.0 as the module name in jpeg-9c is not what that tested for.)
  • DEPRECATED AND DEFUNCT:
  • Sys.timezone(location = FALSE) (which was a stop-gap measure for Windows long ago) is deprecated. It no longer returns the value of environment variable TZ (usually a location).
  • Legacy support of make macros such as CXX1X is formally deprecated: use the CXX11 forms instead.
  • BUG FIXES:
  • Power.prop.test() now warns when it cannot solve the problem, typically because of impossible constraints. (PR#17345)
  • RemoveSource() no longer erroneously removes NULL in certain cases, thanks to D'enes T'oth.
  • Nls(`NO [mol/l]` ~ f(t)) and nls(y ~ a) now work. (Partly from PR#17367)
  • R CMD build checks for GNU cp rather than assuming Linux has it. (PR#17370 says 'Alpine Linux' does not.)
  • Non-UTF-8 multibyte character handling fixed more permanently (PR#16732).
  • Sum(<large ints>, <stuff>) is more consistent. (PR#17372)
  • Rf() and rbeta() now also work correctly when ncp is not scalar, notably when (partly) NA. (PR#17375)
  • R CMD INSTALL now correctly sets C++ compiler flags when all source files are in sub-directories of src.

New in R Portable 3.4.3 (Dec 8, 2017)

  • CHANGES:
  • INSTALLATION on a UNIX-ALIKE:
  • A workaround has been added for the changes in location of time-zone files in macOS 10.13 'High Sierra' and again in 10.13.1, so the default time zone is deduced correctly from the system setting when R is configured with --with-internal-tzcode (the default on macOS).
  • R CMD javareconf has been updated to recognize the use of a Java 9 SDK on macOS.
  • BUG FIXES:
  • raw(0) & raw(0) and raw(0) | raw(0) again return raw(0) (rather than logical(0)).
  • intToUtf8() converts integers corresponding to surrogate code points to NA rather than invalid UTF-8, as well as values larger than the current Unicode maximum of 0x10FFFF. (This aligns with the current RFC3629.)
  • Fix calling of methods on S4 generics that dispatch on ... when the call contains ....
  • Following Unicode 'Corrigendum 9', the UTF-8 representations of U+FFFE and U+FFFF are now regarded as valid by utf8ToInt().
  • range(c(TRUE, NA), finite = TRUE) and similar no longer return NA. (Reported by Lukas Stadler.)
  • The self starting function attr(SSlogis, "initial") now also works when the y values have exact minimum zero and is slightly changed in general, behaving symmetrically in the y range.
  • The printing of named raw vectors is now formatted nicely as for other such atomic vectors, thanks to Lukas Stadler.

New in R Portable 3.4.2 (Oct 2, 2017)

  • NEW FEATURES:
  • Setting the LC_ALL category in Sys.setlocale() invalidates any cached locale-specific day/month names and the AM/PM indicator for strptime() (as setting LC_TIME has since R 3.1.0).
  • The version of LAPACK included in the sources has been updated to3.7.1, a bug-fix release.
  • The default for tools::write_PACKAGES(rds_compress=) has been changed to "xz" to match the compression used by CRAN.
  • c() and unlist() are now more efficient in constructing thenames(.) of their return value, thanks to a proposal by Suharto Anggono. (PR#17284)
  • UTILITIES:
  • R CMD check checks for and R CMD build corrects CRLF line endings in shell scripts configure and cleanup (even on Windows).
  • INSTALLATION on a UNIX-ALIKE:
  • The order of selection of OpenMP flags has been changed: Oracle
  • Developer Studio 12.5 accepts -fopenmp and -xopenmp but only the
  • latter enables OpenMP so it is now tried first.
  • BUG FIXES:
  • within(List, rm(x1, x2)) works correctly again, including when List[["x2"]] is NULL.
  • regexec(pattern, text, *) now applies as.character(.) to its first two arguments, as documented.
  • write.table() and related functions, writeLines(), and perhaps other functions writing text to connections did not signal errors when the writes failed, e.g. due to a disk being full. Errors will now be signalled if detected during the write, warnings if detected when the connection is closed. (PR#17243)
  • rt() assumed the ncp parameter was a scalar. (PR#17306)
  • menu(choices) with more than 10 choices which easily fit into one getOption("width")-line no longer erroneously repeats choices. (PR#17312)
  • length()<- on a pairlist succeeds. (<URL: https://stat.ethz.ch/pipermail/r-devel/2017-July/074680.html>)
  • Language objects such as quote(("n")) or R functions are correctly printed again, where R 3.4.1 accidentally duplicated the backslashes.
  • Construction of names() for very large objects in c() and unlist() now works, thanks to Suharto Anggono's patch proposals in PR#17292.
  • Resource leaks (and similar) reported by Steve Grubb fixed. (PR#17314, PR#17316, PR#17317, PR#17318, PR#17319, PR#17320)
  • model.matrix(~1, mf) now gets the row names from mf also when they differ from 1:nrow(mf), fixing PR#14992 thanks to the suggestion by Sebastian Meyer.
  • sigma(fm) now takes the correct denominator degrees of freedom for a fitted model with NA coefficients. (PR#17313)
  • hist(x, "FD") no longer "dies" with a somewhat cryptic error message when x has extreme outliers or IQR() zero: nclass.FD(x) tries harder to find a robust bin width h in the latter case, and hist.default(*, breaks) now checks and corrects a too large breaks number. (PR#17274)
  • callNextMethod() works for ... methods.
  • qr.coef(qd, y) now has correct names also when qd is a complex QRor stems from qr(*, LAPACK=TRUE).
  • Setting options(device = *) to an invalid function no longer segfaults when plotting is initiated. (PR#15883)
  • encodeString(<very large string>) no longer segfaults.(PR#15885)
  • It is again possible to use configure --enable-maintainer-mode without having installed notangle (it was required in R 3.4.[01]).
  • S4 method dispatch on ... calls the method by name instead of.Method (for consistency with default dispatch), and only attempts to pass non-missing arguments from the generic.
  • readRDS(textConnection(.)) works again. (PR#17325)
  • (1:n)[-n] no longer segfaults for n <- 2.2e9 (on a platform withenough RAM).
  • x <- 1:2; tapply(x, list(x, x), function(x) "")[1,2] nowcorrectly returns NA. (PR#17333)
  • Running of finalizers after explicit GC request moved from the Rinterface do_gc to the C interface R_gc. This helps with reclaiming inaccessible connections.
  • help.search(topic) and ??topic matching topics in vignettes with multiple file name extensions (e.g., *.md.rsp but not *.Rmd) failed with an error when using options(help_type = "html").
  • The X11 device no longer uses the Xlib backing store (PR#16497).
  • array(character(), 1) now gives (a 1D array with) NA as has been documented for a long time as in the other cases of zero-length array initialization and also compatibly with matrix(character(),*). As mentioned there, this also fixes PR#17333.
  • splineDesign(.., derivs = 4) no longer segfaults.
  • fisher.test(*, hybrid=TRUE) now (again) will use the hybrid method when Cochran's conditions are met, fixing PR#16654.

New in R Portable 3.4.1 (Jul 3, 2017)

  • BUG FIXES:
  • getParseData() gave incorrect column information when code contained multibyte characters
  • readRDS(url(....)) now works
  • R CMD Sweave again returns status = 0 on successful completion
  • Vignettes listed in .Rbuildignore were not being ignored properly
  • file.mtime() no longer returns NA on Windows when the file or directory is being used by another process. This affected installed.packages(), which is now protected against this
  • R CMD INSTALL Windows .zip file obeys --lock and --pkglock flags
  • (Windows only) The choose.files() function could return incorrect results when called with multi = FALSE
  • aggregate(<data.frame>, drop = FALSE) now also works in case of near-equal numbers in by
  • aggregate(<data.frame>, drop = FALSE) now also works in case of near-equal numbers in by
  • parse() no longer gives spurious warnings when extracting srcrefs from a file not encoded in the current locale
  • print.noquote(x) now always returns its argument x (invisibly)
  • Non-UTF-8 multibyte character sets were not handled properly in source references

New in R Portable 3.3.3 (Mar 14, 2017)

  • Changes when redirection of a http:// URL to a https:// URL is encountered:
  • The internal methods of download.file() and url() now report that they cannot follow this (rather than failing silently).
  • (Unix-alike) download.file(method = "auto") (the default) re-tries with method = "libcurl".
  • (Unix-alike) url(method = "default") with an explicit open argument re-tries with method = "libcurl". This covers many of the usages, e.g. readLines() with a URL argument.

New in R Portable 3.3.2 (Nov 2, 2016)

  • extSoftVersion() now reports the version (if any) of the readline library in use.
  • The version of LAPACK included in the sources has been updated to 3.6.1, a bug-fix release including a speedup for the non-symmetric case of eigen().
  • Use options(deparse.max.lines=) to limit the number of lines recorded in .Traceback and other deparsing activities.
  • format() looks more regular, also for non-character atomic matrices.
  • abbreviate() gains an option named = TRUE.
  • The online documentation for package methods is extensively rewritten. The goals are to simplify documentation for basic use, to note old features not recommended and to correct out-of-date information.
  • Calls to setMethod() no longer print a message when creating a generic function in those cases where that is natural: S3 generics and primitives.

New in R Portable 3.3.1 (Oct 4, 2016)

  • BUG FIXES:
  • R CMD INSTALL and hence install.packages() gave an internal error installing a package called description from a tarball on a case-insensitive file system.
  • match(x, t) (and hence x %in% t) failed when x was of length one, and either character and x and t only differed in their Encoding or when x and t where complex with NAs or NaNs. (PR#16885.)
  • unloadNamespace(ns) also works again when ns is a 'namespace', as from getNamespace().
  • rgamma(1,Inf) or rgamma(1, 0,0) no longer give NaN but the correct limit.
  • length(baseenv()) is correct now.
  • pretty(d, ..) for date-time d rarely failed when "halfmonth" time steps were tried (PR#16923) and on 'inaccurate' platforms such as 32-bit windows or a configuration with --disable-long-double; see comment #15 of PR#16761.
  • In text.default(x, y, labels), the rarely(?) used default for labels is now correct also for the case of a 2-column matrix x and missing y.
  • as.factor(c(a = 1L)) preserves names() again as in R < 3.1.0.
  • strtrim(""[0], 0[0]) now works.
  • Use of Ctrl-C to terminate a reverse incremental search started by Ctrl-R in the readline-based Unix terminal interface is now supported for readline >= 6.3 (Ctrl-G always worked). (PR#16603) * diff() now keeps the "units" attribute, as subtraction already did, PR#16940.

New in R Portable 2.15.3 (Mar 4, 2013)

  • NEW FEATURES:
  • lgamma(x) for very small x (in the denormalized range) is no longer Inf with a warning.
  • image() now sorts an unsorted breaks vector, with a warning.
  • The internal methods for tar() and untar() do a slightly more ngeneral job for 'ustar'-style handling of paths of more than 100 bytes.
  • Packages compiler and parallel have been added to the reference
  • index (refman.pdf).
  • untar(tar = "internal") has some support for pax headers as produced by e.g. gnutar --posix (which seems prevalent on OpenSUSE 12.2) or bsdtar --format pax, including long path and link names.
  • sQuote() and dQuote() now handle 0-length inputs.
  • summaryRprof() returns zero-row data frames rather than throw an error if no events are recorded, for consistency.
  • The included version of PCRE has been updated to 8.32.
  • The tcltk namespace can now be re-loaded after unloading.
  • The Tcl/Tk event loop is inhibited in a forked child from package parallel (as in e.g. mclapply()). parallel::makeCluster() recognizes the value random for the environment variable R_PARALLEL_PORT: this chooses a random value for the port and reduces the chance of conflicts when multiple users start a cluster at the same time.
  • UTILITIES:
  • The default for TAR on Windows for R CMD build has been changed to be internal if no tar command is on the path.
  • This enables most packages to be built 'out of the box' without Rtools: the main exceptions are those which need to be installed to re-build vignettes and need Rtools for installation (usually because they contain compiled code).
  • C-LEVEL FACILITIES:
  • On a 64-bit Windows platform with enough RAM, R_alloc can now allocate up to just under 32GB like other 64-bit platforms.
  • DEPRECATED AND DEFUNCT:
  • Use of col2rgb(0) is deprecated (see the help page for its limitations).
  • The deprecated intensities component returned by hist() is no longer recognized by the plot() method and will be removed in R 3.0.0.
  • real(), as.real() and is.real() are now formally deprecated and give a warning.
  • This is formal notice that the non-API EISPACK entry points in R will be removed shortly.
  • INSTALLATION:
  • The configure tests for Objective C and Objective C++ now work on Mac OS 10.8 with Xcode 4.5.2 (PR#15107).
  • The cairo-based versions of X11() now work with current versions of cairographics (e.g. 1.12.10). (PR#15168)
  • A workaround for earlier versions of R is to use X11.options(type
  • "nbcairo").
  • Configuration and R CMD javareconf now come up with a smaller set of library paths for Java on Oracle-format JDK (including OpenJDK). This helps avoid conflicts between libraries (such as libjpeg) supplied in the JDK and system libraries. This can always be overridden if needed: see the 'R Installation and Administration' manual.
  • BUG FIXES:
  • beta(a, b) could overflow to infinity in its calculations when one of a and b was less than one. (PR#15075)
  • lbeta(a, b) no longer gives NaN if a or b is very small (in the denormalized range).
  • bquote() is now able to substitute default arguments in single-argument functions. (PR#15077)
  • browseEnv(html = FALSE) would segfault if called from R (not R.app) on a CRAN-style Mac OS X build of R.