-
Notifications
You must be signed in to change notification settings - Fork 310
/
NEWS.Rd
1808 lines (1430 loc) · 77.5 KB
/
NEWS.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% -*- coding: utf-8 -*-
\newcommand{\Rlogo}{\if{html}{\figure{../../html/Rlogo.svg}{options: class="toplogo" alt="[R logo]"}}\if{latex}{\figure{Rlogo.pdf}{options: width=0.5in}}}
\name{NEWS}
\title{R News}
\encoding{UTF-8}
\section{\Rlogo CHANGES IN R-devel}{
\subsection{INSTALLATION}{
\itemize{
\item Facilities for accessing \samp{ftp://} sites are no longer
tested (except \emph{pro tem} for \code{curlGetHeaders()}) as
browsers are increasing removing support.
%% Chrome and Firefox did in early 2021: Safari and Edge never had it.
It is planned to reduce \samp{ftp://} support in future versions
of \R to that provided by \samp{libcurl}.
}
}
}
\section{\Rlogo CHANGES IN R 4.1.0}{
\subsection{FUTURE DIRECTIONS}{
\itemize{
\item 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.
}
}
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\item Data set \code{esoph} in package \pkg{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}.)
}
}
\subsection{NEW FEATURES}{
\itemize{
\item \samp{www.omegahat.net} is no longer one of the repositories
known by default to \code{setRepositories()}. (Nowadays it only
provides source packages and is often unavailable.)
%% it had one Windows binary package for 4.0, none for 3.6.
\item Function \code{package_dependencies()} (in package
\pkg{tools}) can now use different dependency types for direct and
recursive dependencies.
\item The checking of the size of tarball in
\command{R CMD check --as-cran <pkg>} may be tweaked via the new
environment variable
\env{_R_CHECK_CRAN_INCOMING_TARBALL_THRESHOLD_}, as suggested in
\PR{17777} by Jan Gorecki.
\item Using \code{c()} to combine a factor with other factors now
gives a factor, an ordered factor when combining ordered factors
with identical levels.
\item \code{apply()} gains a \code{simplify} argument to allow
disabling of simplification of results.
\item The \code{format()} method for class \code{"ftable"} gets a
new option \code{justify}. (Suggested by Thomas Soeiro.)
\item New \code{...names()} utility. (Proposed by Neal Fultz in
\PR{17705}.)
\item \code{type.convert()} now warns when its \code{as.is} argument
is not specified, as the help file always said it \emph{should}. In
that case, the default is changed to \code{TRUE} in line with its
change in \code{read.table()} (related to \code{stringsAsFactor}) in
\R 4.0.0.
\item When printing list arrays, classed objects are now shown
\emph{via} their \code{format()} value if this is a short enough
character string, or by giving the first elements of their class
vector and their length.
\item \code{capabilities()} gets new entry \code{"Rprof"} which is
\code{TRUE} when \R has been configured with the equivalent of
\command{--enable-R-profiling} (as it is by default). (Related to
Michael Orlitzky's report \PR{17836}.)
\item \code{str(xS4)} now also shows extraneous attributes of an
S4 object \code{xS4}.
\item Rudimentary support for vi-style tags in \code{rtags()} and
\code{R CMD rtags} has been added. (Based on a patch from Neal
Fultz in \PR{17214}.)
\item \code{checkRdContents()} is now exported from \pkg{tools}; it
and also \code{checkDocFiles()} have a new option \code{chkInternal}
allowing to check Rd files marked with keyword \code{"internal"} as
well. The latter can be activated for \command{R CMD check} via
experimental environment variable \env{_R_CHECK_RD_INTERNAL_TOO_}.
\item New functions \code{numToBits()} and \code{numToInts()}
extend the \code{raw} conversion utilities to (double precision)
\code{numeric}.
\item Functions \code{URLencode()} and \code{URLdecode()} in
package \pkg{utils} now work on vectors of URIs.
(Based on patch from Bob Rudis submitted with \PR{17873}.)
\item \code{path.expand()} can expand \samp{~user} on most
Unix-alikes even when \code{readline} is not in use. It tries
harder to expand \samp{~}, for example should environment variable
\env{HOME} be unset.
\item 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 \env{_R_HELP_LINKS_TO_TOPICS_} to
a false value.
\item \code{c()} now removes \code{NULL} arguments before
dispatching to methods, thus simplifying the implementation of
\code{c()} methods, \emph{but} for back compatibility keeps
\code{NULL} when it is the first argument. (From a report and
patch proposal by Lionel Henry in \PR{17900}.)
\item \code{Vectorize()}'s result function's environment no longer
keeps unneeded objects.
\item Function \code{...elt()} now propagates visibility
consistently with \code{..n}. (Thanks to Lionel Henry's
\PR{17905}.)
\item \code{capture.output()} no longer uses non-standard
evaluation to evaluate its arguments. This makes evaluation of
functions like \code{parent.frame()} more consistent. (Thanks to
Lionel Henry's \PR{17907}.)
\item \code{packBits(bits, type="double")} now works as inverse of
\code{numToBits()}. (Thanks to Bill Dunlap's proposal in
\PR{17914}.)
\item \code{curlGetHeaders()} has two new arguments,
\code{timeout} to specify the timeout for that call (overriding
\code{getOption("timeout")}) and \code{TLS} to specify the minimum
TLS protocol version to be used for \code{https://} URIs
(\emph{inter alia} providing a means to check for sites using
deprecated TLS versions 1.0 and 1.1).
\item For \code{nls()}, an optional constant \code{scaleOffset}
may 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. \code{nls(*, trace=TRUE)} now
also shows the convergence criterion.
\item Numeric differentiation \emph{via} \code{numericDeriv()}
gets new optional arguments \code{eps} and \code{central}, the
latter for taking central divided differences. The latter can be
activated for \code{nls()} via \code{nls.control(nDcentral =
TRUE)}.
\item \code{nls()} now passes the \code{trace} and \code{control}
arguments to \code{getInitial()}, notably for all self-starting models,
so these can also be fit in zero-noise situations via a
\code{scaleOffset}. For this reason, the \code{initial} function of a
\code{selfStart} model must now have \code{...} in its argument list.
\item \code{bquote(splice = TRUE)} can now splice expression
vectors with attributes: this makes it possible to splice the
result of \code{parse(keep.source = TRUE)}. (Report and patch
provided by Lionel Henry in \PR{17869}.)
\item \code{textConnection()} gets an optional \code{name} argument.
\item \code{get()}, \code{exists()}, and \code{get0()} 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.)
\item \R{} now provides a shorthand notation for creating functions,
e.g. \code{\(x) x + 1} is parsed as \code{function(x) x + 1}. This
feature is experimental and may change prior to release.
\item \R{} now provides a simple native forward pipe syntax
\code{|>}. 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. This feature is
experimental and may change prior to release.
\item \code{all.equal(f, g)} for \code{function}s now by default also
compares their \code{environment(.)}s, notably via new
\code{all.equal} method for class \code{function}. Comparison of
\code{nls()} fits, e.g., may now need \code{all.equal(m1, m2,
check.environment = FALSE)}.
\item \code{.libPaths()} gets a new option \code{include.site},
allowing to \emph{not} include the site library. (Thanks to Dario
Strbenac's suggestion and Gabe Becker's \PR{18016}.)
\item Lithuanian translations are now available. (Thanks to
Rimantas Žakauskas.)
\item \code{names()} now works for \code{DOTSXP} objects. On the
other hand, in \file{R-lang}, the R language manual, we now warn
against relying on the structure or even existence of such
\code{dot-dot-dot} objects.
\item \code{all.equal()} no longer gives an error on \code{DOTSXP}
objects.
%% The Homebrew arm64 libs have cairo but not cairo-xlib
\item \code{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 for \code{X11()}.
\item There is optional support for tracing the progress of
\code{loadNamespace()} --- see its help.
\item (Not Windows.)
\code{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
\code{Sys.getlocale("LC_CTYPE")}.
\item New function \code{gregexec()} which generalizes \code{regexec()}
to find \emph{all} disjoint matches and well as all substrings
corresponding to parenthesized subexpressions of the given regular
expression. (Contributed by Brodie Gaslam.)
\item New function \code{charClass()} in package \pkg{utils} to
query the wide-character classification functions in use (such as
\code{iswprint}).
\item The names of \code{quantile()}'s result no longer depend on the
global \code{getOption("digits")}, but \code{quantile()} gets a new
optional argument \code{digits = 7} instead.
\item \code{grep()}, \code{sub()}, \code{regexp} and variants work
considerably faster for long factors with few levels. (Thanks to
Michael Chirico's \PR{18063}.)
\item Provide grouping of \code{x11()} graphics windows within
a window manager such as \code{Gnome} or \code{Unity}; thanks to a
patch by Ivan Krylov posted to R-devel.
\item The \code{split()} method for class \code{data.frame} now
allows the \code{f} argument to be specified as a formula.
\item \code{sprintf} now warns on arguments unused by the format
string.
\item New palettes \code{"Rocket"} and \code{"Mako"} for
\code{hcl.colors()} (approximating palettes of the same name
from the 'viridisLite' package).
Contributed by Achim Zeileis.
\item The base environment and its namespace are now locked (so
one can no longer add bindings to these or remove from these).
\item \command{Rterm} handling of multi-byte characters has been
improved, allowing use of such characters when supported by the
current locale.
\item \command{Rterm} now accepts \code{ALT+ +xxxxxxxx} sequences to
enter Unicode characters as hex digits.
\item Environment variable \env{LC_ALL} on Windows now takes
precedence over \env{LC_CTYPE} and variables for other supported
categories, matching the POSIX behaviour.
}
}
\subsection{GRAPHICS}{
\itemize{
\item The graphics engine version, \code{R_GE_version}, has been
bumped to \code{14} and so packages that provide graphics devices
should be reinstalled.
\item Graphics devices should now specify \code{deviceVersion} to
indicate what version of the graphics engine they support.
\item Graphics devices can now specify \code{deviceClip}. If
\code{TRUE}, the graphics engine will never perform any clipping
of output itself.
The clipping that the graphics engine does perform (for both
\code{canClip = TRUE} and \code{canClip = FALSE}) has been
improved to avoid producing unnecessary artifacts in clipped
output.
\item The \pkg{grid} package now allows \code{gpar(fill)} to be
a \code{linearGradient()}, a \code{radialGradient()}, or a
\code{pattern()}. The \code{viewport(clip)} can now also be
a grob, which defines a clipping path, and there is a new
\code{viewport(mask)} that can also be a grob, which defines
a mask.
These new features are only supported so far on the Cairo-based
graphics devices and on the \code{pdf()} device.
\item (Not Windows.)
A warning is given when a Cairo-based type is specified for a
\code{png()}, \code{jpeg()}, \code{tiff()} or \code{bmp()}
device but Cairo is unsupported (so \code{type = "Xlib"}
is tried instead).
\item \code{grSoftVersion()} now reports the versions of FreeType
and FontConfig if they are used directly (not \emph{via} Pango),
as is most commonly done on macOS.
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item The \emph{standalone} \file{libRmath} math library and \R's C
API now provide \code{log1pexp()} again as documented, and gain
\code{log1mexp()}.
}
}
\subsection{INSTALLATION on a UNIX-ALIKE}{
\itemize{
\item \command{configure} checks for a program \command{pkgconf}
if program \command{pkg-config} is not found. These are now only
looked for on the path (like almost all other programs) so if needed
specify a full path to the command in \code{PKG_CONFIG}, for example
in file \file{config.site}.
\item C99 function \code{iswblank} is required -- it was last seen
missing ca 2003 so the workaround has been removed.
\item There are new \command{configure} options
\option{--with-internal-iswxxxxx},
\option{--with-internal-towlower} and
\option{--with-internal-wcwidth} which allows the system functions
for wide-character classification, case-switching and width
(\code{wcwidth} and \code{wcswidth}) to be replaced by internal
ones. The first has long been used on macOS, AIX (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.
\item Cairo installations without X11 are more likely to be
detected by \command{configure}, when the file-based Cairo
graphics devices will be available but not \code{X11(type =
"cairo")}.
\item There is a new \command{configure} option
\option{--with-static-cairo} which is the default on macOS. This
should be used when only static cairo (and where relevant, Pango)
libraries are available.
\item Cairo-based graphics devices on platforms without Pango but
with FreeType/FontConfig will make use of the latter for font selection.
}
}
\subsection{LINK-TIME OPTIMIZATION on a UNIX-ALIKE}{
\itemize{
\item Configuring with flag \option{--enable-lto=R} now also uses
LTO when installing the recommended packages.
\item \command{R CMD INSTALL} and \command{R CMD SHLIB} have a new
flag \option{--use-LTO} to use LTO when compiling code, for use
with \R configured with \option{--enable-lto=R}. For \R
configured with \option{--enable-lto}, they have the new flag
\option{--no-use-LTO}.
Packages can opt in or out of LTO compilation \emph{via} a
\samp{UseLTO} field in the \file{DESCRIPTION} file. (As usual this
can be overridden by the command-line flags.)
}
}
\subsection{BUILDING R on Windows}{
\itemize{
\item for GCC \eqn{\ge}{>=} 8, \code{FC_LEN_T} is defined in
\file{config.h} and hence character lengths are passed from C to
Fortran in \emph{inter alia} BLAS and LAPACK calls.
\item There is a new text file
\file{src/gnuwin32/README.compilation}, which outlines how C/Fortran
code compilation is organized and documents new features:
\itemize{
\item \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.
\item 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 Rtools40 does not.
\item There is experimental support for cross-building \R
packages with C, C++ and/or Fortran code.
}
\item The R installer can now be optionally built to support a single
architecture (only 64-bit or only 32-bit).
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\item The default C++ standard has been changed to C++14 where
available (which it is on all currently checked platforms): if not
(as before) C++11 is used if available otherwise C++ is not
supported.
Packages which specify C++11 will still be installed using C++11.
C++14 compilers may give deprecation warnings, most often for
\code{std::random_shuffle} (deprecated in C++14 and removed in
C++17). Either specify C++11 (see \sQuote{Writing R Extensions})
or modernize the code and if needed specify C++14. The latter has
been supported since \R 3.4.0 so the package's \file{DESCRIPTION}
would need to include something like
\preformatted{
Depends: R (>= 3.4)
}
}
}
\subsection{PACKAGE INSTALLATION on Windows}{
\itemize{
\item \command{R CMD INSTALL} and \command{R CMD SHLIB} make use
of their flag \option{--use-LTO} when the \samp{LTO_OPT} make
macro is set in file \file{etc/$\{R_ARCH\}/Makeconf} or in a
personal/site \file{Makevars} file. (For details see
\sQuote{Writing R Extensions} §4.5.)
This provides a valuable check on code consistency. It does work
with GCC 8.3 as in Rtools40, but that does not detect everything
the \acronym{CRAN} checks with current GCC do.
}
}
\subsection{PACKAGE INSTALLATION on macOS}{
\itemize{
\item The default personal library directory on builds with
\option{--enable-aqua} (including \acronym{CRAN} builds) now
differs by CPU type, one of
\preformatted{
~/Library/R/x86_64/x.y/library
~/Library/R/arm64/x.y/library
}
This uses the CPU type \R (and hence the packages) were built for,
so when a \samp{x86_64} build of R is run under Rosetta emulation on
an \samp{arm64} Mac, the first is used.
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD check} can now scan package functions for
bogus \code{return} statements, which were possibly intended as
\code{return()} calls (wish of \PR{17180}, patch by Sebastian
Meyer). This check can be activated via the new environment
variable \env{_R_CHECK_BOGUS_RETURN_}, true for \code{--as-cran}.
\item \command{R CMD build} omits tarballs and binaries of
previous builds from the top-level package directory.
(\PR{17828}, patch by Sebastian Meyer.)
\item \command{R CMD check} now runs sanity checks on the use of
\samp{LazyData}, for example that a \file{data} directory is
present and that \samp{LazyDataCompression} is not specified
without \samp{LazyData} and has a documented value. For packages
with large LazyData databases without specifying
\samp{LazyDataCompression}, there is a reference to the code given
in \sQuote{Writing R Extensions} §1.1.6 to test the choice of
compression (as in all the \acronym{CRAN} packages tested a
non-default method was preferred).
\item \command{R CMD build} removes \samp{LazyData} and
\samp{LazyDataCompression} fields from the \file{DESCRIPTION} file
of packages without a \file{data} directory.
}
}
\subsection{ENCODING-RELATED CHANGES}{
\itemize{
\item The parser now treats \samp{\\Unnnnnnnn} escapes larger than
the upper limit for Unicode points (\samp{\\U10FFFF}) as an error
as they cannot be represented by valid UTF-8.
Where such escapes are used for outputting non-printable
(including unassigned) characters, 6 hex digits are used (rather
than 8 with leading zeros). For clarity, braces are used, for
example \samp{\\U\{0effff\}}.
\item The parser now looks for non-ASCII spaces on Solaris (as
previously on most other OSes).
\item There are warnings (including from the parser) on the use of
unpaired surrogate Unicode points such as \samp{\\uD834}. (These
cannot be converted to valid UTF-8.)
\item Functions \code{nchar()}, \code{tolower()}, \code{toupper()}
and \code{chartr()} and those using regular expressions have more
support for inputs with a marked Latin-1 encoding.
\item The character-classification functions used (by default) to
replace the system \code{iswxxxxx} functions on Windows, macOS and
AIX have been updated to Unicode 13.0.0.
The character-width tables have been updated to include new
assignments in Unicode 13.0.0.
\item 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
AIX).
\item There is a build-time option to replace the system's
wide-character \code{wctrans} C function by tables shipped with
\R: use \command{configure} option
\option{--with-internal-towlower} or (on Windows)
\samp{-DUSE_RI18N_CASE} in \samp{CFLAGS} when building \R. This
may be needed to allow \code{tolower()} and \code{toupper()} to
work with Unicode characters beyond the Basic Multilingual Plane
where not supported by system functions (e.g. on Solaris where it
is the new default).
\item R is more careful when truncating UTF-8 and other multi-byte
strings that are too long to be printed, passed to the system or
libraries or placed into an internal buffer. Truncation will no
longer produce incomplete multibyte characters.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item Function \code{plclust()} from the package \pkg{stats} and
\code{package.dependencies()}, \code{pkgDepends()},
\code{getDepList()}, \code{installFoundDepends()}, and
\code{vignetteDepends()} from package \pkg{tools} are defunct.
\item Defunct functions \code{checkNEWS()} and \code{readNEWS()} from
package \pkg{tools} and \code{CRAN.packages()} from \pkg{utils} have
been removed.
\item \command{R CMD config CXXCPP} is defunct (it was deprecated
in \R{} 3.6.2).
\item \code{parallel::detectCores()} drops support for Irix
(retired in 2013).
\item The \code{LINPACK} argument to \code{chol.default()},
\code{chol2inv()}, \code{solve.default()} and \code{svd()} has
been defunct since \R 3.1.0. It was silently ignored up to \R
4.0.3 but now gives an error.
\item Subsetting/indexing, such as \code{ddd[*]} or \code{ddd$x}
on a \code{DOTSXP} (dot-dot-dot) object \code{ddd} has been
disabled; it worked by accident only and was undocumented.
}
}
\subsection{BUG FIXES}{
\itemize{
\item Many more C-level allocations (mainly by \code{malloc} and
\code{strdup}) are checked for success with suitable alternative
actions.
\item Bug fix for \code{replayPlot()}; this was turning off
graphics engine display list recording if a recorded plot was
replayed in the same session. The impact of the bug became
visible if resize the device after replay OR if attempted another
\code{savePlot()} after replay (empty display list means empty
screen on resize or empty saved plot).
\item \command{R CMD check} etc now warn when a package exports
non-existing S4 classes or methods, also in case of no
\dQuote{methods} presence. (Reported by Alex Bertram;
reproducible example and patch by Sebastian Meyer in \PR{16662}.)
\item \code{boxplot()} now also accepts \code{call}s for labels such
as \code{ylab}, the same as \code{plot()}. (Reported by Marius Hofert.)
\item The help page for \code{xtabs()} now correctly states that
\code{addNA} is setting \code{na.action = na.pass} among others.
(Reported as \PR{17770} by Thomas Soeiro.)
\item The \command{R CMD check <pkg>} gives a longer and more
comprehensible message when \file{DESCRIPTION} misses dependencies,
e.g., in \code{Imports:}. (Thanks to the contributors of \PR{17179}.)
\item \code{update.default()} now calls the generic \code{update()}
on the formula to work correctly for models with extended formulas.
(As reported and suggested by Neal Fultz in \PR{17865}.)
\item The horizontal position of leaves in a dendrogram is now
correct also with \code{center = FALSE}. (\PR{14938}, patch from
Sebastian Meyer.)
\item \code{all.equal.POSIXt()} no longer warns about and
subsequently ignores inconsistent \code{"tzone"} attributes, but
describes the difference in its return value (\PR{17277}).
This check can be disabled \emph{via} the new argument
\code{check.tzone = FALSE} as suggested by Sebastian Meyer.
\item \code{as.POSIXct()} now populates the \code{"tzone"}
attribute from its \code{tz} argument when \code{x} is a logical
vector consisting entirely of \code{NA} values.
\item \code{x[[2^31]] <- v} now works. (Thanks to the report and
patch by Suharto Anggono in \PR{17330}.)
\item In log-scale graphics, \code{axis()} ticks and label positions
are now computed more carefully and symmetrically in their range,
typically providing \emph{more} ticks, fulfilling wishes
in \PR{17936}. The change really corresponds to an improved
\code{axisTicks()} (package \pkg{grDevices}), potentially influencing
\pkg{grid} and \pkg{lattice}, for example.
\item \code{qnorm(<very large negative>, log.p=TRUE)} is now correct
to at least five digits where it was catastrophically wrong,
previously.
\item \code{sum(df)} and similar \code{"Summary"}- and
\code{"Math"}-group member functions now work for data frames
\code{df} with \code{\link{logical}} columns, notably also of zero
rows. (Reported to R-devel by Martin \dQuote{b706}.)
\item \code{unsplit()} had trouble with tibbles due to unsound use of
\code{rep(NA, len)}-indexing, which should use \code{NA_integer_}
(Reported to R-devel by Mario Annau.)
\item \code{pnorm(x, log.p = TRUE)} underflows to \code{-Inf} slightly
later.
\item \code{show(<hidden S4 generic>)} prints better and without
quotes for non-hidden S4 generics.
\item \code{read.table()} and relatives treated an "NA" column name as
missing when \code{check.names = FALSE} \PR{18007}.
\item Parsing strings containing UTF-16 surrogate pairs such as
\code{"\uD834\uDD1E"} works better on some (uncommon) platforms.
\code{sprintf("\%X", utf8ToInt("\uD834\uDD1E"))} should now give
\code{"1D11E"} on all platforms.
%% failed on Solaris
\item \code{identical(x,y)} is no longer true for differing
\code{DOTSXP} objects, fixing \PR{18032}.
\item \code{str()} now works correctly for DOTSXP and related
exotics, even when these are doomed.
Additionally, it no longer fails for \code{list}s with a \code{class} and
\dQuote{irregular} method definitions such that e.g. \code{lapply(*)} will
necessarily fail, as currently for different \CRANpkg{igraph} objects.
\item Too long lines in environment files (e.g. \code{Renviron}) no
longer crash \R. This limit has been increased to 100,000 bytes.
(\PR{18001}.)
\item There is a further workaround for FreeType giving
incorrect italic font faces with cairo-based graphics devices on
macOS.
\item \code{add_datalist(*, force = TRUE)} (from package
\pkg{tools}) now actually updates an existing \file{data/datalist}
file for new content. (Thanks to a report and patch by Sebastian
Meyer in \PR{18048}.)
\item \code{cut.Date()} and \code{cut.POSIXt()} could produce an
empty last interval for \code{breaks = "months"} or \code{breaks =
"years"}. (Reported as \PR{18053} by Christopher Carbone.)
\item Detection of the encoding of \sQuote{regular} macOS locales
such as \samp{en_US} (which is UTF-8) had been broken by a macOS
change: fortunately these are now rarely used with
\samp{en_US.UTF-8} being preferred.
\item \code{sub()} and \code{gsub(pattern, repl, x, *)} now keep
attributes of \code{x} such as \code{names()} also when
\code{pattern} is \code{NA} (\PR{18079}).
\item Time differences (\code{"difftime"} objects) get a replacement
and a \code{rep()} method to keep \code{"units"} consistent.
(Thanks to a report and patch by Nicolas Bennett in \PR{18066}.)
\item The \verb{\RdOpts} macro, setting defaults for \verb{\Sexpr}
options in an Rd file, had been ineffective since \R 2.12.0: it
now works again.
(Thanks to a report and patch by Sebastian Meyer in \PR{18073}.)
\item \code{mclapply} and \code{pvec} no longer accidentally terminate
parallel processes started before by \code{mcparallel} or related
calls in package \pkg{parallel} (\PR{18078}).
\item \code{grep} and other functions for evaluating (extended)
regular expressions handle in Unicode also strings not explicitly
flagged UTF-8, but flagged native when running in UTF-8 locale.
\item Fixed a crash in \code{fifo} implementation on Windows
(\PR{18031}).
\item Binary mode in \code{fifo} on Windows is now properly detected
from argument \code{open} (\PR{15600}, \PR{18031}).
}
}
}
\section{\Rlogo CHANGES IN R 4.0.5}{
\subsection{BUG FIXES}{
\itemize{
\item The change to the internal table in \R 4.0.4 for
\code{iswprint} has been reverted: it contained some errors in
printability of \sQuote{East Asian} characters.
\item For packages using \samp{LazyData}, \command{R CMD build}
ignored the \option{--resave-data} option and the
\samp{BuildResaveData} field of the \file{DESCRIPTION} file (in \R
versions 4.0.0 to 4.0.4).
}
}
}
\section{\Rlogo CHANGES IN R 4.0.4}{
\subsection{NEW FEATURES}{
\itemize{
\item File \file{share/texmf/tex/latex/jss.cls} has been updated
to work with LaTeX versions since Oct 2020.
\item Unicode character width tables (as used by
\code{nchar(, type = "w")}) have been updated to Unicode 12.1
by Brodie Gaslam (\PR{17781}), including many emoji.
\item The internal table for \code{iswprint} (used on Windows,
macOS and AIX) has been updated to include many recent Unicode
characters.
}
}
\subsection{INSTALLATION on a UNIX-ALIKE}{
\itemize{
\item If an external BLAS is specified by \option{--with-blas=foo}
or \emph{via} environment variable \env{BLAS_LIBS} is 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
\option{--with-blas=yes} was specified.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{all.equal(x,y)} now \dQuote{sees} the two different
\code{NA}s in factors, thanks to Bill Dunlap and others in
\PR{17897}.
\item \code{(~ 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.
\item \code{.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.
\item \code{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}.
\item \code{iconvlist()} now also works on MUSL based (Linux)
systems, from a report and patch suggestion by Wesley Chan in
\PR{17970}.
\item \code{round()} and \code{signif()} 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}.
\item \code{.Machine} has \code{longdouble.*} elements only if
\code{capabilities("long.double")} is true, as documented.
(Previously they were included if the platform had \code{long
double} identical to \code{double}, as ARM does.)
\item \code{p.adjust(numeric(), n=0)} now works, fixing \PR{18002}.
\item \code{identical(x,y)} no longer prints "Unknown Type .." for
\code{typeof(x) == "..."} objects.
\item Fix (auto-)\code{print()}ing of named complex vectors, see
\PR{17868} and \PR{18019}.
\item \code{all.equal(<language>, <...>)} now works, fixing \PR{18029}.
\item \code{as.data.frame.list(L, row.names=NULL)} now behaves in line
with \code{data.frame()}, disregarding names of components of
\code{L}, fixing \PR{18034}, reported by Kevin Tappe.
\item \code{checkRdaFiles(ff)$version} is now correct also when
\code{ff} contains files of different versions, thanks to a report
and patch from Sebastian Meyer in \PR{18041}.
\item Message translation domains, e.g., for errors and warnings, are
now correctly determined also when e.g., a \pkg{base} function is
called from \dQuote{top-level} function (i.e., defined in \code{globalenv()}),
thanks to a patch from Joris Goosen fixing \PR{17998}.
\item 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.
}
}
}
\section{\Rlogo CHANGES IN R 4.0.3}{
\subsection{NEW FEATURES}{
\itemize{
\item On platforms using \command{configure} option
\option{--with-internal-tzcode}, additional values
\code{"internal"} and (on macOS only) \code{"macOS"} are accepted
for the environment variable \env{TZDIR}. (See \code{?TZDIR}.)
On macOS, \code{"macOS"} is used by default if the system timezone
database is a newer version than that in the \R installation.
\item When \code{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.
\item The default value for \code{options("timeout")} can be set
from environment variable \env{R_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.
}
}
\subsection{LINK-TIME OPTIMIZATION on a UNIX-ALIKE}{
\itemize{
\item There is now support for parallelized Link-Time Optimization
(LTO) with GCC and for \sQuote{thin} LTO with
\command{clang} \emph{via} setting the \samp{LTO} macro.
\item There is support for setting a different LTO flag for the
Fortran compiler, including to empty when mixing \command{clang}
and \command{gfortran} (as on macOS). See file \file{config.site}.
\item There is a new \samp{LTO_LD} macro to set linker options for
LTO compilation, for example to select an alternative linker or
to parallelize thin LTO.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item The \code{LINPACK} argument to \code{chol.default()},
\code{chol2inv()}, \code{solve.default()} and \code{svd()} has been
defunct since \R 3.1.0. Using it now gives a warning which will
become an error in \R 4.1.0.
}
}
\subsection{BUG FIXES}{
\itemize{
\item 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.
%% Ubuntu 16.04LTS has PCRE2 10.21
\item Fix to correctly show the group labels in \code{dotchart()}
(which where lost in the \code{ylab} improvement for \R 4.0.0).
\item \code{addmargins(*, ..)} now also works when \code{fn()} is a
local function, thanks to bug report and patch \PR{17124} from Alex
Bertram.
\item \code{rank(x)} and hence \code{sort(x)} now work when \code{x}
is an object (as per \code{is.object(x)}) of type \code{"raw"}
\emph{and} provides a valid \code{`[`} method, e.g., for
\code{gmp::as.bigz(.)} numbers.
\item \code{chisq.test(*, simulate.p.value=TRUE)} and
\code{r2dtable()} now work correctly for large table entries (in the
millions). Reported by Sebastian Meyer and investigated by more
helpers in \PR{16184}.
\item 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}.
\item \code{quantile(x, pr)} works more consistently for \code{pr}
values slightly outside [0,1], thanks to Suharto Anggono's \PR{17891}.
Further, \code{quantile(x, prN, names=FALSE)} now works even when
\code{prN} contains \code{NA}s, thanks to Anggono's \PR{17892}.
Ditto for ordered factors or \code{Date} objects
when \code{type = 1} or \code{3}, thanks to \PR{17899}.
\item Libcurl-based internet access, including
\code{curlGetHeaders()}, was not respecting the \code{"timeout"}
option. If this causes unanticipated timeouts, consider
increasing the default by setting \env{R_DEFAULT_INTERNET_TIMEOUT}.
\item \code{as.Date(<char>)} now also works with an initial
\code{""}, thanks to Michael Chirico's \PR{17909}.
\item \code{isS3stdGeneric(f)} now detects an S3 generic also when it
it is \code{trace()}d, thanks to Gabe Becker's \PR{17917}.
\item \code{R_allocLD()} has been fixed to return memory aligned for
long double type \PR{16534}.
\item \code{fisher.test()} no longer segfaults when called again after
its internal stack has been exceeded \PR{17904}.
\item Accessing a long vector represented by a compact integer
sequence no longer segfaults (reported and debugged by Hugh
Parsonage).
\item \code{duplicated()} now works also for strings with multiple
encodings inside a single vector \PR{17809}.
\item \code{phyper(11, 15, 0, 12, log.p=TRUE)} no longer gives
\code{NaN}; reported as \PR{17271} by Alexey Stukalov.
\item Fix incorrect calculation in \code{logLik.nls()} \PR{16100}, patch
from Sebastian Meyer.
\item A very old bug could cause a segfault in \code{model.matrix()}
when terms involved logical variables. Part of \PR{17879}.
\item \code{model.frame.default()} allowed \code{data = 1}, leading to
involuntary variable capture (rest of \PR{17879}).
\item \code{tar()} no longer skips non-directory files, thanks to a
patch by Sebastian Meyer, fixing the remaining part of \PR{16716}.
}
}
}
\section{\Rlogo CHANGES IN R 4.0.2}{
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD check} skips vignette re-building (with a
warning) if the \samp{VignetteBuilder} package(s) are not available.
}
}
\subsection{BUG FIXES}{
\itemize{
\item Paths with non-ASCII characters caused problems for
package loading on Windows \PR{17833}.
\item Using \pkg{tcltk} widgets no longer crashes R on
Windows.
\item \code{source(*, echo=TRUE)} no longer fails in some cases with
empty lines; reported by Bill Dunlap in \PR{17769}.
\item \code{on.exit()} now correctly matches named arguments, thanks
to \PR{17815} (including patch) by Brodie Gaslam.
\item \code{regexpr(*, perl=TRUE)} no longer returns incorrect
positions into text containing characters outside of the Unicode
Basic Multilingual Plane on Windows.
}
}
}
\section{\Rlogo CHANGES IN R 4.0.1}{
\subsection{NEW FEATURES}{
\itemize{
\item \code{paste()} and \code{paste0()} gain a new optional
argument \code{recycle0}. When set to true, zero-length
arguments are recycled leading to \code{character(0)} after the
\code{sep}-concatenation, i.e., to the empty string \code{""} if
\code{collapse} is a string and to the zero-length value
\code{character(0)} when \code{collapse = NULL}.
A package whose code uses this should depend on \samp{R (>= 4.0.1)}.
\item The \code{summary(<warnings>)} method now maps the counts
correctly to the warning messages.
}
}