R 4.3.0 is now the default version on migale's R and also on RStudio
3.17 (BiocManager 1.30.20)
2023.03.1+446
CHANGES IN R 4.3.0
NEW FEATURES
SIGNIFICANT USER-VISIBLE CHANGES
-
Calling
&&
or||
with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form'length = 4' in coercion to 'logical(1)'
Environment variable _R_CHECK_LENGTH_1_LOGIC2_ no longer has any effect.
NEW FEATURES
-
The included BLAS sources have been updated to those shipped with LAPACK version 3.10.1. (This caused some platform-dependent changes to package check output.) And then to the sources from LAPACK version 3.11.0 (with changes only to double complex subroutines).
-
The included LAPACK sources have been updated to include the four Fortran 90 routines rather than their Fortran 77 predecessors. This may give some different signs in SVDs or eigendecompositions.. (This completes the transition to LAPACK 3.10.x begun in R 4.2.0.)
-
The LAPACK sources have been updated to version 3.11.0. (No new subroutines have been added, so this almost entirely bug fixes: Those fixes do affect some computations with
NaN
s, including R'sNA
.) -
The parser now signals classed errors, notably in case of the pipe operator
|>
. The error object and message now give line and column numbers, mostly as proposed and provided by Duncan Murdoch in PR#18328. -
toeplitz()
is now generalized for asymmetric cases, with atoeplitz2()
variant. -
xy.coords()
andxyz.coords()
and consequently, e.g.,plot(x,y, log = "y")
now signal a classed warning about negative values of y (wherelog(.)
isNA
). Such a warning can be specifically suppressed or caught otherwise. -
Regular expression functions now check more thoroughly whether their inputs are valid strings (in their encoding, e.g. in UTF-8).
-
The performance of
grep()
,sub()
,gsub()
andstrsplit()
has been improved, particularly withperl = TRUE
andfixed = TRUE
. Use ofuseBytes = TRUE
for performance reasons should no longer be needed and is discouraged: it may lead to incorrect results. -
apropos()
gains an argumentdot_internals
which is used by the completion (help(rcompgen)
) engine to also see base internals such as.POSIXct()
. -
Support in
tools::Rdiff()
for comparing uncompressed PDF files is further reduced – see its help page. -
qqplot(x, y, ...)
gainsconf.level
andconf.args
arguments for computing and plotting a confidence band for the treatment function transforming the distribution ofx
into the distribution ofy
(Switzer, 1976, Biometrika). Contributed by Torsten Hothorn. -
Performance of
package_dependencies()
has been improved for cases when the number of dependencies is large. -
Strings newly created by
gsub()
,sub()
andstrsplit()
, when any of the inputs is marked as"bytes"
, are also marked as"bytes"
. This reduces the risk of creating invalid strings and accidental substitution of bytes deemed invalid. -
Support for
readLines(encoding = "bytes")
has been added to allow processing special text files byte-by-byte, without creating invalid strings. -
iconv(from = "")
now takes into account any declared encoding of the input elements and uses it in preference to the native encoding. This reduces the risk of accidental creation of invalid strings, particularly when different elements of the input have different encoding (including"bytes"
). -
Package repositories in
getOption("repos")
are now initialized from the ‘repositories’ file when utils is loaded (if not already set, e.g., in ‘.Rprofile’). (From a report and patch proposal by Gabriel Becker in PR#18405.) -
compactPDF()
gets averbose
option. -
type.convert()
and henceread.table()
get new optiontryLogical = TRUE
with back compatible default. When set to false, converts"F"
or"T"
columns to character. -
Added new unit prefixes
"R"
and"Q"
for abbreviating (unrealistically large) sizes beyondin
standard = "SI"
, thanks to Henrik 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 Benjamin Feakins. -
The
as.data.frame.vector()
utility now errors for wrong-lengthrow.names
. It warned for almost six years, with “Will be an error!”. -
sessionInfo()
now also containsLa_version()
and reports codepage and timezone when relevant, in bothprint()
andtoLatex()
methods which also get new optiontzone
for displaying timezone information whenlocale = FALSE
. -
New function
R_compiled_by()
reports the C and Fortran compilers used to build R, if known. -
predict(<lm>, newdata = *)
no longer unnecessarily creates anoffset
of all0
s. -
solve()
for complex inputs now uses argumenttol
and by default checks for ‘computational singularity’ (as it long has done for numeric inputs). -
predict(<rank-deficient lm>, newdata=*)
now obeys a new argumentrankdeficient
, with new default"warnif"
, warning only if there are non-estimable cases innewdata
. Other options includerankdeficient = "NA"
, predictingNA
for non-estimablenewdata
cases. This addresses PR#15072 by Russ Lenth and is based on his original proposal and discussions in PR#16158 also by David Firth and Elin Waring. Still somewhat experimental. -
Rgui
console implementation now works better with theNVDA
screen reader when the full blinking cursor is selected. The underlying improvements in cursor handling may help also other screen readers on Windows. -
The drop-field control in GraphApp 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. -
qnorm(<very large negative>, log.p=TRUE)
is now fully accurate (instead of to “only” minimally five digits). -
demo(error.catching)
now also shows offwithWarnings()
andtryCatchWEMs()
. -
As an experimental feature the placeholder
_
can now also be used in therhs
of a forward pipe|>
expression as the first argument in an extraction call, such as_$coef
. More generally, it can be used as the head of a chain of extractions, such as_$coef[[2]]
. -
Spaces in the environment variable used to choose the R session's temporary directory (TMPDIR, TMP and TEMP are tried in turn) are now fatal. (On Windows the ‘short path’ version of the path is tried and used if that does not contain a space.)
-
all.equal.numeric()
gets a new optional switchgiveErr
to return the numeric error as attribute. Relatedly,stopifnot(all.equal<some>(a, b, ..))
is as “smart” now, asstopifnot(all.equal(....))
has been already, thus allowing customizedall.equal<Some>()
wrappers. -
R on Windows is now able to work with path names longer than 260 characters when these are enabled in the system (requires at least Windows 10 version 1607). Packages should be updated to work with long paths as well, instead of assuming
PATH_MAX
to be the maximum length. Custom front-ends and applications embedding R need to update their manifests if they wish to allow this feature. See https://blog.r-project.org/2023/03/07/path-length-limit-on-windows for more information. -
‘Object not found’ and ‘Missing argument’ errors now give a more accurate error context. Patch provided by Lionel Henry in PR#18241.
-
The
@
operator is now an S3 generic. Based on contributions by Tomasz 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 Tomasz Kalinowski in PR#18484. -
inherits(x, what)
now accepts values other than a simple character vector for argumentwhat
. A new generic,nameOfClass()
, is called to resolve the class name fromwhat
. This supports experimenting with alternative object systems. Based on contributions by Tomasz Kalinowski in PR#18485. -
Detection of BLAS/LAPACK in use (
sessionInfo()
) with FlexiBLAS now reports the current backend. -
The
"data.frame"
method forsubset()
now warns about extraneous arguments, typically catching the use of ‘=’ instead of ‘==’ in thesubset
expression. -
Calling
a:b
when numerica
orb
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 Henrik Bengtsson. -
density(x, weights = *)
now warns if automatic bandwidth selection happens without usingweights
; new optionalwarnWbw
may suppress the warning. Prompted by Christoph Dalitz' PR#18490 and its discussants. -
rm(list = *)
is faster and more readable thanks to Kevin Ushey's PR#18492. -
The
plot.lm()
function no longer produces a normal Q-Q plot for GLMs. Instead it plots a half-normal Q-Q plot of the absolute value of the standardized deviance residuals. -
The
print()
method for class"summary.glm"
no longer shows summary statistics for the deviance residuals by default. Its optional argumentshow.residuals
can be used to show them if required. -
The
tapply()
function now accepts a data frame as itsX
argument, and allowsINDEX
to be a formula in that case.by.data.frame()
similarly allowsINDICES
to be a formula. -
The performance of
df[j] <- value
(including for missingj
) andwrite.table(df)
has been improved for data framesdf
with a large number of columns. (Thanks to Gabriel Becker's PR#18500, PR#18503 and discussants, prompted by a report from Toby Dylan Hocking on the R-devel mailing list.) -
The matrix multiply operator
%*%
is now an S3 generic, belonging to new group genericmatrixOps
. From Tomasz Kalinowski's contribution in PR#18483. -
New function
array2DF()
to convert arrays to data frames, particularly useful for the list arrays created bytapply()
.