Releases: r-hub/R
4.3.0
CHANGES IN R 4.3.0
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 NaNs, including R's
NA.) -
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 a
toeplitz2()variant. -
xy.coords()andxyz.coords()and consequently, e.g.,plot(x,y, log = "y")now signal a classed warning about negative values
ofy(wherelog(.)is NA). 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 = TRUEandfixed = TRUE. Use of
useBytes = TRUEfor performance reasons should no longer be
needed and is discouraged: it may lead to incorrect results. -
apropos()gains an argumentdot_internalswhich 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.levelandconf.argsarguments for
computing and plotting a confidence band for the treatment
function transforming the distribution ofxinto 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 a verbose option. -
type.convert()and henceread.table()get new optiontryLogical = TRUEwith 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 beyond 10^{27} in 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-length
row.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 optiontzonefor 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 an
offset of all 0s. -
solve()for complex inputs now uses argumenttoland by default
checks for ‘computational singularity’ (as it long has done for
numeric inputs). -
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 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 the NVDA 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()and
tryCatchWEMs(). -
As an experimental feature the placeholder
_can now also be used
in the rhs 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,TMPandTEMPare 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 switch giveErr to return
the numeric error as attribute. Relatedly,
stopifnot(all.equal<some>(a, b, ..))is as “smart” now, as
stopifnot(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 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 Tomasz Kalinowski in PR#18485. -
Detection of BLAS/LAPACK in use (
sessionInfo()) with FlexiBLAS
now reports the current backend. -
The "data.frame" method for
subset()now warns about extraneous
arguments, typically catching the use of=instead of==in the
subset expression. -
Calling
a:bwhen numericaorbis 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 using weights; new optional warnWbw 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
valu...
R 4.2.3
CHANGES in R 4.2.3
C-LEVEL FACILITIES:
-
The definition of
DL_FUNCinR_ext/Rdynload.hhas been changed to
be fully C-compliant. This means that functions loaded via for
exampleR_GetCCallableneed to be cast to an appropriate type if
they have any arguments. -
.Machinehas a new elementsizeof.time_tto identify old systems
with a 32-bit type and hence a limited range of date-times (and
limited support for dates millions of years from present).
PACKAGE INSTALLATION:
- (Windows) The default C++ standard had accidentally been left at
C++11 when it was changed to C++14 on Unix.
BUG FIXES:
-
As "POSIXlt" objects may be “partially filled” and their list
components meant to be recycled,length()now is the length of
the longest component. -
as.POSIXlt.Date()could underflow for dates in the far past (more
than half a million years BCE). -
as.Date.POSIXlt(x)would return "1970-01-01" instead ofNAin R
4.2.2, e.g., forx <- as.POSIXlt(c("2019-01-30","2001-1-1")) x$mon <- c(0L, NA); as.Date(x) -
R CMD checkfailed to apply enabled_R_CHECK_SUGGESTS_ONLY_to
examples and vignettes (regression in R 4.2.0). -
R CMD checkdid not re-build vignettes in separate processes by
default (regression in R 4.2.0). -
Running examples from HTML documentation now restores previous
knitr settings and options (PR#18420). -
Quartz: fonts are now located using Core Graphics API instead of
deprecated ATS which is no longer supported in the macOS 13 SDK
(PR#18426). This also addresses an issue where the currently
used font in the Quartz device context was not correctly
retained. -
(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
GraphApp due to which the symbol charset was not used with TT
Symbol font face. -
(Windows) Installing a package with a
src/Makefile.{win,ucrt}
file includes~/.R/Makevars.win64in the search for user
makevars, as documented in “R Installation and Administration”
and done for packages with asrc/Makevars.{win,ucrt}file. -
format(<POSIXlt_w/_unbalanced_sec>, "....%OS<n>")withn > 0no
longer accidentally uses the unbalanced seconds, thanks to
Suharto Anggono's report (including patch) in PR#18448. -
solve.default(a, b)works around issues with some versions of
LAPACK when a contains NA or NaN values. -
When
UseMethod()cannot dispatch, it no longer segfaults
producing the error message in case of a longclass(), thanks to
Joris Vankerschaver's report (including patch) in PR#18447. -
When
example(foo, ..)produces graphics on an interactive device
it needs to open itself, it now leavesdevAskNewPage()unchanged
even when it wasFALSE, thus fixing a 14 years old ‘’. -
packageDescription()again catches errors from encoding
conversions. This also fixes brokenpackageVersion()in C locale
on systems where iconv does not support transliteration.
4.2.2
CHANGES IN R 4.2.2
NEW FEATURES:
-
tools::Rdiff(useDiff = TRUE)checks for the presence of an
external diff command and switches touseDiff = FALSEif none is
found. This allowsR CMD Rdiffto always work. -
On Windows, environment variable
R_LIBCURL_SSL_REVOKE_BEST_EFFORT
can be used to switch to only ‘best-effort’ SSL certificate
revocation checks with the default "libcurl" download method.
This reduces security, but may be needed for downloads to work
with MITM proxies (PR#18379). -
(macOS) The run-time check for libraries from XQuartz for X11 and
Tcl/Tk no longer uses otool from the Apple Developer Tools
(PR#18400). -
The LaTeX style for producing the PDF manuals,
Rd.sty, now loads
the standard amsmath, amsfonts and amssymb packages for greater
coverage of math commands in the Rd\eqnand\deqnmacros. The
\mathscrLaTeX command is also provided (via the mathrsfs
package, if available, or the amsfonts bundle otherwise),
fulfilling the wish of PR#18398. -
(Windows) The default format of
readClipboard()and
writeClipboard()has been changed to 13 (CF_UNICODETEXT).
INSTALLATION on a UNIX-ALIKE:
-
The PDF manuals (if built) can be compacted by the new target
make compact-pdf(at the top level or in directorydoc/manual). -
There is now configure support for LLVM 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 LLVM clang 15.
BUG FIXES:
-
Rscript -ewould fail ifstdinwere closed (Reported by Henrik
Bengtsson.) -
qt(*, log.p=TRUE)in outer tails no longer produces NaN in its
final steps, thus fixing PR#18360. -
tools::Rd2latex()now escapes hashes and ampersands when writing
URLs, fixing LaTeX errors with such URLs in\tabular. -
When
isGeneric(f, fdef=*)is used with mismatching names, the
warning is better understandable; reported (with fix) in PR#18370
by Gabe Becker. -
poly(x, n)now works again (and is now documented) whenxis a
"Date" or "POSIXct" object, or of another class while fulfilling
mode(x) == "numeric". This also enablespoly(x, *, raw=TRUE)for
such variables. Reported by Michael Chirico to R-devel. -
write.table(),write.csv()andwrite.csv2()restore their
numerical precision (internal equivalent ofdigits = 15) after an
interrupt (PR#18384). -
One can now read also byte
FFfrom a clipboard connection
(PR#18385). -
source("")andsource(character())now give more helpful error
messages. -
R CMD check --as-cranset_R_CHECK_TIMINGS_too late to have the
intended effect. -
as.POSIXlt(x)now also works with very large datesx, fixing
PR#18401 reported by Hannes Mühleisen. -
Files can now be extracted even from very large zip archives
(PR#18390, thanks to Martin Jakt). -
Non-finite objects of class "POSIXlt" are now correctly coerced
to classes "Date" and "POSIXct"; following up on the extension to
format()them correctly. -
Added methods for
is.finite(),is.infinite()andis.nan()for
"POSIXlt" date-time objects.
BUG FIXES on Windows:
-
Non-ASCII characters are now properly displayed on Windows in
windows created using GraphApp via e.g.winDialogStringthanks to
a workaround for an at least surprising Windows behavior with
UTF-8 as the system encoding (PR#18382). -
Find and replace operations work again in the script editor in
Rgui on Windows. -
Computation of window size based on requested client size in
GraphApp 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. -
Rterm support for Alt+xxx sequences has been fixed to produce the
corresponding character (only) once. This fixes pasting text with
tilde on Italian keyboard (PR#18391).
R 4.2.1
CHANGES IN R 4.2.1
NEW FEATURES:
-
New function
utils::findCRANmirror()to find out if a CRAN mirror
has been selected, otherwise fallback to the main site. This
behaves in the same way astools::CRAN_package_db()and is
intended for packages wishing to access CRAN for purposes other
than installing packages.The need for this was shown by a day when the main CRAN website
was offline and a dozen or so packages which had its URL
hardcoded failed their checks.
INSTALLATION on a UNIX-ALIKE:
-
The libraries searched for by
--with-blas(without a value) now
include BLIS (after OpenBLAS but before ATLAS). And on macOS,
the Accelerate framework (after ATLAS). (This is patterned after
the AX_BLAS macro from the Autoconf Archive.) -
The included LAPACK sources have been updated to 3.10.1.
UTILITIES:
-
The (full path to) the command tidy to be used for HTML
validation can be set by environment variableR_TIDYCMD. -
Setting environment variable
_R_CHECK_RD_VALIDATE_RD2HTML_to a
false value will overrideR CMD check --as-cranand turn off HTML
validation. This provides a way to circumvent a problematic
tidy.The 2006 version that ships with macOS is always skipped.
C-LEVEL FACILITIES:
- The undocumented legacy declarations of
Sint,Sfloat,SINT_MAX
andSINT_MINin headerR.hare deprecated.
BUG FIXES:
-
fisher.test(d)no longer segfaults for "large"d; fixing PR#18336
by preventing/detecting an integer overflow reliably. -
tar(., files=*)now produces correctly the warning about invalid
uid or gid of files, fixing PR#18344, reported by Martin Morgan. -
tk_choose.files()withmulti = FALSEmisbehaved on paths
containing spaces (PR#18334) (regression introduced in R 4.0.0). -
sort(x, partial = ind, *)now works correctly notably for the
non-defaultna.last = FALSEorTRUE, fixing PR#18335 reported by
James Edwards. -
Environment variable
_R_CHECK_XREFS_REPOSITORIES_is only used
for checking.Rdcross-references inR CMD check(as documented)
and not for other uses looking for a CRAN mirror. -
The search for a CRAN mirror when checking packages now uses
getOption("repos")if that specifies a CRAN mirror, even when it
does not also specify all three Bioconductor repositories (as was
previously required). -
The HTML code generated by
tools::Rd2HTML()has been improved to
pass tidy 5.8.0.
BUG FIXES on Windows:
-
Writing to a clipboard connection works again, fixing a
regression in R 4.2.0 (PR#18332). Re-using a closed clipboard
connection longer issues a spurious warning about an ignored
encoding argument. -
C function
getlocaleno 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 Kevin Ushey). -
Accent keys now work in GraphApp 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). -
Completion in Rgui now works also with non-ASCII characters.
-
Rgui no longer truncates usage information with
--help. -
Text injection from external applications via SendInput now works
in GraphApp 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. -
Performance of
txtProgressBar()in Rgui when running in a
multi-byte locale has been improved (fixing a performance
regression in R 4.2.0 for users of systems where R 4.1 used a
single-byte locale). -
The script editor in Rgui now works also on systems using UTF-8
as the native encoding. Users of the script editor have to
convert their scripts with non-ASCII characters to UTF-8 before
reading them in R 4.2.1 or newer (on recent Windows where UTF-8
is used). This fixes a regression in R 4.2.0, which prevented
some operations with scripts when they contained non-ASCII
characters.
devel
tweaks git-svn-id: https://svn.r-project.org/R/trunk@82327 00db46b3-68df-0310-9c12-caf00c1e9a41
next
Ported c82322 from trunk. git-svn-id: https://svn.r-project.org/R/branches/R-4-2-branch@82323 00db46b3-68df-0310-9c12-caf00c1e9a41
4.2.0
CHANGES IN R 4.2.0
SIGNIFICANT USER-VISIBLE CHANGES:
-
The formula method of
aggregate()now matches the generic in
naming its first argumentx(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
namexnow, 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()orwhile()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 wherelength(x)differs
fromn * 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_toTRUE: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 bysapply(). -
Environment variables
R_LIBS_USERandR_LIBS_SITEare both now
set to the R system default if unset or empty, and can be set to
NULLto 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
defaulthow.many = NULLrather than just usingmissing(how.many). -
grid.pretty()gains a new optional argumentn = 5. -
There is a new function
.pretty()with option bounds as a
technical-utility version ofpretty(). It andpretty()gain a
new argumentf.minwith 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 thepretty()improvements, but also because care is
taken e.g., whenylimis finite butdiff(ylim)is infinite. -
nclass.FD()gains adigitsoption. -
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
functionebd0(), currently called only by internaldpois_raw()
improving accuracy for R leveldpois()and potentially others
calling it such asdnbinom(),dgamma()orpgamma(). (Thanks to
Morten Welinder's PR#15628.) -
write.ftable()gainssep = " "argument as suggested by Thomas
Soeiro. -
The names of the locale categories supported by R's
Sys.getlocale()andSys.setlocale()are now provided by variable
.LC.categoriesin the base namespace. -
The Date and POSIXt methods for
hist()and the histogram method
forplot()now also use the new defaultcol = "lightgray"in
consistency with the corresponding change tohist()'s default for
R 4.0.0. -
hist.default()gains newfuzzargument, and the histogram plot
method no longer uses fractional axis ticks when displaying
counts ("Frequency"). -
mapply()and henceMap()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 ruleas.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) <- newnow e.g., preservesnames(ch); ditto
forsubstring(), thanks to a patch from Brodie Gaslam. -
plot(<lm>)gains aextend.ylim.fargument, 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 viacook.colandcook.ltywith a
different default color and their legend is nicer by default and
customizable viacook.legendChanges. -
Attempting to subset an object that is not subsettable now
signals an error of classnotSubsettableError. 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
classsubscriptOutOfBoundsError. -
Stack-overflow errors are now signaled as errors inheriting from
classstackOverflowError. See?stackOverflowErrorfor more
details. -
New partly experimental
Sys.setLanguage()utility, solving the
main problem of PR#18055. -
gettext()andgettextf()get a new optiontrim = TRUEwhich when
set to false allows translations for strings such as"Execution halted\n"typical for C code. -
An experimental implementation of hash tables is now available.
See?hashtabfor 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 tosort()
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
onas.vector(<data.frame>)to return the unchanged data frame. -
legend()is now vectorized for argumentscex,x.intersp, and
text.width. The latter can now also be specified as a vector
(one element for each column of the legend) or asNAfor
computing a proper column wise maximum value ofstrwidth(legend).
The argumenty.interspcan be specified as a vector with one
entry for each row of the legend.legend()also gains new argumentstitle.cexandtitle.font.
Thanks to Swetlana Herbrandt. -
Deparsing no longer remaps attribute names
dim,dimnames,levels,
namesandtspto historical S-compatible names (whichstructure()
maps back). -
sample()andsample.int()have additional sanity checks on their
sizeandnarguments.all.equal.numeric()gains a sanity check on itstolerance
argument - callingall.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 byR CMD check) has a more robust sanity check
on the format of\alias{}commands. -
psigamma(x, deriv)for negativexnow also works forderiv = 4
and5; their underlying C leveldpsifn()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, withy ~ 1for the
one-sample (Kolmogorov) test andy ~ groupfor the two-sample
(Smirnov) test. Contributed by Torsten Hothorn. -
The return value from
ks.test()now has classc("ks.test", "htest")- packages usingtry()need to take care to use
inherits()and not==on the class. -
New functions
psmirnov(),qsmirnov()andrsmirnov()in package
stats implementing the asymptotic and exact distributions of the
two-sample Smirnov statistic. -
iconv()now allowssub = "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>, *)no...
4.1.3
CHANGES IN R 4.1.3
# NEW FEATURES:- The default version of Bioconductor has been changed to 3.14.
(This is used bysetRepositoriesand the menus in GUIs.)
UTILITIES:
R CMD check --as-cranhas a workaround for a bug in versions of
file up to at least 5.41 which mis-identify DBF files last
changed in 2022 as executables.
C-LEVEL FACILITIES:
- The legacy S-compatibility macros
SINGLE_*inR_ext/Constants.h
(included byR.h) are deprecated and will be removed in R 4.2.0.
BUG FIXES:
-
Initialization of self-starting
nls()models with initialization
functions following the pre-R-4.1.0 API (without the ...
argument) works again for now, with a deprecation warning. -
Fixed quoting of
~autodetect~in Java setting defaults to avoid
inadvertent user lookup due to leading~, reported in PR#18231 by
Harold Gutch. -
substr(., start, stop) <- vnow treats negative stop values
correctly. Reported with a patch in PR#18228 by Brodie 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 Mikael Jagan. -
...names()now matchesnames(list(...))closely, fixing PR#18247. -
all.equal(*, scale = s)now works as intended whenlength(s) > 1,
partly thanks to Michael Chirico's PR#18272. -
print(x)for long vectors x now also works for named atomic
vectors or lists and prints the correct number when reaching the
getOption("max.print")limit; partly thanks to a report and
proposal by Hugh Parsonage to the R-devel list. -
all.equal(<selfStart>, *)no longer signals a deprecation
warning. -
reformulate(*, response=r)gives a helpful error message now when
length(r) > 1, thanks to Bill Dunlap's PR#18281. -
Modifying
globalCallingHandlersinsidewithCallingHandlers()now
works or fails correctly, thanks to Henrik Bengtsson's PR#18257. -
hist(<Date>, breaks = "days")andhist(<POSIXt>, breaks = "secs")
no longer fail for inputs of length 1. -
qbeta(.001, .9, .009)and similar cases now converge correctly
thanks to Ben Bolker's report in PR#17746. -
window(x, start, end)no longer wrongly signals "'start' cannot
be after 'end'", fixing PR#17527 and PR#18291. -
data()now checks that its (rarely used) list argument is a
character vector - a couple of packages passed other types and
gave incorrect results. -
which()now checks itsarr.indargument isTRUErather coercing
to logical and taking the first element - which gave incorrect
results in package code. -
model.weights()andmodel.offset()more carefully extract their
model components, thanks to Ben Bolker and Tim Taylor's R-devel
post. -
list.files(recursive = TRUE)now shows all broken symlinks
(previously, some of them may have been omitted, PR#18296).
R 4.1.2
CHANGES IN R 4.1.2
# C-LEVEL FACILITIES:-
The workaround in headers
R.handRmath.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 beenstd::log()) with an int argument
are reported on Solaris. -
The undocumented limit of 4095 bytes on messages from the
S-compatibility macrosPROBLEMandMESSAGEis now documented and
longer messages will be silently truncated rather than
potentially causing segfaults. -
If the
R_NO_SEGV_HANDLERenvironment 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 ofRf_errorandRf_warninghas long
been preferred.
BUG FIXES:
-
.mapply(F, dots, .)no longer segfaults when dots is not a list
and usesmatch.fun(F)as always documented; reported by Andrew
Simmons in PR#18164. -
hist(<Date>, ...) and hist(<POSIXt>, ...)no longer pass
arguments forrect()(such ascolanddensity) toaxis().
(Thanks to Sebastian Meyer's PR#18171.) -
\Sexpr{ch}now preservesEncoding(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 keepsnames(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 somedo.call(). Thanks to Alexander Kaever's
suggestion posted to R-devel. -
qqline(y = <object>)such asy=I(.), now works, see also
PR#18190. -
Non-integer
mgppar()settings are now handled correctly in
axis()andmtext(), thanks to Mikael Jagan and Duncan Murdoch's
report and suggestion in PR#18194. -
formatC(x)returns length zerocharacter()now, rather than""
whenxis of length zero, as documented, thanks to Davis
Vaughan's post to R-devel. -
removeSource(fn)now retains (other) attributes(fn).
R 4.1.1
CHANGES IN R 4.1.1
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 tomethod = "libcurl"and not routinely
tested. (Nowadays no major browser supports them.) -
The non-default
method = "internal"is deprecated forhttp://and
ftp://URIs for bothdownload.fileandurl. -
On Windows,
method = "wininet"is deprecated forhttp://,
https://andftp://URIs for both download.file and url. (A
warning is only given forftp://.)For
ftp://URIs the default method is now"libcurl"if available
(which it is on CRAN builds).method = "wininet"remains the default forhttp://andhttps://
URIs but if libcurl is available, usingmethod = "libcurl"is
preferred.
INSTALLATION:
make checknow works also without a LaTeX installation. (Thanks
to Sebastian Meyer's PR#18103.)
BUG FIXES:
-
make check-develworks again in an R build configured with
--without-recommended-packages. -
qnbinom(p, size, mu)for large size/mu is correct now in a range
of cases (PR#18095); similarly for the (size, prob)
parametrization of the negative binomial. Alsoqpois()and
qbinom()are better and or faster for extreme cases. The
underlying C code has been modularized and is common to all four
cases of discrete distributions. -
gap.axisis now part of theaxis()arguments which are passed
frombxp(), and henceboxplot(). (Thanks to Martin Smith's
report and suggestions in PR#18109.) -
.Firstand.Lastcan again be set from the site profile. -
seq.int(from, to, *)andseq.default(..)now work better in large
range cases where from-to is infinite where the two boundaries
are finite. -
all.equal(x,y)now returnsTRUEcorrectly also when several
entries ofabs(x)andabs(y)are close to.Machine$double.xmax,
the largest finite numeric. -
model.frame()now clears the object bit when removing the class
attribute of a value via na.action (PR#18100). -
charClass()now works with multi-character strings on Windows
(PR#18104, fixed by Bill Dunlap). -
encodeString()on Solaris now works again in Latin-1 encoding on
characters represented differently in UTF-8. Support for
surrogate pairs on Solaris has been improved. -
file.show()on Windows now works with non-ASCII path names
representable in the current native encoding (PR#18132). -
Embedded R on Windows can now find R home directory via the
registry even when installed only for the current user
(PR#18135). -
pretty(x)with finite x now returns finite values also in the
case where the extreme x values are close in size to the maximal
representable number.Machine$double.xmax.Also, it's been tweaked for very small ranges and when a boundary
is close (or equal) to zero; e.g.,pretty(c(0,1e-317))no longer
has negative numbers, currently still warning about a very small
range, andpretty(2^-(1024 - 2^-1/(c(24,10))))is more accurate. -
The error message for not finding vignette files when weaving has
correct file sizes now. (Thanks to Sebastian Meyer's PR#18154.) -
dnbinom(20, <large>, 1)now correctly gives 0, and similar cases
are more accurate with underflow precaution. (Reported by
Francisco Vera Alcivar in PR#18072.)