-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathNEWS.Rd
6079 lines (4803 loc) · 265 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{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\item .
}
}
\subsection{NEW FEATURES}{
\itemize{
\item \code{str()} now shows more via \code{format()} for external pointers.
}
}
\subsection{INSTALLATION}{
\itemize{
\item .
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\item .
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item .
}
}
\subsection{UTILITIES}{
\itemize{
% this will not be ported to R 4.5.0.
\item \command{R CMD check} now reports further \command{clang} warnings
including \code{-Wkeyword-macro}. This is most commonly seen for
the C23 keywords \code{bool}, \code{true} and \code{false}, but is
also seen for \code{nullptr} (C23 and C++11). Masking these by
macros \emph{may} generate correct code (but not always) and always
results in confusing-to-read code.
%% Someone defined 'true' as -1, for example.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item \code{structure(NULL, <name> = <val>)} is now defunct.% deprecated r71841, 2016-12-27
}
}
\subsection{BUG FIXES}{
\itemize{
\item Setting \code{attributes} on primitive functions is an
error now; previously, it modified without copying, as noticed by
\I{Henrik Bengtsson} on the R-devel mailing list.
\I{Relatedly}, changing the \code{environment()} of a primitive function
does no longer happen and gives a warning (to become an error, later).
}
}
}
\section{\Rlogo CHANGES IN R 4.5.0 patched}{
\subsection{BUG FIXES}{
\itemize{
\item Standalone \code{nmath} can be built with early-2025
versions of \command{clang}-based compilers such as \I{LLVM}
\command{clang}\sspace{}20, Apple \command{clang}\sspace{}17 and Intel
\command{icx}\sspace{}2025.0.
\item Java detection in \code{javareconf} could not detect
\file{libjvm.*} in the \code{zero} variant of the JDK (\PR{18884}).
All valid variants as of JDK 24u are now supported.
}
}
}
\section{\Rlogo CHANGES IN R 4.5.0}{
%% \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
%% \itemize{
%% \item .
%% }
%% }
\subsection{NEW FEATURES}{
\itemize{
\item \code{as.integer(rl)} and hence \code{as.raw(rl)} now work for
a \code{list} of \code{raw(1)} elements, as proposed by \I{Michael
Chirico}'s \PR{18696}.
\item \pkg{graphics}' \code{grid()} gains optional argument
\code{nintLog}.
\item New functions \code{check_package_urls()} and
\code{check_package_dois()} in package \pkg{tools} for checking
URLs and \abbr{DOI}s in package sources.
\item New \code{head()} and \code{tail()} methods for class
\code{"ts"} time series, proposed by Spencer Graves on R-devel.
\item New \code{qr.influence()} function, a \dQuote{bare bones}
interface to the \code{lm.influence()} leave-one-out diagnostics
computations; wished for in \PR{18739}.
\item Package \code{citation()} results auto-generated from the
package metadata now also provide package \abbr{DOI}s for CRAN and
Bioconductor packages.
\item New function \code{grepv()} identical to \code{grep()} except
for the default \code{value = TRUE}.
\item \code{methods(<pkg>:::<genfun>)} now does report methods when
neither the generic nor the methods have been exported.
\item \code{pdf()} gains an \code{author} argument to set the
corresponding metadata field, and logical arguments
\code{timestamp} and \code{producer} to optionally omit the
respective metadata.
(Thanks to \I{Edzer Pebesma}.)
\item \code{grDevices::glyphInfo()} gains a \code{rot} argument
to allow per-glyph rotation.
(Thanks to \I{Daniel Sabanes Bove}.)
\item Package \pkg{tools} now exports functions
\code{CRAN_current_db()}, \code{CRAN_aliases_db()},
\code{CRAN_rdxrefs_db()}, \code{CRAN_archive_db()}, and
\code{CRAN_authors_db()}.
\item Package \pkg{tools} now exports functions
\code{R()} and \code{parse_URI_reference()}.
\item Package \pkg{tools} now exports functions
\code{base_aliases_db()} and \code{base_rdxrefs_db()}.
\item It is now possible to set the background color for row and
column names in the data editor on Windows (\command{Rgui}).
\item \command{Rterm} on Windows now accepts input lines of unlimited
length.
\item \code{file.info()} on Windows now provides file owner name and
domain.
\item \code{Sys.info()} on Windows now provides current user domain.
\item \code{findInterval()} gets new arguments \code{checkSorted}
and \code{checkNA} which allow skipping relatively costly checks;
related to \PR{16567}.
\item \code{pnorm(x)} underflows more gracefully.
\item \code{get(nam, env)} now signals a \emph{classed} error,
\code{"getMissingError"}, as \dQuote{subclass} of
\code{"missingArgError"} where the latter is used also in similar
situations, e.g., \code{f <- function(x) exp(x); try(f())} .
\item The set operations now avoid the \code{as.vector()}
transformation for same-kind apparently vector-like operands.
\item \code{md5sum()} can be used to compute an MD5 hash of a raw
vector of bytes by using the \code{bytes=} argument instead
of \code{files=}. The two arguments are mutually exclusive.
\item Added function \code{sha256sum()} in package \pkg{tools}
analogous to \code{md5sum()} implementing the \abbr{SHA}-256 hashing
algorithm.
\item The \code{xtfrm()} method for class \code{"AsIs"} is now
considerably faster thanks to a patch provided by \I{Ivan Krylov}.
\item The \code{merge()} method for data frames will no longer
convert row names used for indexing using \code{I()}, which will
lead to faster execution in cases where \code{sort = TRUE} and
\code{all.x} and/or \code{all.y} are set to \code{TRUE}.
\item The \pkg{methods} package internal function
\code{.requirePackage()} now calls \code{requireNamespace(p)}
instead of \code{require(p)}, hence no longer adding packages to
the \code{search()} path in cases methods or class definitions are
needed. Consequently, previous workflows relying on the old
behaviour will have to be amended by adding corresponding
\code{library(p)} calls.
\item More \R-level messages use a common format containing
\code{"character string"} for more consistency and less
translation work.
\item \code{available.packages()} and \code{install.packages()} get
an optional switch \code{cache_user_dir}, somewhat experimentally.
\item The \code{sunspot.month} data have been updated to Oct 2024;
because of recalibration also historical numbers are changed, and we
keep the previous data as \code{sunspot.m2014} for
reproducibility.
\item The \code{quartz()} device now supports alpha masks. Thanks
to \I{George Stagg}, \I{Gwynn Gebeyhu}, \I{Heather Turner}, and
\I{Tomek Gieorgijewski}.
\item The \code{print()} method for date-time objects (\code{POSIX.t})
gets an optional \code{digits} argument for \emph{fractional}
seconds, passed to improved \code{format.POSIXlt()}; consequently,
\code{print(<date.time>, digits = n)} allows to print fractions of
seconds.
\item \code{install.packages()} and \code{download.packages()}
download packages simultaneously using \code{libcurl}, significantly
reducing download times when installing or downloading multiple
packages.
\item Status reporting in \code{download.file()} has been extended to
report the outcome for individual files in simultaneous downloads.
\item The Rd \verb{\link} macro now allows markup in the link text
when the topic is given by the optional argument, e.g.,
\samp{\link[=gamma]{\eqn{\Gamma(x)}}}.
\item If \code{La_library()} is empty, \code{sessionInfo()} still
reports \code{La_version()} when available.
\item \code{seq.int(from, to, by, ....)} when \eqn{|by| = 1} now
behaves as if \code{by} was omitted, and hence returns \code{from:to},
possibly integer.
\item \code{seq.Date(from, to, by, ....)} and \code{seq.POSIXt(..)}
now also work when \code{from} is missing and sufficient further
arguments are provided, thanks to \I{Michael Chirico}'s report, patch
proposal in \PR{17672} and \sQuote{\I{R Dev Day}} contributions.
The \code{Date} method also works for \code{seq(from, to)}, when
\code{by} is missing and now defaults to \code{"1 days"}.
It is now documented (and tested) that the \code{by} string may be
\emph{abbreviated} in both \code{seq} methods.
Both methods return or keep internal type \code{"integer"} more
consistently now. Also, \code{as.POSIXct({})} is internally integer.
\item \code{duplicated()}, \code{unique()}, and \code{anyDuplicated()}
now also work for class \code{expression} vectors.
\item New function \code{use()} to use packages in R scripts with
full control over what gets added to the search path. (Actually
already available since \R 4.4.0.)
\item There is some support for \command{zstd} compression of
tarballs in \code{tar()} and \code{untar()}. (This depends on OS
support of \code{libzstd} or by \command{tar}.)
\item \code{print(summary(<numbers>))} gets new optional argument
\code{zdigits} to allow more flexible and consistent (double)
rounding. The current default \code{zdigits = 4L} is somewhat
experimental. Specifying both \code{digits = *, zdigits = *} allows
behaviour independent of the global \code{digits} option.
\item The \code{format()} method for \code{"difftime"} objects gets a
new back compatible option \code{with.units}.
\item A \code{summary()} method for \code{"difftime"} objects which
prints nicely, similar to those for \code{"Date"} and \code{"POSIXct"}.
\item \code{unique()}'s default method now also deals with
\code{"difftime"} objects.
\item \code{optimize(f, *)} when \code{f(x)} is not finite says
more about the value in its \code{warning} message. It no longer
replaces \code{-Inf} by the largest \emph{positive} finite number.
\item The documentation of \code{gamma()} and \code{is.numeric()}
is more specific, thanks to the contributors of \PR{18677}.
\item New dataset \code{gait} thanks to \I{Heather Turner} and
\I{Ella Kaye}, used in examples.
\item New datasets \code{penguins} and \code{penguins_raw} thanks to
\I{Ella Kaye}, \I{Heather Turner}, and \I{Kristen Gorman}.
\item \code{isSymmetric(<matrix>)} gains a new option \code{trans = "C"};
when set to non-default, it tests for \dQuote{simple} symmetry of
complex matrices.
\item \code{model.frame()} produces more informative error messages
in some cases when variables in the formula are not found, thanks to
\I{Ben Bolker}'s \PR{18860}.
\item \code{selectMethod(f, ..)} now keeps the function name if the
function belongs to a group generic and the method is for the
generic.
\item \code{terms(<formula>, specials = *)} now treats non-syntactic
specials more gracefully, thanks to \I{Mikael Jagan}'s \PR{18568}.
}
}
\subsection{BLAS and LAPACK}{
\itemize{
\item The bundled BLAS and LAPACK sources have been updated to
those shipped as part of January 2025's LAPACK 3.12.1.
\item It is intended that this will be the last update to BLAS and
LAPACK in the \R sources. Those building \R from source are
encouraged to use external BLAS and LAPACK and this will be required in
future.
\item This update was mainly bug fixes but contained a barely
documented major change. The set of BLAS routines had been
unchanged since 1988, so throughout \R's history. This update
introduced new BLAS routines \code{dgemmtr} and \code{zgemmtr}
which are now used by LAPACK routines. This means that BLAS
implementations are no longer interchangeable.
\item To work around this, \R can be configured with option
\option{--with-2025blas} which arranges for the 2025 BLAS
additions to be compiled into \code{libRlapack} (the internal
LAPACK, not built if an external LAPACK is used).
This option allows the continuation of the practice of swapping
the BLAS in use by \I{symlinking} \file{lib/libRblas.*}. It has
the disadvantage of using the reference BLAS version of the 2025
routines whereas an enhanced BLAS might have an optimized version
(\I{OpenBLAS} does as from version 0.3.29).
\item Windows builds currently use the internal LAPACK and by
default the internal BLAS: notes on how to swap the latter
\emph{via} \file{Rblas.dll} are in file
\file{src/extra/blas/Makefile.win}.
}
}
\subsection{INSTALLATION on a UNIX-ALIKE}{
\itemize{
\item A C23 compiler (if available) is now selected by default for
compilation of \R and packages. \R builds can opt out \emph{via} the
\command{configure} flag \option{--without-C23}, unless the
specified or default (usually \command{gcc}) compiler defaults to C23:
\command{gcc}\sspace{}15 will.
%% GCC 13 was released in 2023-04, LLVM 18 was 2024-03, 15 was 2022-09
%% Apple clang 14.0.3 was too old: 15 is the earliest that can be
%% installed on macOS 15.3
%% https://en.cppreference.com/w/c/23
A C23 compiler is known to be selected with
\command{gcc}\sspace{}13--15,
\I{LLVM} \command{clang}\sspace{}18--20 (and 15 should),
Apple \command{clang}\sspace{}15--17 and
Intel\sspace{}2024.2--2025.0 (and 2022.2 should).
Current binary distributions on macOS use Apple
\command{clang}\sspace{}14 and so do not use C23.
\item The minimum \command{autoconf} requirement for a maintainer
build has been increased to \command{autoconf}\sspace{}2.72.
\item Building the HTML and Info versions of the R manuals now
requires \command{texi2any} from \I{Texinfo} 6.1 or later.
\item Failures in building the manuals under \file{doc} now abort
the installation, removing any file which caused the failure.
\item Control of symbol visibility is now supported on macOS (the
previous check only worked on ELF platforms).
\item There is now support for installing the debug symbols for
recommended packages on macOS: see \samp{REC_INSTALL_OPT} in file
\file{config.site}.
\item \command{configure} is now able to find an external
\code{libintl} on macOS (the code from an older GNU \I{gettext}
distribution failed to try linking with the macOS Core Foundation
framework).
}
}
\subsection{INSTALLATION on WINDOWS}{
\itemize{
\item Both building \R and installing packages use the C compiler
in C23 mode.
\item R on Windows by default uses \command{pkg-config} for linking against
external libraries. This makes it easier to test R and packages with
alternative toolchains (such as from \I{Msys2}, e.g., testing with \I{LLVM}
and possibly with sanitizers). It also allows more significant \I{Rtools}
updates within a single R minor release.
\item The installer scripts for Windows have been tailored to
\I{Rtools45}, an update of the \I{Rtools44} toolchain. It is
based on GCC 14. The experimental support for 64-bit ARM
(\code{aarch64}) CPUs is based on \I{LLVM} 19. R-devel and \R
4.5.x are no longer maintained to be \I{buildable} using
\I{Rtools44} and it is advised to switch to \I{Rtools45}.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item \code{is.R()} is defunct. Environment variable
\env{_R_DEPRECATED_IS_R_} no longer has any effect.
\item Deprecated (for more than 9 years!) functions
\code{linearizeMlist}, \code{listFromMlist}, and \code{showMlist} and
the \code{"MethodsList"} class for S4 method handling were removed
from package \pkg{methods}.
Deprecated functions \code{balanceMethodsList}, \code{emptyMethodsList},
\code{inheritedSubMethodLists}, \code{insertMethod},
\code{insertMethodInEmptyList}, \code{makeMethodsList},
\code{mergeMethods}, \code{MethodsList}, \code{MethodsListSelect}, and
\code{SignatureMethod} were made defunct, as were the
\code{"MethodsList"} branches of functions \code{assignMethodsMetaData},
\code{finalDefaultMethod}, and \code{MethodAddCoerce}.
\item \code{getMethods(*, table = TRUE)} is deprecated.
\item Building with the bundled (and old) version of
\code{libintl} is deprecated and now gives a \command{configure}
warning. This should be selected only if neither the OS's
\code{libc} (as on GNU Linux) nor an external \code{libintl}
library provide suitable functions.
Instead install \code{libintl} from a recent version of GNU
\I{gettext} (available for macOS) or use \command{configure} option
\option{--disable-nls}.
The ability to use the bundled version may be removed as soon as
\R\sspace{}4.5.1.
\item The deprecated \code{xfig()} graphics device has been removed.
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\item Packages are now installed using C23 where supported by the
OS and \R build.
Packages using \R's compiler settings can ask \strong{not} to use C23
\emph{via} including \code{USE_C17} in \code{SystemRequirements}
or can be installed by \command{R CMD INSTALL --use-C17}.
(Some packages ignore these settings in their \command{configure}
script or when compiling in sub-directories of \file{src}, as
will those using a \file{src/Makefile}.)
\item Source installs now report the package version in the log.
\item There is preliminary support for C++26 with GCC \eqn{>=} 14, Apple
\command{clang++} \eqn{>=} 16 and \I{LLVM} \command{clang++} \eqn{>=} 17.
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item The non-API and hidden entry points \code{Rf_setIVector},
\code{Rf_setRVector} and \code{Rf_setSVector} have been removed.
\item The internal code for changing the parent of an environment
now signals an error if the new parent is not an environment or if
the change would create a cycle in the parent chain.
\item \code{SET_TYPEOF} now signals an error unless the old and
new types have compatible memory structure and content. Use of
\code{SET_TYPE} in package C code should be avoided and may be
deprecated in the near future. It is better to allocate an object
of the desired type in the first place.
\item The set of LAPACK (double and complex) routines declared in
the headers \file{R_ext/Lapack.h} and \file{R_ext/Applic.h} has
been extended, mostly to routines actually in use by packages.
\item Memory allocation messages now use the (non-SI notation)
\code{"Mb"}, \code{"Gb"} , \dots, and \code{"Mbytes"} strings as
\emph{arguments} instead of as part of the (translatable format)
string. This is one step for \PR{18297}; from \I{Henrik Bengtsson}.
\item Header \file{R_ext/Constants.h} (included by \file{R.h}) now
always includes header \file{float.h} or \file{cfloat} for
constants such as \code{DBL_MAX}.
\item Strict R headers are now the default. This removes the
legacy definitions of \code{PI}, \code{Calloc}, \code{Realloc} and
\code{Free}: use \code{M_PI}, \code{R_Calloc}, \code{R_Realloc} or
\code{R_Free} instead.
\item The deprecated and seemingly never-used S-compatibility
macros \code{F77_COM} and \code{F77_COMDECL} have been removed
from header \file{R_ext/RS.h}.
\item The \code{enum} \code{Rboolean} defined in header
\file{R_ext/Boolean.h} now has a fixed underlying type of
\code{int} on platforms whose C compiler supports this.
This is a C23 feature (taken from C++11) and also supported in all
C standards by some versions of \code{clang} (from \I{LLVM} and
Apple) and (with a warning when using \option{-pedantic}) by GCC
when in C17 mode.
A fair amount of code has assumed this: it may be changed to a
smaller type in future. In particular, as standard compilers do
not check the validity of assignment to an \code{enum}, it has been
possible to assign \code{NA_INTEGER} to an \code{Rboolean}
variable, coerce it to \code{int} and recover the value.
%% There are claims that the Green Hills compiler can.
%% In C++ rhis was confirmed as undefined behaviour in
%% https://cplusplus.github.io/CWG/issues/1766.html
%% Some versiins of UBSAN caan check it with -fsanitize=enum
If there were a platform which used an underlying type of a
different size this would be an \abbr{ABI}-breaking change (but we are
unaware of any such platform).
\item Header \file{R_ext/Boolean.h} now ensures that a \code{bool}
type is available either as a keyword (C23 and C++) or by
including the C99 header \file{stdbool.h}. This is being used
internally in \R to replace \code{Rboolean} by \code{bool}.
\item There are new functions \code{asRboolean} and
\code{asBool}, variants of \code{asLogical} more suited to
converting logical arguments to \code{Rboolean} or to
\code{bool}. They require a length-one input and throw an error if
that evaluates to \code{NA}.
\item Header \file{R_exts/Error.h} now ensures that
\code{Rf_error} and similar are given a \code{noreturn}
attribute when used from C++ under all compilers.
\item Header \file{R_exts/Utils.h} no longer contains a
declaration for \code{F77_SUB(interv)}. This is intended to be
called from Fortran and was wrongly declared: \code{LOGICAL} in
Fortran corresponds to \code{int *} not \code{Rboolean *}.
\item Defining \code{R_INCLUDE_BOOLEAN_H} to \code{0} before
including headers \file{R.h} or \file{Rinternals.h} (or any other
header which includes \file{R_ext/Boolean.h}) stops the inclusion
of header \code{R_ext/Boolean.h} which `defines' constants
\code{TRUE}, \code{FALSE}, \code{true}, \code{false} and the type
\code{bool} which some package maintainers wish to avoid.
Note that the last three are keywords in C23 and C++11 so cannot be
avoided entirely. However, with commonly-used compilers they can be
masked by a macro of the same name, often with a warning.
}
}
\subsection{C-LEVEL API}{
\itemize{
\item The \sQuote{Writing R Extensions} \I{Texinfo} source now
contains very experimental annotations for more clearly
identifying the API status of C entry points. These annotations
are used to produce indices for API, experimental API, and
embedded API entry points in the rendered versions. This is very
preliminary and may be dropped if a better approach emerges.
Also for Fortran-callable entry points which are part of the API.
\item \sQuote{Writing R Extensions} has a new section
\sQuote{Moving into C API compliance} to help package authors move
away from using non-API endpoints. This section will continue to
be updated as work on clarifying and tightening the C API
continues.
\item New API function \code{R_mkClosure}. This checks that its
arguments are valid and should be used instead of
\code{allocSExp(CLOSXP} followed by \code{SET_FORMALS},
\code{SET_BODY}, and \code{SET_CLOENV}.
\item New API functions \code{R_ClosureFormals},
\code{R_ClosureBody}, and \code{R_ClosureEnv} for extracting
closure components. The existing functions \code{R_ClosureExpr}
and \code{R_BytecodeExpr} have also been added to the API.
\item New API function \code{R_ParentEnv} corresponding to \R's
\code{parent.env()}.
\item Further non-API entry points have been added to those reported
by \command{R CMD check}: \code{COMPLEX0}, \code{ddfind},
\code{DDVAL}, \code{ENSURE_NAMEDMAX}, \code{ENVFLAGS},
\code{FRAME}, \code{HASHTAB}, \code{INTERNAL}, \code{IS_ASCII},
\code{IS_UTF8}, \code{LEVELS}, \code{NAMED}, \code{PRSEEN},
\code{RDEBUG}, \code{REAL0}, \code{Rf_findVarInFrame3},
\code{SET_BODY}, \code{SET_CLOENV}, \code{SET_FORMALS},
\code{SET_PRSEEN}, \code{SET_RDEBUG}, \code{STRING_PTR},
\code{SYMVALUE}, and \code{VECTOR_PTR}. Any declarations for these
in public header files will be removed in the near future, and
they will be hidden where possible.
\item Some \command{R CMD check} \samp{NOTE}s on the use of
non-API entry points have been upgraded to \samp{WARNING}s in
preparation for removing declarations and, where possible, hiding
these entry points.
\item Additional non-API entry points have been added to those
reported by \command{R CMD check}: \code{IS_LONG_VEC},
\code{PRCODE}, \code{PRENV}, \code{PRVALUE}, \code{R_nchar},
\code{Rf_NonNullStringMatch}, \code{R_shallow_duplicate_attr},
\code{Rf_StringBlank}, \code{SET_TYPEOF}, \code{TRUELENGTH},
\code{XLENGTH_EX}, and \code{XTRUELENGTH}.
\item Enable defining \env{R_NO_REMAP_RMATH} and calling
\code{Rf_*()} as has been documented in
\sQuote{Writing R Extensions} for a while, fixing \PR{18800}
thanks to \I{Mikael Jagan} and \I{Suharto Anggono}.
\item \code{R_GetCurrentSrcref(skip)} now skips calls rather
than \code{srcref}s, consistent with counting items in the
\code{traceback()} display. If \code{skip == NA_INTEGER},
it searches for the first \code{srcref}, starting at
the current evaluation state and proceeding through the
call stack; otherwise, it returns the \code{srcref}
of the requested entry from the call stack.
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD INSTALL} (and hence \command{check}) now
compile C++ code with \code{-DR_NO_REMAP}.
\sQuote{Writing R Extensions} has been revised to describe the remapped
entry points, for with the \code{Rf_} prefix remains optional when
used from C code (but is recommended for new C code).
\item \command{R CMD check --as-cran} notes bad parts in the
\file{DESCRIPTION} file's URL fields.
\item \command{R CMD check} now reports more warnings on
long-deprecated/obsolete Fortran features reported by
\command{gfortran -Wall}. For hints on how to modernize these,
see
\url{https://fortranwiki.org/fortran/show/Modernizing+Old+Fortran}.
\item Since almost all supported \R versions now use UTF-8,
\command{R CMD check} no longer by default reports on marked
UTF-8 or Latin-1 strings in character data. Set environment
variable \env{_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_} to a
false value for the previous behaviour.
\item \code{tools::checkDocFiles()} notes more cases of
usage documentation without corresponding \verb{\alias}.
\item \code{R CMD check} with a true value for environment variable
\env{_R_CHECK_BASHISMS_} checks more thoroughly, including for
\command{bash} scripts and bashisms in components of
\command{autoconf}-generated \command{configure} scripts.
\item \command{R CMD check} gains option \option{--run-demo} to
check demo scripts analogously to tests. This includes a check
for undeclared package dependencies: it can also be enabled
separately by setting the environment variable
\env{_R_CHECK_PACKAGES_USED_IN_DEMO_} to a true value
(as done by \command{R CMD check --as-cran}).
\item \code{R CMD build} now supports \option{--compression=zstd}
on platforms with sufficient support for \command{zstd}.
\item \code{tools::texi2pdf(..., texinputs=\var{paths})} now
\emph{pre}pends the specified \var{paths} to \env{TEXINPUTS}.
When building \R itself (\file{doc/NEWS.pdf} and base vignettes)
or package manuals using \command{R CMD Rd2pdf}, it is ensured
that this \R's \file{Rd.sty} takes precedence over any other
(incompatible) versions in default \I{\dQuote{texmf trees}}.
\item \code{tools::Rd2latex()} no longer outputs an
\samp{\\inputencoding{utf8}} line by default;
such a declaration is obsolete since \LaTeX 2018-04-01.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{update_pkg_po()} now copies \file{.mo} files to the
\pkg{translation} package even if a \file{DESCRIPTION} file
exists, thanks to \I{Michael Chirico} fixing \PR{18694}.
\item Auto-generated \code{citation()} entries no longer include
(additional) URLs in the \samp{note} field (\PR{18547}).
\item \code{as.data.frame.list()} gets a new option \code{new.names}
and now preserves \code{NA} names, thus fixing the \code{format()}
method for data frames, and also bug \PR{18745}.
\I{Relatedly}, the \code{format()} method gets an option \code{cut.names}.
\item \code{stem()} formats correctly also in cases where rounding
up, e.g., from 9.96 to 10 needs more digits; thanks to \I{Ella
Kaye} and \I{Kelly Bodwin}, fixing \PR{8934} during \sQuote{\I{R
Dev Day}} at \I{useR!2024}.
Additionally, \code{stem(x)} now works normally also when
\code{length(x) == 1}.
\item \pkg{tools}' \code{toTitleCase()} now works better, fixing
\PR{18674}, thanks to \I{Shannon Pileggi}, \I{Sarah Zeller},
\I{Reiko Okamoto}, and \I{Hugo Gruson}'s \sQuote{\I{R Dev Day}}
effort.
\item Printing matrices (typically with many rows and or columns)
now also omits columns when desirable according to option
\code{max.print}, or argument \code{max}, respectively.
This is primarily the work of \I{Lorena Abad},
\I{Ekaterina Akimova}, \I{Hanne Oberman}, \I{Abhishek Ulayil},
and \I{Lionel Henry} at the \sQuote{\I{R Dev Day}}, thus fixing
\PR{15027}.
\item \code{Sys.setLanguage()} now warns about \emph{some}
failures to change the language.
\item Printing \code{ls.str()} now shows \code{"<missing>"} even when
\R's language setting is not English.
\item \code{xyTable()} now handles and reports \code{NA}s
fixing \PR{18654}.
Thanks to \I{Heather Turner} and \I{Zhian Kamvar} for report and patch.
\item \code{as(*, "raw")} now works as documented, thanks to \I{Mikael
Jagan}'s \PR{18795}.
\item Informational messages of e.g., \code{print(1:1e4, max=1000)},
now correctly mention \code{max} in addition to
\code{getOption("max.print")}.
\item \code{rowSums(A, dims = dd)}, \code{colMeans(..)}, etc, give a
more helpful error message when \code{dd} is not of length one,
thanks to \I{Michael Chirico}'s \PR{18811}.
\item \code{seq.Date()} no longer explicitly coerces results from
integer to double, analogously with \code{seq.default()},
\code{seq.int()} and \code{seq.POSIXt()}, resolving a \emph{modified}
\PR{18782}.
\item \code{axisTicks(usr, ...)} documentation clarification for
\code{log = TRUE}, fixing bug \PR{18821} thanks to \I{Duncan Murdoch}.
\item \code{debug()} and \code{debugonce(fun)} now also accept a
string \code{fun} when it names an S4 generic, fixing \PR{18822}
thanks to \I{Mikael Jagan}.
\item \code{debugonce(<S4-simple-body>, signature=*)} now works
correctly when \dQuote{called twice}, fixing \PR{18824} thanks to
\I{Mikael Jagan}.
\item \code{format(dtime, digits=* / format=*)} is more consistent
when the \code{POSIXt} date-time object \code{dtime} has fractional
(non integer) seconds. Fixes \PR{17350}, thanks to new contributions
by \I{LatinR}'s \sQuote{\I{R Dev Day}} participants, \I{Heather
Turner} and \I{Dirk Eddelbuettel}; also fixes more cases, notably
when \code{format} contains "%OS<nodigit>".
\item \code{options(scipen = NULL)} and other invalid values now
signal an error instead of invalidating ops relying on a finite
integer value. Values outside the range -9 .. 9999 are now warned
about and set to a boundary or to the default \code{0}, e.g., in
case of an \code{NA}.
\item \code{cbind()} could segfault with \code{NULL} inputs.
(Seen when \R was built with \command{gcc-14}, \abbr{LTO} and C99
inlining semantics.)
\item Fix segfault on \code{quartz()} from \code{grid.glyph()}
call with \code{glyphInfo()} that describes non-existent font
(\PR{18784}). Thanks to \I{Tomek Gieorgijewski}.
\item \code{format()} etc, using \code{decimal.mark = s}, by default
getting \code{s <- getOption("OutDec")}, signals a warning (to become
an error in the future) when \code{s} is not a string with exactly
one character.
\item When \code{s <- getOption("OutDec")} is not a string of one
character, a warning is signalled now whenever it is used in internal
C code, notably when calling the default methods of \code{format()}.
\item \code{pwilcox()} and \code{qwilcox()} now check for user
interrupt less frequently.
\item \code{summary(<stl>)} (which prints directly) finally gets the
same \code{digits} default as the formatting printing of default
\code{summary()} method results, and it is documented explicitly.
\item \code{options(show.error.locations = TRUE)} once
again shows the most recent known location when an
error is reported. Setting its value to \code{"bottom"}
is no longer supported. Numerical values are converted
to logical.
\item C API function \code{R_GetCurrentSrcref(skip)} now
returns \code{srcref} entries correctly. (Note that there
is also a change to the interpretation of \code{skip};
see the C-LEVEL API entry above.)
\item \code{tools::Rd2latex()} now removes leading and trailing
spaces from \verb{\alias} entries as documented, fixing indexing
and linking hiccups in some PDF manuals.
\item \command{R CMD Rd2pdf} can now render the package manual from
a \option{--latex} installation also when the help contains figures.
\item The argument of \code{as.environment()} is now named \code{x},
not \code{object}, as was always documented and shown when
printing it; thanks to \I{Gael Millot}'s \PR{18849}.
\item When \command{R CMD check} aims at getting the time+date from a
world clock, it is more robust against unexpected non-error results,
thanks to \I{Michael Chirico}'s \PR{18852}.
\item The \code{tools::parseLatex()} parser made several parsing
errors (\PR{18855}).
\item Error messages produced by \code{tools::parseLatex()} are
now more readable (\PR{18855}).
\item \command{R CMD build <pkg>} excludes more file patterns
when it tars the <pkg> directory, fixing both \PR{18432} and
\PR{18434}, for \command{vim} and \command{GNU Global}
\command{emacs} users, thanks to \I{Dirk Eddelbuettel}'s patch.
\item \code{quantile()}'s default method gets an option \code{fuzz}
to protect against floating point inaccuracy before rounding, thus
fixing \PR{15811} and, \I{en passant}, \PR{17683}.
\item Printing arrays now also omits columns, rows and slices when
desirable according to option \code{max.print}, or argument
\code{max}, respectively, addressing most of the remaining part of
\PR{15027}, thanks to \I{Sherry Zhang}'s patch.
\item \code{drop.terms(y ~ w, 1)} and similar now work, thanks to
\I{Benjamin Sommer}'s report in \PR{18861} and collaboration with
\I{Heather Turner} improving \code{reformulate()}.
\item Many arguments which should be length-1 logical are checked
more thoroughly. The most commonly seen errors are in
\code{unlink(, recursive)}, \code{tempdir()} and the \code{na.rm}
arguments of \code{max()}, \code{min()}, \code{sum()}, \dots.
\code{grep()}, \code{strsplit()} and similar took
non-\code{TRUE}/\code{FALSE}
values of their logical arguments as \code{FALSE}, but these were
almost always mismatches to unnamed arguments and are now reported
as \code{NA}.
\item \code{vignette("reshape")} is now also available on Windows.
\item \code{trace(coerce, ..)} now works correctly, fixing \PR{18823}
thanks to \I{Mikael Jagan}.
\item \command{R CMD check} now also reports bad symbols in
package shared objects linked in from local static libraries
(\PR{18789}).
\item \code{factanal()} now works correctly also, e.g., for
\pkg{GPArotation}, \code{oblimin()} rotations, fixing \PR{18417},
thanks to \I{Coen Bernaards} and others.
\item Setting \code{attributes} on primitive functions is
deprecated now and already an error in the development version of \R.
}
}
}
\section{\Rlogo CHANGES IN R 4.4.3}{
\subsection{INSTALLATION}{
\itemize{
\item \R can be installed using C23 (for example with
\option{-std=gnu23} or \option{-std=gnu2x}) with recent compilers
including \command{gcc} 12--14, Apple \command{clang} 15--16, \I{LLVM}
\command{clang} 17--20 and Intel \command{icx} 2024.2.
It can be installed with the upcoming (at the time of writing)
\command{gcc} 15, which defaults to C23.
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item The functions \code{R_strtod} and \code{R_atof} now allow
hexadecimal constants without an exponent, for compatibility with
their C99 versions (\PR{18805}).
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD build} and \command{R CMD check} now allow
reference output for demo scripts (\file{demo/\var{demo}.Rout.save}
files) to be shipped with the package, as proposed by
\I{Torsten Hothorn} in \PR{18816}.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{kappa(A, exact=TRUE)} for singular \code{A} returns
\code{Inf} more generally, fixing \PR{18817} reported by
\I{Mikael Jagan}.
\item Fixed URLs of the sun spots (\code{sunspot.month} etc) data
sets and mention future changes due to recalibration.
\item The parser now accepts hexadecimal constants with a decimal
point without an exponent (taken as \code{p0}) as documented in
\code{?NumericConstants} (\PR{18819}).
\item \code{rbind()} now works correctly when inputs include a raw
vector and a logical, integer or double vector -- previously the
inclusion of the latter was garbled.
\item \code{smooth.spline()} checks validity of its arguments
\code{df.offset} and \code{penalty}: it could segfault if they
were \code{NULL}.
\item \code{isGeneric(<primitive>, fdef=*, getName=TRUE)} now also
returns the name instead of just \code{TRUE}, fixing \PR{18829}
reported by \I{Mikael Jagan}.
\item \code{isGeneric(fdef = print)} now works, fixing \PR{18369}
thanks to \I{Mikael Jagan}.
\item \code{sort(x, method = "qsort")} made illegal accesses when
\code{x} has length 0.
\item \code{dir.create()} is protected against being passed an
empty string as its \code{path} argument.
\item Silent integer overflow could occur in the
\sQuote{exact} computations for \code{fisher.test()} for
unrealistic inputs: this is now an error.
\item Some invalid C-level memory accesses are avoided for
\code{loglin(, margin = NULL)}.
\code{loglin(, param = TRUE)} no longer gives an error in corner
cases such as a one-dimensional input.
\item \code{dev.capabilities() $ events} now reports \code{"Idle"} if
the device provides it, fixing \PR{18836}, thanks to \I{Trevor Davis}.
\item \code{arima(.., seasonal = <wrong-vector>)} correctly errors
now, ditto for \code{arima0()}, thanks to \I{Norbert Kuder}'s report
on the R-devel list.
\item \code{binomial(<link>)$linkinv(eta)} and \code{.. $mu.eta(eta)}
now also work for \code{"logit"} link when \code{is.integer(eta)}.
\item \code{as.roman(x)} now should work platform independently,
also for, e.g., \code{x = "IIIII"} (= V) and \code{x = "IIIIII"}
(= VI).
\item \command{R CMD Rd2pdf} works again on an installed package
directory containing \LaTeX help (from option \option{--latex}),
thanks to a report by \I{Peter Ruckdeschel}.
}
}
}
\section{\Rlogo CHANGES IN R 4.4.2}{
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item The S-compatibility macros \code{F77_COM} and
\code{F77_COMDECL} defined in header \file{R_ext/RS.h} are
deprecated and will be removed shortly. We could find no record
of their use.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \I{Mathlib} function \code{lgammacor(x)} no longer warns about
underflow to zero for large \code{x}.
\item Text widths and heights were incorrectly reported by the
Quartz device if the drawing context didn't exist yet (typically
when drawing off-screen to a window that is yet to appear, see
\PR{18591}).
\item The Quartz device could segfault in cases where paths with
spaces are used in the new glyph drawing API.
Thanks to \I{Tomek Gieorgijewski} (\PR{18758}).
\item On macOS in R CRAN builds, it is again possible to read
little-endian UTF-16 text with a \abbr{BOM} from a connection using
\code{encoding="UTF-16"}. Users building R from source should avoid
using the system \code{libiconv} in macOS 14.1 and later.
\item \pkg{methods}' internal \code{.requirePackage()} now re-enables
primitive method dispatch when needed; thanks to \I{Ivan Krylov}
for demystifying CRAN package check failures on the R-devel mailing
list.
}
}
}
\section{\Rlogo CHANGES IN R 4.4.1}{
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item Functions \code{R_atof} and \code{R_strtod} declared in
header \file{R_ext/Utils.h} are now documented in
\sQuote{Writing R Extensions} and so formally part of the API.