Releases: r-hub/R
R 4.1.0
CHANGES IN R 4.1.0
# FUTURE DIRECTIONS:- It is planned that the 4.1.x series will be the last to support
32-bit Windows, with production of binary packages for that
series continuing until early 2023.
SIGNIFICANT USER-VISIBLE CHANGES:
- Data set esoph in package datasets now provides the correct
numbers of controls; previously it had the numbers of cases added
to these. (Reported by Alexander Fowler in PR#17964.)
NEW FEATURES:
-
www.omegahat.net is no longer one of the repositories known by
default to setRepositories(). (Nowadays it only provides source
packages and is often unavailable.) -
Function
package_dependencies()(in package tools) can now use
different dependency types for direct and recursive dependencies. -
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 Jan Gorecki. -
Using
c()to combine a factor with other factors now gives a
factor, an ordered factor when combining ordered factors with
identical levels. -
apply()gains asimplifyargument to allow disabling of
simplification of results. -
The
format()method for class "ftable" gets a new optionjustify.
(Suggested by Thomas Soeiro.) -
New
...names()utility. (Proposed by Neal Fultz in PR#17705.) -
type.convert()now warns when its as.is argument is not
specified, as the help file always said it should. In that
case, the default is changed toTRUEin line with its change in
read.table()(related tostringsAsFactors) in R 4.0.0. -
When printing list arrays, classed objects are now shown via
theirformat()value if this is a short enough character string,
or by giving the first elements of their class vector and their
length. -
capabilities()gets new entry "Rprof" which isTRUEwhen R has
been configured with the equivalent of--enable-R-profiling(as
it is by default). (Related to Michael Orlitzky's report
PR#17836.) -
str(xS4)now also shows extraneous attributes of an S4 object
xS4. -
Rudimentary support for vi-style tags in
rtags()andR CMD rtags
has been added. (Based on a patch from Neal Fultz in PR#17214.) -
checkRdContents()is now exported from tools; it and also
checkDocFiles()have a new optionchkInternalallowing to check
Rd files marked with keyword "internal" as well. The latter can
be activated forR CMD checkvia environment variable
_R_CHECK_RD_INTERNAL_TOO_. -
New functions
numToBits()andnumToInts()extend the raw
conversion utilities to (double precision) numeric. -
Functions
URLencode()andURLdecode()in package utils now work
on vectors of URIs. (Based on patch from Bob Rudis submitted
with PR#17873.) -
path.expand()can expand~useron most Unix-alikes even when
readline is not in use. It tries harder to expand~, for example
should environment variableHOMEbe unset. -
For HTML help (both dynamic and static), Rd file links to help
pages in external packages are now treated as references to
topics rather than file names, and fall back to a file link only
if the topic is not found in the target package. The earlier rule
which prioritized file names over topics can be restored by
setting the environment variable_R_HELP_LINKS_TO_TOPICS_to a
false value. -
c()now removesNULLarguments before dispatching to methods,
thus simplifying the implementation ofc()methods, but for
back compatibility keepsNULLwhen it is the first argument.
(From a report and patch proposal by Lionel Henry in PR#17900.) -
Vectorize()'s result function's environment no longer keeps
unneeded objects. -
Function
...elt()now propagates visibility consistently with
..n. (Thanks to Lionel Henry's PR#17905.) -
capture.output()no longer uses non-standard evaluation to
evaluate its arguments. This makes evaluation of functions like
parent.frame()more consistent. (Thanks to Lionel Henry's
PR#17907.) -
packBits(bits, type="double")now works as inverse of
numToBits(). (Thanks to Bill Dunlap's proposal in PR#17914.) -
curlGetHeaders()has two new arguments, timeout to specify the
timeout for that call (overridinggetOption("timeout")) and TLS
to specify the minimum TLS protocol version to be used for
https://URIs (inter alia providing a means to check for sites
using deprecated TLS versions 1.0 and 1.1). -
For
nls(), an optional constantscaleOffsetmay be added to the
denominator of the relative offset convergence test for cases
where the fit of a model is expected to be exact, thanks to a
proposal by John Nash.nls(*, trace=TRUE)now also shows the
convergence criterion. -
Numeric differentiation via
numericDeriv()gets new optional
argumentsepsandcentral, the latter for taking central divided
differences. The latter can be activated fornls()via
nls.control(nDcentral = TRUE). -
nls()now passes thetraceandcontrolarguments togetInitial(),
notably for all self-starting models, so these can also be fit in
zero-noise situations via ascaleOffset. For this reason, the
initial function of a selfStart model must now have...in its
argument list. -
bquote(splice = TRUE)can now splice expression vectors with
attributes: this makes it possible to splice the result of
parse(keep.source = TRUE). (Report and patch provided by Lionel
Henry in PR#17869.) -
textConnection()gets an optionalnameargument. -
get(),exists(), andget0()now signal an error if the first
argument has length greater than 1. Previously additional
elements were silently ignored. (Suggested by Antoine Fabri on
R-devel.) -
R now provides a shorthand notation for creating functions, e.g.
\(x) x + 1is parsed asfunction(x) x + 1. -
R now provides a simple native forward pipe syntax
|>. The
simple form of the forward pipe inserts the left-hand side as the
first argument in the right-hand side call. The pipe
implementation as a syntax transformation was motivated by
suggestions from Jim Hester and Lionel Henry. -
all.equal(f, g)for functions now by default also compares their
environment(.)s, notably via newall.equalmethod for class
function. Comparison ofnls()fits, e.g., may now need
all.equal(m1, m2, check.environment = FALSE). -
.libPaths()gets a new optioninclude.site, allowing to not
include the site library. (Thanks to Dario Strbenac's suggestion
and Gabe Becker's PR#18016.) -
Lithuanian translations are now available. (Thanks to Rimantas
Zakauskas.) -
names()now works forDOTSXPobjects. On the other hand, in
R-lang, the R language manual, we now warn against relying on the
structure or even existence of such dot-dot-dot objects. -
all.equal()no longer gives an error onDOTSXPobjects. -
capabilities("cairo")now applies only to the file-based devices
as it is now possible (if very unusual) to build R with Cairo
support for those but not forX11(). -
There is optional support for tracing the progress of
loadNamespace()- see its help. -
(Not Windows.)
l10n_info()reports an additional element, the
name of the encoding as reported by the OS (which may differ from
the encoding part (if any) of the result from
Sys.getlocale("LC_CTYPE"). -
New function
gregexec()which generalizesregexec()to find all
disjoint matches and all substrings corresponding to
parenthesized subexpressions of the given regular expression.
(Contributed by Brodie Gaslam.) -
New function
charClass()in package utils to query the
wide-character classification functions in use (such as
iswprint). -
The names of
quantile()'s result no longer depend on the global
getOption("digits"), but quantile() gets a new optional argument
digits = 7instead. -
grep(),sub(),regexpand variants work considerably faster for
long factors with few levels. (Thanks to Michael Chirico's
PR#18063.) -
Provide grouping of
x11()graphics windows within a window
manager such as Gnome or Unity; thanks to a patch by Ivan Krylov
posted to R-devel. -
The
split()method for class data.frame now allows thefargument
to be specified as a formula. -
sprintfnow warns on arguments unused by the format string. -
New palettes "Rocket" and "Mako" for
hcl.colors()(approximating
palettes of the same name from the viridisLite package).Contributed by Achim Zeileis.
-
The base environment and its namespace are now locked (so one can
no longer add bindings to these or remove from these). -
Rterm handling of multi-byte characters has been improved,
allowing use of such characters when supported by the current
locale. -
Rterm now accepts ALT+ +xxxxxxxx sequences to enter Unicode
characters as hex digits. -
Environment variable
LC_ALLon Windows now takes precedence over
`LC_CTYP...
R 4.0.5
CHANGES IN R 4.0.5
BUG FIXES:
-
The change to the internal table in R 4.0.4 for
iswprinthas been
reverted: it contained some errors in printability of 'East
Asian' characters. -
For packages using
LazyData,R CMD buildignored the
--resave-dataoption and the BuildResaveData field of the
DESCRIPTIONfile (in R versions 4.0.0 to 4.0.4).
R 4.0.4
CHANGES IN R 4.0.4
# NEW FEATURES:-
File
share/texmf/tex/latex/jss.clshas been updated to work with
LaTeX versions since Oct 2020. -
Unicode character width tables (as used by
nchar(, type = "w"))
have been updated to Unicode 12.1 by Brodie Gaslam (PR#17781),
including many emoji. -
The internal table for
iswprint(used on Windows, macOS and AIX)
has been updated to include many recent Unicode characters.
INSTALLATION on a UNIX-ALIKE:
- If an external BLAS is specified by
--with-blas=fooor via
environment variableBLAS_LIBSis not found, this is now a
configuration error. The previous behaviour was not clear from
the documentation: it was to continue the search as if
--with-blas=yeswas specified.
BUG FIXES:
-
all.equal(x,y)now "sees" the two differentNAs in factors,
thanks to Bill Dunlap and others in PR#17897. -
(~ NULL)[1]and similar formula subsetting now works, thanks to a
report and patch by Henrik Bengtsson in PR#17935. Additionally,
subsetting leaving an empty formula now works too, thanks to
suggestions by Suharto 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 Brodie Gaslam. -
unlist(plst, recursive=FALSE)no longer drops content for
pairlists with list components, thanks to the report and patch by
Suharto Anggono in PR#17950. -
iconvlist()now also works on MUSL based (Linux) systems, from a
report and patch suggestion by Wesley Chan in PR#17970. -
round()andsignif()no longer tolerate wrong argument names,
notably in 1-argument calls; reported by Shane Mueller on R-devel
(mailing list); later reported as PR#17976. -
.Machinehaslongdouble.*elements only if
capabilities("long.double")is true, as documented. (Previously
they were included if the platform had long double identical to
double, as ARM does.) -
p.adjust(numeric(), n=0)now works, fixing PR#18002. -
identical(x,y)no longer prints "Unknown Type .." fortypeof(x) == "..."objects. -
Fix (auto-)print()ing of named complex vectors, see PR#17868 and
PR#18019. -
all.equal(<language>, <...>)now works, fixing PR#18029. -
as.data.frame.list(L, row.names=NULL)now behaves in line with
data.frame(), disregarding names of components ofL, fixing
PR#18034, reported by Kevin Tappe. -
checkRdaFiles(ff)$versionis now correct also whenffcontains
files of different versions, thanks to a report and patch from
Sebastian Meyer in PR#18041. -
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 Big Sur). System log may show
"CGContextDelegateCreateForContext: invalid context"error.
R 4.0.3
CHANGES IN R 4.0.3
# NEW FEATURES:-
On platforms using configure option
--with-internal-tzcode,
additional values"internal"and (on macOS only)"macOS"are
accepted for the environment variableTZDIR. (See?TZDIR.)On macOS,
"macOS"is used by default if the system timezone
database is a newer version than that in the R installation. -
When
install.packages(type = "source")fails to find a package in
a repository it mentions package versions which are excluded by
their R version requirement and links to hints on why a package
might not be found. -
The default value for
options("timeout")can be set from
environment variableR_DEFAULT_INTERNET_TIMEOUT, still defaulting
to 60 (seconds) if that is not set or invalid.This may be needed when child R processes are doing downloads,
for example during the installation of source packages which
download jars or other forms of data.
LINK-TIME OPTIMIZATION on a UNIX-ALIKE:
-
There is now support for parallelized Link-Time Optimization
(LTO) with GCC and for 'thin' LTO with clang via setting the
LTO macro. -
There is support for setting a different
LTOflag for the Fortran
compiler, including to empty when mixing clang and gfortran (as
on macOS). See fileconfig.site. -
There is a new
LTO_LDmacro to set linker options for LTO
compilation, for example to select an alternative linker or to
parallelize thin LTO.
DEPRECATED AND DEFUNCT:
- The
LINPACKargument tochol.default(),chol2inv(),
solve.default()andsvd()has been defunct since R 3.1.0. Using
it now gives a warning which will become an error in R 4.1.0.
BUG FIXES:
-
The code mitigating stack overflow with PCRE regexps on very long
strings is enabled for PCRE2 < 10.30 also when JIT is enabled,
since stack overflows have been seen in that case. -
Fix to correctly show the group labels in
dotchart()(which where
lost in the ylab improvement for R 4.0.0). -
addmargins(*, ..)now also works whenfn()is a local function,
thanks to bug report and patch PR#17124 from Alex Bertram. -
rank(x)and hencesort(x)now work when x is an object (as per
is.object(x))of type "raw" and provides a valid[method,
e.g., forgmp::as.bigz(.)numbers. -
chisq.test(*, simulate.p.value=TRUE)andr2dtable()now work
correctly for large table entries (in the millions). Reported by
Sebastian Meyer and investigated by more helpers in PR#16184. -
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 Dmitriy Selivanov in PR#17850. -
quantile(x, pr)works more consistently for pr values slightly
outside [0,1], thanks to Suharto Anggono's PR#17891.Further,
quantile(x, prN, names=FALSE)now works even when prN
containsNAs, thanks to Anggono's PR#17892. Ditto for ordered
factors or Date objects whentype = 1or3, thanks to PR#17899. -
Libcurl-based internet access, including
curlGetHeaders(), was
not respecting the"timeout"option. If this causes
unanticipated timeouts, consider increasing the default by
settingR_DEFAULT_INTERNET_TIMEOUT. -
as.Date(<char>)now also works with an initial "", thanks to
Michael Chirico's PR#17909. -
isS3stdGeneric(f)now detects an S3 generic also when it it is
trace()d, thanks to Gabe Becker's PR#17917. -
R_allocLD()has been fixed to return memory aligned for long
double type PR#16534. -
fisher.test()no longer segfaults when called again after its
internal stack has been exceeded PR#17904. -
Accessing a long vector represented by a compact integer sequence
no longer segfaults (reported and debugged by Hugh Parsonage). -
duplicated()now works also for strings with multiple encodings
inside a single vector PR#17809. -
phyper(11, 15, 0, 12, log.p=TRUE)no longer gives NaN; reported
as PR#17271 by Alexey Stukalov. -
Fix incorrect calculation in
logLik.nls()PR#16100, patch from
Sebastian Meyer. -
A very old bug could cause a segfault in
model.matrix()when
terms involved logical variables. Part of PR#17879. -
model.frame.default()allowed data = 1, leading to involuntary
variable capture (rest of PR#17879). -
tar()no longer skips non-directory files, thanks to a patch by
Sebastian Meyer, fixing the remaining part of PR#16716.
R 4.0.2
CHANGES IN R 4.0.2
# UTILITIES:R CMD checkskips vignette re-building (with a warning) if the
VignetteBuilder package(s) are not available.
BUG FIXES:
-
Paths with non-ASCII characters caused problems for package
loading on Windows PR#17833. -
Using tcltk widgets no longer crashes R on Windows.
-
source(*, echo=TRUE)no longer fails in some cases with empty
lines; reported by Bill Dunlap in PR#17769. -
on.exit()now correctly matches named arguments, thanks to
PR#17815 (including patch) by Brodie Gaslam. -
regexpr(*, perl=TRUE)no longer returns incorrect positions into
text containing characters outside of the Unicode Basic
Multilingual Plane on Windows.
R 4.0.1
CHANGES IN R 4.0.1
# NEW FEATURES:-
paste()andpaste0()gain a new optional argumentrecycle0. When
set to true, zero-length arguments are recycled leading to
character(0)after thesep-concatenation, i.e., to the empty
string""ifcollapseis a string and to the zero-length value
character(0)when collapse =NULL.A package whose code uses this should depend on R (>= 4.0.1).
-
The
summary(<warnings>)method now maps the counts correctly to
the warning messages.
BUG FIXES:
-
aov(frml, ...)now also works where the formula deparses to more
than 500 characters, thanks to a report and patch proposal by Jan
Hauffa. -
Fix a dozen places (code, examples) as
Sys.setlocale()returns
the new rather than the previous setting. -
Fix for adding two complex grid units via
sum(). Thanks to Gu
Zuguang for the report and Thomas Lin Pedersen for the patch. -
Fix
parallel::mclapply(..., mc.preschedule=FALSE)to handle raw
vector results correctly. PR#17779 -
Computing the base value, i.e., 2, "everywhere", now uses
FLT_RADIX, as the original machar code looped indefinitely on the
ppc64 architecture for the longdouble case. -
In R 4.0.0,
sort.list(x)whenis.object(x)was true, e.g., forx <- I(letters), was accidentally usingmethod = "radix".
Consequently, e.g.,merge(<data.frame>)was much slower than
previously; reported in PR#17794. -
plot(y ~ x, ylab = quote(y[i]))now works, as e.g., for xlab;
related to PR#10525. -
parallel::detect.cores(all.tests = TRUE)tries a matching OS name
before the other tests (which were intended only for unknown
OSes). -
Parse data for raw strings is now recorded correctly. Reported by
Gabor Csardi.
R 4.0.0
Tag version 4.0.0 git-svn-id: https://svn.r-project.org/R/tags/R-4-0-0@78287 00db46b3-68df-0310-9c12-caf00c1e9a41
3.6.3
Tag version 3.6.3 git-svn-id: https://svn.r-project.org/R/tags/R-3-6-3@77876 00db46b3-68df-0310-9c12-caf00c1e9a41
R 3.6.2
Tag version 3.6.2 git-svn-id: https://svn.r-project.org/R/tags/R-3-6-2@77561 00db46b3-68df-0310-9c12-caf00c1e9a41
3.6.1
Tag version 3.6.1 git-svn-id: https://svn.r-project.org/R/tags/R-3-6-1@76783 00db46b3-68df-0310-9c12-caf00c1e9a41