This blog is updated daily.
A general description is here.
The ‘confint()’ and ‘profile’ methods for ‘"glm"’ objects have gained a possibility to do profiling based on the \IRao Score statistic in addition to the default Likelihood Ratio. This is controlled by a new ‘test =’ argument.
Serializations can now be interrupted (e.g., by ‘Ctrl-C’ on a Unix-alike) if they take too long, e.g., from ‘save.image()’, thanks to suggestions by \IIvan Krylov and others on R-devel.
‘memDecompress(type = "unknown")’ recognizes compression in the default ‘\Izlib’ format as used by ‘memCompress(type = "gzip")’.
Hexadecimal string colour specifications are now accepted in short form, so, for example, we can use ‘"#123"’, which is equivalent to ‘"#112233"’.
Thanks to \IMikeFC for the original idea and \IElla Kaye, \IMalcolm Barrett, \IGeorge Stagg, and \IHanne Oberman for the patch.
Where characters are attempted to be plotted by ‘pdf()’, ‘postscript()’ and ‘xfig()’ which are not in the selected 8-bit character set (most often Latin-1) and the R session is using a UTF-8 locale, the warning messages will show the UTF-8 character rather than its bytes and one dot will be substituted per character rather than per byte. (Platforms whose ‘iconv()’ does transliteration silently plot the transliteration.)
In a UTF-8 locale some transliterations are now done with a warning (e.g., dashes and Unicode minus to hyphen, ligatures are expanded, \Ipermille (‘‰’) is replaced by ‘o/oo’), although the OS may have got there first. These are warnings as they will continue to be replaced by dots in earlier versions of R.
System \Ivalgrind headers are required to use ‘configure’ option ‘--with-valgrind-instrumentation’ with value ‘1’ or ‘2’.
A new ‘configure’ option ‘--with-newAccelerate’ makes use of Apple's ‘new’ BLAS / LAPACK interfaces in their Accelerate framework. Those interfaces are only available in macOS 13.3 or later, and building requires SDK 13.3 or later (from the Command Line Tools or \IXcode 14.3 or later).
By default the option uses new Accelerate for BLAS calls: to also use it for LAPACK use ‘--with-newAccelerate=lapack’. The later interfaces provide LAPACK 3.9.1 rather than 3.2.1: 3.9.1 is from 2021-04 and does not include the improved algorithms introduced in LAPACK 3.10.0 (including for BLAS calls).
‘UseMethod()’ no longer forwards local variables assigned in the generic function into method call environments before evaluating the method body. This makes method calls behave more like standard function calls and makes method code easier to analyze correctly. For now, attempts to use these variables in a method will signal an error; this will eventually be dropped.
Probability distribution functions ‘[dpq]<distrib>(x, *)’, but also ‘bessel[IKJY](x, .)’ are now consistently preserving ‘attributes(x)’ when ‘length(x) == 0’, e.g., for a 2 x 0 matrix, thanks to \IKarolis Koncevičius' report PR#18509.
Group “Summary” computations such as ‘sum(1:3, 4, na.rm = 5, NA, 7, na.rm = LL)’ now give an error instead of either ‘17’ or ‘NN’ for ‘LL’ true or false, as proposed by \IIvan Krylov on the R-devel mailing list. (This also means it is now an error to specify ‘na.rm’ more than once.)
The handling of ‘Alt+F4’ in \Idialogs created on Windows using \IGraphApp has been fixed (PR#13870).
‘density()’ more consistently computes grid values for the FFT-based convolution, following \IRobert Schlicht's analysis and proposal in PR#18337, correcting density values typically by a factor of about 0.999. Optional ‘old.coords=TRUE’ provides back compatibility.
‘getParseData(f)’ now also works for a function defined in the first of several ‘<pkg>/R/*.R’ source files, thanks to \IKirill Müller's report and Duncan Murdoch's patch in PR#16756.
A non-blocking connection with non-default encoding (such as a socket) now correctly returns from ‘readLines()’ after new data has arrived also when its EOF had been reached previously. Thanks to \IPeter Meilstrup's report on R-devel and \IIvan Krylov's report and patch proposal in PR#18555.
‘kappa()’ and ‘rcond()’ work correctly in more cases; ‘kappa(., norm = "2")’ now warns that it computes the 1-norm with (default) ‘exact = FALSE’; prompted by \IMikael Jagan's quite comprehensive PR#18543.
For ‘cbind()’ and ‘rbind()’, the optional ‘deparse.level’ argument is now properly passed to methods, thanks to \IMikael Jagan's PR#18579 and comments there.
Some error and warning messages for large (‘long vector’) ‘matrix(v, nr, nc)’ and ‘dim(m) <- d’ are now correct about sizes, using ‘long long’ formatting, fixing PR#18612 (and more) reported by \IMikael Jagan.
‘drop.terms(*)’ now drops response as by default, ‘keep.response = FALSE’, fixing PR#18564 thanks to \IMikael Jagan.
‘dummy.coef(.)’ now also works for ‘lm()’-models with ‘character’ categorical predictor variables rather than ‘factor’ ones, fixing PR#18635 reported by \IJinsong Zhao.
‘dgeom()’ is more accurate now, notably when its result is very small, fixing PR#18642 thanks to the proposal of \IMorten Welinder, also improving other instances where C level ‘binom_raw(x, n, ..)’ has ‘x == 0’ or ‘x== n’.
Arguments are now properly forwarded to methods on S4 generics with ... in the middle of their formal arguments. This was broken for the case when a method introduced an argument but did not include ... in its own formals. Thanks to \IHervé Pagès for the report PR#18538.
‘rank(<long vector>)’ now works, fixing PR#18617, thanks to \IIlia Kats.
‘match(<POSIXct>, .)’ is correct again for differing time zones, ditto for ‘"POSIXlt"’, fixing PR#18618 reported by \IBastian Klein.
‘drop.terms(*, dropx = <0-length>)’ now works, fixing PR#18563 as proposed by \IMikael Jagan.
‘drop.terms(*)’ keeps ‘ + offset(.)’ terms when it should, PR#18565, and ‘drop.terms()’ no longer makes up a response, PR#18566, fixing both bugs thanks to \IMikael Jagan.
‘rank(x)’ no longer overflows during integer addition, when computing rank average for largish but not-yet long vector ‘x’, fixing PR#18630, thanks to \IIlia Kats.
‘cov2cor(<0 x 0>)’ now works, fixing PR#18423 thanks to \IMikael Jagan and \IElin Waring.
‘cov2cor(<negative diagonal>)’ and similar now give one warning instead of two, with better wording, fixing PR#18424 thanks to \IMikael Jagan.
‘predict(<rank-deficient lm>, newdata=*)’ fix computing of ‘nbasis’, see \IRuss Lenth's comment 29 in PR#16158.
‘trans3d()’ gains options ‘continuous’ and ‘verbose’ addressing the problem of possible “wrap around” when projecting too long curves, as reported by \IAchim Zeileis in PR#18537.
There is some support for building with Intel's \ILLVM-based compilers on ‘x86_64’ Linux, such as (C) ‘icx’, (C++) ‘ipcx’ and (Fortran) ‘ifx’ from \IoneAPI 2023.x.y.
There is support for using \ILLVM's ‘flang-new’ as the Fortran compiler from \ILLVM 16.0.x (preferably 17.0.0 or later).
‘readChar(., 4e8)’ no longer fails, thanks to \IKodi Arfer's report (PR#18557).
‘qqplot(x,y, conf.level=.)’ gives better confidence bounds when ‘length(x) != length(y)’, thanks to \IAlexander Ploner's report and patch proposal (PR#18557).
‘norm(<0-length>, "2")’ now gives zero instead of an error, as all the other norm types, thanks to \IMikael Jagan's PR#18542.
‘tar(*, tar = "internal")’ no longer creates out-of-spec tar files in the very rare case of user or group names longer than 32 bytes, fixing PR#17871 with thanks to \IIvan Krylov.
When using the “internal” timezone datetime code, adding a fraction of a second no longer adds one second, fixing PR#16856 from a patch by \IIvan Krylov.
‘tools::Rdiff()’ is now more robust against invalid strings, fixing installation tests on Windows without \IRtools installed (PR#18530).
Fix (new) bug in ‘hcl.colors(2, *)’, by \IAchim Zeileis (PR#18523).
‘na.contiguous(x)’ now also returns the first run, when it is at the beginning and there is a later one of the same length; reported to R-devel, including a fix, by \IGeorgi Boshnakov. Further, by default, it modifies only an existing ‘attr(*,"tsp")’ but otherwise no longer sets one.
‘chol(<not pos.def>, pivot = <T|F>)’ now gives a correct error or warning message (depending on ‘pivot’), thanks to \IMikael Jagan's (PR#18541).
‘qqplot(x, y, ...)’ gains ‘conf.level’ and ‘conf.args’ arguments for computing and plotting a confidence band for the treatment function transforming the distribution of ‘x’ into the distribution of ‘y ’ (\ISwitzer, 1976, _\IBiometrika_). Contributed by \ITorsten Hothorn.
Added new unit prefixes ‘"R"’ and ‘"Q"’ for abbreviating (unrealistically large) sizes beyond 10^{27} in ‘standard = "SI"’, thanks to \IHenrik Bengtsson's PR#18435.
‘as.data.frame()’'s default method now also works fine with atomic objects inheriting from classes such as ‘"roman"’, ‘"octmode"’ and ‘"hexmode"’, such fulfilling the wish of PR#18421, by \IBenjamin Feakins.
‘predict(<rank-deficient lm>, newdata=*)’ now obeys a new argument ‘rankdeficient’, with new default ‘"warnif"’, warning only if there are non-estimable cases in ‘newdata’. Other options include ‘rankdeficient = "NA"’, predicting ‘NA’ for non-estimable ‘newdata’ cases. This addresses PR#15072 by \IRuss Lenth and is based on his original proposal and discussions in PR#16158 also by \IDavid Firth and \IElin Waring. Still somewhat experimental.
The drop-field control in \IGraphApp can now be left with the TAB key and all controls can be navigated in the reverse order using the Shift+TAB key, improving accessibility of the ‘Rgui’ configuration editor.
‘all.equal.numeric()’ gets a new optional switch ‘giveErr’ to return the numeric error as attribute. \IRelatedly, ‘stopifnot(all.equal<some>(a, b, ..))’ is as “smart” now, as ‘stopifnot(all.equal(....))’ has been already, thus allowing customized ‘all.equal<Some>()’ wrappers.
The ‘@’ operator is now an S3 generic. Based on contributions by \ITomasz Kalinowski in PR#18482.
New generic ‘chooseOpsMethod()’ provides a mechanism for objects to resolve cases where two suitable methods are found for an Ops Group Generic. This supports experimenting with alternative object systems. Based on contributions by \ITomasz Kalinowski in PR#18484.
‘inherits(x, what)’ now accepts values other than a simple character vector for argument ‘what’. A new generic, ‘nameOfClass()’, is called to resolve the class name from ‘what’. This supports experimenting with alternative object systems. Based on contributions by \ITomasz Kalinowski in PR#18485.
Detection of BLAS/LAPACK in use (‘sessionInfo()’) with \IFlexiBLAS now reports the current backend.
Calling ‘a:b’ when numeric ‘a’ or ‘b’ is longer than one may now be made into an error by setting environment variable ‘_R_CHECK_LENGTH_COLON_’ to a true value, along the proposal in PR#18419 by \IHenrik Bengtsson.
‘density(x, weights = *)’ now warns if automatic bandwidth selection happens without using ‘weights’; new optional ‘warnWbw’ may suppress the warning. Prompted by \IChristoph Dalitz' PR#18490 and its discussants.
‘rm(list = *)’ is faster and more readable thanks to \IKevin Ushey's PR#18492.
The matrix multiply operator ‘%*%’ is now an S3 generic, belonging to new group generic ‘matrixOps’. From \ITomasz Kalinowski's contribution in PR#18483.
‘as.Date.POSIXct(., tz)’ now treats several ‘tz’ values, notably ‘"GMT"’ as equivalent to ‘"UTC"’, proposed and improved by \IMichael Chirico and \IJoshua Ulrich in PR#17674.
Experimental ‘balancePOSIXlt()’ utility allows using “ragged” and or out-of-range ‘"POSIXlt"’ objects more correctly, e.g., in subsetting and \Isubassignments. Such objects are now documented.
More experimentally, a ‘"POSIXlt"’ object may have an attribute ‘"balanced"’ indicating if it is known to be filled or fully balanced.
Functions ‘axis.Date()’ and ‘axis.POSIXct()’ are rewritten to gain better default tick locations and better default formats via the corresponding ‘pretty()’ methods. Thanks to \ISwetlana Herbrandt.
The makefiles and installer scripts for Windows have been tailored to \IRtools43, an update of the \IRtools42 toolchain. It is based on GCC 12 and newer versions of \IMinGW-W64, \Ibinutils and libraries. At this time R-devel can still be built using \IRtools42 without changes, but when R-devel is installed via the installer, it will by default look for \IRtools43.
There is support for a package to indicate the version of the C standard which should be used to compile it, and for the installing user to specify this. In most cases R defaults to the C compiler's default standard which is C17 (a `bug-fix' of C11) - earlier versions of R or compilers may have defaulted to C99.
Current options are:
USE_C17 Use a standard that is at most C17. The intention is to allow legacy packages to still be installed when later C standards become the default, including packages using new keywords as identifiers or with K&R-style function declarations. This will use C17 if available, falling back to C11.
USE_C90 Use the C90 (aka C89) standard. (As that standard did not require compilers to identify that version, all we can verify is that the compiler does not claim to be using a later standard. It may accept C99 features - for example ‘clang’ accepts // to make comments.)
USE_C99 Use the C99 standard. This should be rarely needed - it avoids the few new features of C11/C17 which can be useful if a package assumes them if C17 is specified and they are not implemented.
USE_C23 Use C23 (or in future, later). Compiler/library support for C23 is still being implemented, but \ILLVM clang from 15.0.0 and GCC from 13 have quite extensive support.
These can be specified as part of the ‘SystemRequirements’ field in the package's ‘DESCRIPTION’ file or _via_ options ‘--use-C17’ and so on of ‘R CMD INSTALL’ and ‘R CMD SHLIB’.
For further details see “Writing R Extensions” §1.2.5.
\IALTREP now supports ‘VECSXP’ vectors. Contributed by \IGabor Csardi in PR#17620.
The ‘Rcomplex’ definition (in header ‘R_ext/Complex.h’) has been extended to prevent possible mis-compilation when interfacing with Fortran (PR#18430). The new definition causes compiler warnings with static initializers such as ‘{1, 2}’, which can be changed to ‘{.r=1, .i=2}’.
Using the new definition from C++ depends on compiler extensions supporting C features that have not been incorporated into the C++ standards but are available in ‘g++’ and ‘clang++’: this may result in C++ compiler warnings but these have been worked around for recent versions of common compilers (GCC, Apple/\ILLVM clang, Intel).
It is intended to change the inclusion of header ‘R_ext/Complex.h’ by other R headers, so C/C++ code files which make use of ‘Rcomplex’ should include that header explicitly.
‘R CMD check’ can optionally (but included in ‘--as-cran’) check whether HTML math rendering _via_ \IKaTeX works for the package ‘.Rd’ files.
‘R CMD check’'s ‘\Ichecking compilation flags in Makevars’ has been relaxed to accept the use of flags such as ‘-std=f2008’ in ‘PKG_FFLAGS’.
Hashed ‘environment’s with sizes less than 5 can now grow. (Reported to R-devel by \IDuncan Garmonsway.)
‘as.character(<Rd>, deparse = TRUE)’ failed to re-escape curly braces in LaTeX-like text. (Reported by \IHadley Wickham in PR#18324.)
‘library()’ now passes its ‘lib.loc’ argument when requiring ‘Depends’ packages; reported (with fix) in PR#18331 by \IMikael Jagan.
‘c(a = 1, 2)[[]]’ no longer matches ‘2’ but rather signals a _classed_ error. Reported and analysed by Davis Vaughan in PR#18367, a duplicate of PR#18004, by \IJan Meis et al. For consistency, ‘NULL[[]]’ is also erroneous now. ‘x[[]] <- v’ gives an error of the same class ‘"MissingSubscriptError"’.
‘ordered(levels = *)’ (missing ‘x’) now works analogously to ‘factor(, ordered=TRUE)’; reported (with fix) by \IAchim Zeileis in PR#18389.
‘as.POSIXlt(<Date>)’ now does apply a ‘tz’ (time zone) argument, as does ‘as.POSIXct()’; partly suggested by \IRoland Fuß on the R-devel mailing list.
‘time()’ now (also) uses the ‘ts.eps = getOption("ts.eps")’ argument and thus by default rounds values very close to the start (or end) of a year. Based on a proposal by \IAndreï V. Kostyrka on R-help.
Printing 0-length objects of class ‘"factor"’, ‘"roman"’, ‘"hexmode"’, ‘"octmode"’, ‘"person"’, ‘"bibentry"’, or ‘"citation"’ now prints something better, one of which fixes PR#18422, reported by \IBenjamin Feakins.
‘Sys.timezone()’ queries ‘timedatectl’ only if ‘systemd’ is loaded; addressing a report by \IJan Gorecki in PR#17421.
The formula method of ‘cor.test()’ had scoping problems when ‘environment(formula)’ was not the calling environment; reported with a patch proposal by \IMao Kobayashi in PR#18439.
‘attach()’ of an environment with active bindings now preserves the active bindings. Reported by \IKevin Ushey in PR#18425.
BLAS detection now works also with system-provided libraries not available as regular files. This fixes detection of the Accelerate framework on macOS since \IBig Sur. Reported by \IDavid Novgorodsky.
Package installation, ‘R CMD INSTALL’ or ‘install.packages(*)’, now parses each of the ‘<pkg>/R/*.R’ files individually instead of first concatenating and then \I‘parse()’ing the large resulting file. This allows parser or syntax errors to be diagnosed with correct file names and line numbers, thanks to \ISimon Dedman's report and Bill Dunlap's patch in PR#17859.
This _does_ require syntactically self contained R source files now, fixing another inadvertent bug.
‘predict.lm(<model with offset>)’ now finds the offset in the correct environment, thanks to \IAndré Gillibert's report and patch in PR#18456.
‘getInitial(<formula>)’ now finds the ‘selfStart’ model in the correct environment. (Reported by \IIvan Krylov in PR#18368.)
‘uniroot(f, interval)’ should no longer wrongly converge _outside_ the interval in some cases where ‘abs(f(x)) == Inf’ for an ‘x’ at the interval boundary, thanks to posts by \IBen Bolker and \ISerguei Sokol on R-devel.
Vectorized alpha handling in palette functions such as in ‘gray()’, ‘rainbow()’, or ‘hcl.colors()’ works correctly now, thanks to \IAchim Zeileis' report and patch in PR#18476.
Formatting and \I‘print()’ing of ‘bibentry’ objects has dropped the deprecated ‘citation.bibtex.max’ argument, such that the ‘bibtex’ argument's default for ‘print.bibentry()’ depends directly on the ‘citation.bibtex.max’ option, whereas in ‘format.bibentry()’ the option no longer applies.
‘bs()’ and ‘ns()’ in the (typical) case of automatic knot construction, when some of the supposedly inner knots coincide with boundary knots, now moves them inside (with a warning), building on PR#18442 by \IBen Bolker.
‘R CMD’ on Windows now skips the site profile with ‘--no-site-file’ and ‘--vanilla’ even when ‘R_PROFILE’ is set (PR#18512, from \IKevin Ushey).
(Windows) Math symbols in text drawing functions are again rendered correctly (PR#18440). This fixes a regression in R 4.2.1 caused by a fix in PR#18382 which uncovered an issue in \IGraphApp due to which the symbol charset was not used with \ITT Symbol font face.
(Windows) Installing a package with a ‘src/Makefile.{win,ucrt}’ file includes ‘~/.R/Makevars.win64’ in the search for user \Imakevars, as documented in “R Installation and Administration” and done for packages with a ‘src/Makevars.{win,ucrt}’ file.
‘format(<POSIXlt_w/_unbalanced_sec>, "....%OS<n>")’ with n > 0 no longer accidentally uses the unbalanced seconds, thanks to \ISuharto Anggono's report (including patch) in PR#18448.
When ‘UseMethod()’ cannot dispatch, it no longer segfaults producing the error message in case of a long ‘class()’, thanks to \IJoris Vankerschaver's report (including patch) in PR#18447.
When ‘example(foo, ..)’ produces graphics on an interactive device it needs to open itself, it now leaves ‘devAskNewPage()’ unchanged even when it was ‘FALSE’, thus fixing a 14 years old ‘\IFIXME’.
(macOS) The run-time check for libraries from \IXQuartz for X11 and Tcl/Tk no longer uses ‘otool’ from the Apple Developer Tools (PR#18400).
There is now ‘configure’ support for \ILLVM clang 15 on Linux, which defaults to position-independent (PIE) executables whereas ‘gfortran’ does not.
Many small changes to ease compilation (and suppress warnings) with \ILLVM ‘clang’ 15.
‘Rscript -e’ would fail if ‘stdin’ were closed (Reported by \IHenrik Bengtsson.)
When ‘isGeneric(f, fdef=*)’ is used with mismatching names, the warning is better understandable; reported (with fix) in PR#18370 by \IGabe Becker.
‘as.POSIXlt(x)’ now also works with very large dates ‘x’, fixing PR#18401 reported by \IHannes Mühleisen.
Files can now be extracted even from very large zip archives (PR#18390, thanks to \IMartin Jakt).
Non-ASCII characters are now properly displayed on Windows in windows created using \IGraphApp via e.g. ‘winDialogString’ thanks to a workaround for an at least surprising Windows behavior with UTF-8 as the system encoding (PR#18382).
Computation of window size based on requested client size in \IGraphApp when running in a multi-byte locale on Windows has been fixed (regression in R 4.2.0 for users of systems where R 4.1 used a single-byte locale). ‘Rgui’ again respects the number of console rows and columns given in ‘Rconsole’ file.
The libraries searched for by ‘--with-blas’ (without a value) now include \IBLIS (after \IOpenBLAS but before ATLAS). And on macOS, the Accelerate framework (after ATLAS). (This is patterned after the ‘AX_BLAS’ macro from the \IAutoconf Archive.)
C function ‘getlocale’ no longer attempts to query an unsupported category from the OS, even when requested at R level, which may cause crashes when R 4.2.0 (which uses UCRT) is embedded (reported by \IKevin Ushey).
Accent keys now work in \IGraphApp Unicode windows, which are used by ‘Rgui’ whenever running in a multibyte locale (so also in UTF-8, hence fixing a regression in R 4.2.0 for users of systems where R 4.1 used a single-byte locale).
Text injection from external applications via ‘SendInput’ now works in \IGraphApp Unicode windows, fixing a regression in R 4.2.0 for ‘Rgui’ users of systems where R 4.1 used a single-byte locale but R 4.2.0 uses UTF-8.
The ‘formula’ method of ‘aggregate()’ now matches the generic in naming its first argument ‘x’ (resolving PR#18299 by \IThomas 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).
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 \ITomas Kalibera for months of work on the Windows port for this release.
‘matrix(x, n, m)’ now warns in more cases where ‘length(x)’ differs from ‘n * m’, as suggested by \IAbby Spurdle and \IWolfgang 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.
The R \IMathlib 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 \IMorten Welinder's PR#15628.)
‘write.ftable()’ gains ‘sep = " "’ argument as suggested by \IThomas Soeiro.
‘substr(ch, start,end) <- new’ now e.g., preserves ‘names(ch)’; ditto for ‘substring()’, thanks to a patch from \IBrodie 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 \IElin 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 \Isubsettable now signals an error of class ‘notSubsettableError’. The non-\Isubsettable object is contained in the ‘object’ field of the error condition.
‘reorder()’ gets an argument ‘decreasing’ which it passes to ‘sort()’ for level creation; based on the wish and patch by \IThomas Soeiro in PR#18243.
‘as.vector()’ gains a ‘data.frame’ method which returns a simple named list, also clearing a long standing ‘\IFIXME’ 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 \ISwetlana Herbrandt.
‘ks.test()’ now provides exact p-values also with ties and MC p-values in the two-sample (Smirnov) case. By \ITorsten 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 \ITorsten Hothorn.
‘trunc(<Date>, *)’ now supports ‘units = "months"’ or ‘"years"’ for consistency with the ‘POSIXt’ method, thanks to \IDirk Eddelbuettel's proposal in PR#18099.
The HTML help system has several new features: LaTeX-like math can be typeset using either \IKaTeX or \IMathJax, 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.
Make files and installer scripts for Windows have been tailored to ‘Rtools42’, the newly recommended 64-bit ‘gcc’ 10.3 \IMinGW-W64 UCRT toolchain.
‘Rtools42’ by default uses the Windows security features \IASLR and \IDEP; hence CRAN builds of R and packages also do.
‘Rtools42’ includes an unpatched \IMsys2 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.)
The clipboard connection now works also with text in other than the current native encoding (PR#18267, with \IHiroaki Yutani). Text is always pasted to the clipboard in UTF16-LE and the ‘encoding’ argument is ignored.
Facilities for accessing ‘ftp://’ sites are no longer tested (except _\Ipro tem_ for ‘curlGetHeaders()’) as modern browsers have removed support.
Package installation speed for packages installed with ‘keep.source’ has been improved. This resolve the issue reported by \IOfek Shilon in PR#18236.
‘R CMD Rd2pdf’ now always runs LaTeX in batch mode, consistent with \ITexinfo >= 6.7. The ‘--batch’ option is ignored.
‘density(x, weights = w, na.rm = TRUE)’ when ‘anyNA(x)’ is true, now removes weights “in parallel” to ‘x’, fixing PR#18151, reported by \IMatthias 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 \IIvan Krylov posted to R-devel.
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 \ISuharto 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 \ICharlie Gao's PR#18179).
‘dimnames(table(d))’ is more consistent in the case where ‘d’ is a list with a single component, thanks to \IThomas 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.
The \Ideparser now wraps sub-expressions such as ‘if(A) .. ’ with parentheses when needed; thanks to Duncan Murdoch's PR#18232 and \ILionel Henry's patches there.
‘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 \ISuharto Anggono's report and patch proposals in PR#17977.
The default LaTeX style file ‘Sweave.sty’ used by the ‘RweaveLatex’ driver no longer loads the obsolete ‘ae’ package; thanks to a report by \IThomas Soeiro in PR#18271. Furthermore, it now skips ‘\usepackage[T1]{fontenc}’ for engines other than \IpdfTeX (if detected) or if the new ‘[nofontenc]’ option is used.
‘setAs()’ finds the correct class for name ‘to’ when multiple packages define a class with that name. Thanks to \IGabor 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 \IGabor Csardi for the report.
‘match.arg("", c("", "a", "B"))’ gives a better error message, in part from PR#17959, thanks to \IElin Waring.
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 \ISuharto Anggono.
‘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 \ILudger Goeminne in PR#18302.
Not strictly fixing a bug, \I‘format()’ing and \I‘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.
Fixed quoting of ‘~autodetect~’ in Java setting defaults to avoid inadvertent user lookup due to leading ‘~’, reported in PR#18231 by \IHarold Gutch.
‘substr(., start, stop) <- v’ now treats _negative_ ‘stop’ values correctly. Reported with a patch in PR#18228 by \IBrodie Gaslam.
Subscripting an array ‘x’ without dimnames by a ‘length(dim(x))’-column character matrix gave "random" non-sense, now an error; reported in PR#18244 by \IMikael Jagan.
Modifying ‘globalCallingHandlers’ inside ‘withCallingHandlers()’ now works or fails correctly, thanks to \IHenrik Bengtsson's PR#18257.
‘qbeta(.001, .9, .009)’ and similar cases now converge correctly thanks to \IBen Bolker's report in PR#17746.
‘model.weights()’ and ‘model.offset()’ more carefully extract their model components, thanks to \IBen Bolker and Tim Taylor's R-devel post.
If the ‘R_NO_SEGV_HANDLER’ environment variable is non-empty, the signal handler for \ISEGV/ILL/BUS signals (which offers recovery user interface) is not set. This allows more reliable debugging of crashes that involve the console.
\Sexpr{ch} now preserves ‘Encoding(ch)’. (Thanks to report and patch by \IJeroen Ooms in PR#18152.)
Setting the RNG to ‘"Marsaglia-Multicarry"’ e.g., by ‘RNGkind()’, now warns in more places, thanks to \IAndré Gillibert's report and patch in PR#18168.
‘gray(numeric(), alpha=1/2)’ no longer segfaults, fixing PR#18183, reported by \ITill Krenz.
‘try()’ is considerably faster in case of an error and long call, as e.g., from some ‘do.call()’. Thanks to \IAlexander Kaever's suggestion posted to R-devel.
Non-integer ‘mgp’ ‘par()’ settings are now handled correctly in ‘axis()’ and ‘mtext()’, thanks to \IMikael Jagan and Duncan Murdoch's report and suggestion in PR#18194.
‘dnbinom(20, <large>, 1)’ now correctly gives 0, and similar cases are more accurate with underflow precaution. (Reported by \IFrancisco Vera Alcivar in PR#18072.)
The checking of the size of tarball in ‘R CMD check --as-cran <pkg>’ may be tweaked via the new environment variable ‘_R_CHECK_CRAN_INCOMING_TARBALL_THRESHOLD_’, as suggested in PR#17777 by \IJan Gorecki.
The ‘format()’ method for class ‘"ftable"’ gets a new option ‘justify’. (Suggested by \IThomas Soeiro.)
New ‘...names()’ utility. (Proposed by \INeal Fultz in PR#17705.)
‘capabilities()’ gets new entry ‘"Rprof"’ which is ‘TRUE’ when R has been configured with the equivalent of ‘--enable-R-profiling’ (as it is by default). (Related to \IMichael Orlitzky's report PR#17836.)
Rudimentary support for vi-style tags in ‘rtags()’ and ‘R CMD rtags’ has been added. (Based on a patch from \INeal Fultz in PR#17214.)
Functions ‘URLencode()’ and ‘URLdecode()’ in package ‘utils’ now work on vectors of URIs. (Based on patch from \IBob Rudis submitted with PR#17873.)
‘get()’, ‘exists()’, and ‘get0()’ now signal an error if the first argument has length greater than 1. Previously additional elements were silently ignored. (Suggested by \IAntoine Fabri on R-devel.)
‘.libPaths()’ gets a new option ‘include.site’, allowing to _not_ include the site library. (Thanks to \IDario Strbenac's suggestion and \IGabe Becker's PR#18016.)
Lithuanian translations are now available. (Thanks to \IRimantas Žakauskas.)
New function ‘gregexec()’ which generalizes ‘regexec()’ to find _all_ disjoint matches and all substrings corresponding to parenthesized subexpressions of the given regular expression. (Contributed by \IBrodie Gaslam.)
Provide grouping of ‘x11()’ graphics windows within a window manager such as ‘Gnome’ or ‘Unity’; thanks to a patch by \IIvan Krylov posted to R-devel.
New palettes ‘"Rocket"’ and ‘"Mako"’ for ‘hcl.colors()’ (approximating palettes of the same name from the ‘viridisLite’ package).
Contributed by \IAchim Zeileis.
‘duplicated()’ and ‘anyDuplicated()’ are now optimized for integer and real vectors that are known to be sorted via the \IALTREP framework. Contributed by Gabriel Becker via PR#17993.
‘grSoftVersion()’ now reports the versions of \IFreeType and \IFontConfig if they are used directly (not _via_ \IPango), as is most commonly done on macOS.
There are new ‘configure’ options ‘--with-internal-iswxxxxx’, ‘--with-internal-towlower’ and ‘--with-internal-wcwidth’ which allows the system functions for wide-character classification, case-switching and width (‘wcwidth’ and ‘wcswidth’) to be replaced by internal ones. The first has long been used on macOS, \IAIX (and Windows) but this enables it to be unselected there and selected for other platforms (it is the new default on Solaris). The second is new in this version of R and is selected by default on macOS and Solaris. The third has long been the default and remains so as it contains customizations for East Asian languages.
System versions of these functions are often minimally implemented (sometimes only for ASCII characters) and may not cover the full range of Unicode points: for example Solaris (and Windows) only cover the Basic Multilingual Plane.
There is a new ‘configure’ option ‘--with-static-cairo’ which is the default on macOS. This should be used when only static \Icairo (and where relevant, \IPango) libraries are available.
\ICairo-based graphics devices on platforms without \IPango but with \IFreeType/\IFontConfig will make use of the latter for font selection.
There is a new text file ‘src/gnuwin32/README.compilation’, which outlines how C/Fortran code compilation is organized and documents new features:
• R can be built with Link-Time Optimization with a suitable compiler - doing so with GCC 9.2 showed several inconsistencies which have been corrected.
• There is support for cross-compiling the C and Fortran code in R and standard packages on suitable (Linux) platforms. This is mainly intended to allow developers to test later versions of compilers - for example using GCC 9.2 or 10.x has detected issues that GCC 8.3 in \IRtools40 does not.
• There is experimental support for cross-building R packages with C, C++ and/or Fortran code.
‘R CMD INSTALL’ and ‘R CMD SHLIB’ make use of their flag ‘--use-LTO’ when the ‘LTO_OPT’ make macro is set in file ‘etc/${R_ARCH}/Makeconf’ or in a personal/site ‘Makevars’ file. (For details see ‘Writing R Extensions’ §4.5.)
This provides a valuable check on code consistency. It does work with GCC 8.3 as in \IRtools40, but that does not detect everything the CRAN checks with current GCC do.
‘R CMD check’ now runs sanity checks on the use of ‘LazyData’, for example that a ‘data’ directory is present and that ‘LazyDataCompression’ is not specified without ‘LazyData’ and has a documented value. For packages with large \ILazyData databases without specifying ‘LazyDataCompression’, there is a reference to the code given in ‘Writing R Extensions’ §1.1.6 to test the choice of compression (as in all the CRAN packages tested a non-default method was preferred).
The character-classification functions used (by default) to replace the system ‘iswxxxxx’ functions on Windows, macOS and \IAIX have been updated to Unicode 13.0.0.
The character-width tables have been updated to include new assignments in Unicode 13.0.0. This included treating all control characters as having zero width.
The code for evaluating default (extended) regular expressions now uses the same character-classification functions as the rest of R (previously they differed on Windows, macOS and \IAIX).
‘parallel::detectCores()’ drops support for \IIRIX (retired in 2013).
‘boxplot()’ now also accepts ‘call’s for labels such as ‘ylab’, the same as ‘plot()’. (Reported by \IMarius Hofert.)
The help page for ‘xtabs()’ now correctly states that ‘addNA’ is setting ‘na.action = na.pass’ among others. (Reported as PR#17770 by \IThomas Soeiro.)
‘update.default()’ now calls the generic ‘update()’ on the formula to work correctly for models with extended formulas. (As reported and suggested by \INeal Fultz in PR#17865.)
‘x[[2^31]] <- v’ now works. (Thanks to the report and patch by \ISuharto Anggono in PR#17330.)
‘unsplit()’ had trouble with \Itibbles due to unsound use of ‘rep(NA, len)’-indexing, which should use ‘NA_integer_’ (Reported to R-devel by \IMario Annau.)
Message translation domains, e.g., for errors and warnings, are now correctly determined also when e.g., a ‘base’ function is called from “top-level” function (i.e., defined in ‘globalenv()’), thanks to a patch from \IJoris Goosen fixing PR#17998.
There is a further workaround for \IFreeType giving incorrect italic font faces with \Icairo-based graphics devices on macOS.
‘cut.Date()’ and ‘cut.POSIXt()’ could produce an empty last interval for ‘breaks = "months"’ or ‘breaks = "years"’. (Reported as PR#18053 by \IChristopher Carbone.)
Unicode character width tables (as used by ‘nchar(, type = "w")’) have been updated to Unicode 12.1 by \IBrodie Gaslam (PR#17781), including many emoji.
The internal table for ‘iswprint’ (used on Windows, macOS and \IAIX) has been updated to include many recent Unicode characters.
‘(~ NULL)[1]’ and similar formula subsetting now works, thanks to a report and patch by \IHenrik Bengtsson in PR#17935. Additionally, subsetting leaving an empty formula now works too, thanks to suggestions by \ISuharto Anggono.
‘.traceback(n)’ keeps source references again, as before R 4.0.0, fixing a regression; introduced by the PR#17580, reported including two patch proposals by \IBrodie Gaslam.
‘unlist(plst, recursive=FALSE)’ no longer drops content for pairlists with list components, thanks to the report and patch by \ISuharto Anggono in PR#17950.
‘iconvlist()’ now also works on \IMUSL based (Linux) systems, from a report and patch suggestion by \IWesley Chan in PR#17970.
Fix \I(auto-)‘print()’ing of named complex vectors, see PR#17868 and PR#18019.
‘as.data.frame.list(L, row.names=NULL)’ now behaves in line with ‘data.frame()’, disregarding names of components of ‘L’, fixing PR#18034, reported by \IKevin Tappe.
macOS: Quartz device live drawing could fail (no plot is shown) if the system changes the drawing context after view update (often the case since macOS \IBig Sur). System log may show \I"CGContextDelegateCreateForContext: invalid context" error.
Low-level socket read/write operations have been fixed to correctly signal communication errors. Previously, such errors could lead to a segfault due to invalid memory access. Reported and debugged by \IDmitriy Selivanov in PR#17850.
‘quantile(x, pr)’ works more consistently for ‘pr’ values slightly outside [0,1], thanks to \ISuharto Anggono's PR#17891.
Further, ‘quantile(x, prN, names=FALSE)’ now works even when ‘prN’ contains ‘NA’s, thanks to \IAnggono's PR#17892. Ditto for ordered factors or ‘Date’ objects when ‘type = 1’ or ‘3’, thanks to PR#17899.
Internet access based on \Ilibcurl, including ‘curlGetHeaders()’, was not respecting the ‘"timeout"’ option. If this causes unanticipated timeouts, consider increasing the default by setting ‘R_DEFAULT_INTERNET_TIMEOUT’.
‘isS3stdGeneric(f)’ now detects an S3 generic also when it is ‘trace()’d, thanks to \IGabe Becker's PR#17917.
‘phyper(11, 15, 0, 12, log.p=TRUE)’ no longer gives ‘NaN’; reported as PR#17271 by \IAlexey Stukalov.
‘on.exit()’ now correctly matches named arguments, thanks to PR#17815 (including patch) by \IBrodie Gaslam.
‘aov(frml, ...)’ now also works where the ‘formula’ deparses to more than 500 characters, thanks to a report and patch proposal by \IJan Hauffa.
Fix for adding two complex ‘grid’ units via ‘sum()’. Thanks to \IGu Zuguang for the report and \IThomas Lin Pedersen for the patch.
Computing the ‘base’ value, i.e., 2, “everywhere”, now uses ‘FLT_RADIX’, as the original ‘machar’ code looped indefinitely on the \Ippc64 architecture for the ‘longdouble’ case.
Parse data for raw strings is now recorded correctly. Reported by \IGabor Csardi.
‘DF2formula()’, the utility for the data frame method of ‘formula()’, now works without parsing and explicit evaluation, starting from \ISuharto Anggono's suggestion in PR#17555.
The internal traceback object produced when an error is signalled (‘.Traceback’), now contains the ‘call’s 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 \IBrodie Gaslam.
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 \IGabe 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.
‘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 \IHervé Pagès.
‘stopifnot()’ now allows customizing error messages via argument names, thanks to a patch proposal by \INeal Fultz in PR#17688.
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 \IThomas Lin Pedersen.
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 \ISerguei Sokol.
New argument ‘symbolfamily’ in \Icairo-based graphics devices and new function ‘cairoSymbolFont()’ that can be used to provide the value for that argument.
‘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 \IChristian Asseburg).
‘Rterm’ now accepts ‘ALT+xxx’ sequences also with \INumLock on. Tilde can be pasted with an Italian keyboard (PR#17679).
‘R CMD check’ now optionally checks ‘configure’ and ‘cleanup’ scripts for non-\IBourne-shell code (‘bashisms’).
‘stopifnot()’ gets new argument ‘exprObject’ to allow an R object of class ‘expression’ (or other ‘language’) to work more consistently, thanks to suggestions by \ISuharto Anggono.
‘conformMethod()’ now works correctly in cases containing a “‘&&’ logic” bug, reported by \IHenrik 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.
‘postscript(.., title = *)’ now signals an error when the title string contains a character which would produce corrupt PostScript, thanks to PR#17607 by \IDaisuko Ogawa.
Certain ‘Ops’ (notably comparison such as ‘==’) now also work for 0-length data frames, after reports by \IHilmar Berger.
‘dnorm’ had a problematic corner case with ‘sd == -Inf’ or negative ‘sd’ which was not flagged as an error in all cases. Thanks to \IStephen D. Weigand for reporting and \IWang Jiefei for analyzing this; similar change has been made in ‘dlnorm()’.
Time-series ‘ts(*, start, end, frequency)’ with fractional ‘frequency’ are supported more consistently; thanks to a report from \IJohann Kleinbub and analysis and patch by Duncan Murdoch in PR#17669.
‘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 \IJohannes Ranke and \IKirill Müller.
The warning message when attempting to export an nonexistent class is now more readable; thanks to \IThierry Onkelinx for recognizing the problem.
‘dotchart()’ now places the y-axis label (‘ylab’) much better, not overplotting labels, thanks to a report and suggestion by \IAlexey Shipunov.
‘anova.glm()’ and ‘anova.glmlist()’ computed incorrect score (\IRao) tests in no-intercept cases. (\IAndré Gillibert, PR#17735)
‘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 \IBenjamin Tyner, in PR#15886.
‘xgettext()’ ignores strings passed to ‘ngettext()’, since the latter is handled by ‘xngettext()’. Thanks to \IDaniele Medri for the report and all the recent work he has done on the Italian translations.
‘x[[Inf]]’ (returning ‘NULL’) no longer leads to undefined behavior, thanks to a report by \IKirill Müller in PR#17756. Further, ‘x[[-Inf]]’ and ‘x[[-n]]’ now give more helpful error messages.
‘Rterm’ now accepts enhanced/arrow keys also with \IConPTY.