My favorite changes include:
- A C23 compiler (if available) is now selected by default for compilation of R and packages.
- install.packages() now supports parallel downloads
CHANGES IN R 4.5.0:
NEW FEATURES
as.integer(rl)and henceas.raw(rl)now work for alistofraw(1)elements, as proposed by Michael Chirico’s PR#18696.- graphics’
grid()gains optional argumentnintLog.- New functions
check_package_urls()andcheck_package_dois()in package tools for checking URLs and DOIs in package sources.- New
head()andtail()methods for class"ts"time series, proposed by Spencer Graves on R-devel.- New
qr.influence()function, a “bare bones” interface to thelm.influence()leave-one-out diagnostics computations; wished for in PR#18739.- Package
citation()results auto-generated from the package metadata now also provide package DOIs for CRAN and Bioconductor packages.- New function
grepv()identical togrep()except for the defaultvalue = TRUE.methods(<pkg>:::<genfun>)now does report methods when neither the generic nor the methods have been exported.pdf()gains anauthorargument to set the corresponding metadata field, and logical argumentstimestampandproducerto optionally omit the respective metadata. (Thanks to Edzer Pebesma.)grDevices::glyphInfo()gains arotargument to allow per-glyph rotation. (Thanks to Daniel Sabanes Bove.)- Package tools now exports functions
CRAN_current_db(),CRAN_aliases_db(),CRAN_rdxrefs_db(),CRAN_archive_db(), andCRAN_authors_db().- Package tools now exports functions
R()andparse_URI_reference().- Package tools now exports functions
base_aliases_db()andbase_rdxrefs_db().- It is now possible to set the background color for row and column names in the data editor on Windows (
Rgui).Rtermon Windows now accepts input lines of unlimited length.file.info()on Windows now provides file owner name and domain.Sys.info()on Windows now provides current user domain.findInterval()gets new argumentscheckSortedandcheckNAwhich allow skipping relatively costly checks; related to PR#16567.pnorm(x)underflows more gracefully.get(nam, env)now signals a classed error,"getMissingError", as “subclass” of"missingArgError"where the latter is used also in similar situations, e.g.,f <- function(x) exp(x); try(f()).- The set operations now avoid the
as.vector()transformation for same-kind apparently vector-like operands.md5sum()can be used to compute an MD5 hash of a raw vector of bytes by using thebytes=argument instead offiles=. The two arguments are mutually exclusive.- Added function
sha256sum()in package tools analogous tomd5sum()implementing the SHA-256 hashing algorithm.- The
xtfrm()method for class"AsIs"is now considerably faster thanks to a patch provided by Ivan Krylov.- The
merge()method for data frames will no longer convert row names used for indexing usingI(), which will lead to faster execution in cases wheresort = TRUEandall.xand/orall.yare set toTRUE.- The methods package internal function
.requirePackage()now callsrequireNamespace(p)instead ofrequire(p), hence no longer adding packages to thesearch()path in cases methods or class definitions are needed. Consequently, previous workflows relying on the old behaviour will have to be amended by adding correspondinglibrary(p)calls.- More R-level messages use a common format containing
"character string"for more consistency and less translation work.available.packages()andinstall.packages()get an optional switchcache_user_dir, somewhat experimentally.- The
sunspot.monthdata have been updated to Oct 2024; because of recalibration also historical numbers are changed, and we keep the previous data assunspot.m2014for reproducibility.- The
quartz()device now supports alpha masks. Thanks to George Stagg, Gwynn Gebeyhu, Heather Turner, and Tomek Gieorgijewski.- The
print()method for date-time objects (POSIX.t) gets an optionaldigitsargument for fractional seconds, passed to improvedformat.POSIXlt(); consequently,print(<date.time>, digits = n)allows to print fractions of seconds.install.packages()anddownload.packages()download packages simultaneously usinglibcurl, significantly reducing download times when installing or downloading multiple packages.- Status reporting in
download.file()has been extended to report the outcome for individual files in simultaneous downloads.- The Rd
\linkmacro now allows markup in the link text when the topic is given by the optional argument, e.g., ‘\link[=gamma]{\eqn{\Gamma(x)}}’.- If
La_library()is empty,sessionInfo()still reportsLa_version()when available.seq.int(from, to, by, ....)when∣by∣=1∣by∣=1now behaves as ifbywas omitted, and hence returnsfrom:to, possibly integer.seq.Date(from, to, by, ....)andseq.POSIXt(..)now also work whenfromis missing and sufficient further arguments are provided, thanks to Michael Chirico’s report, patch proposal in PR#17672 and ‘R Dev Day’ contributions. TheDatemethod also works forseq(from, to), whenbyis missing and now defaults to"1 days". It is now documented (and tested) that thebystring may be abbreviated in bothseqmethods. Both methods return or keep internal type"integer"more consistently now. Also,as.POSIXct({})is internally integer.duplicated(),unique(), andanyDuplicated()now also work for classexpressionvectors.- New function
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.)- There is some support for
zstdcompression of tarballs intar()anduntar(). (This depends on OS support oflibzstdor bytar.)print(summary(<numbers>))gets new optional argumentzdigitsto allow more flexible and consistent (double) rounding. The current defaultzdigits = 4Lis somewhat experimental. Specifying bothdigits = *, zdigits = *allows behaviour independent of the globaldigitsoption.- The
format()method for"difftime"objects gets a new back compatible optionwith.units.- A
summary()method for"difftime"objects which prints nicely, similar to those for"Date"and"POSIXct".unique()‘s default method now also deals with"difftime"objects.optimize(f, *)whenf(x)is not finite says more about the value in itswarningmessage. It no longer replaces-Infby the largest positive finite number.- The documentation of
gamma()andis.numeric()is more specific, thanks to the contributors of PR#18677.- New dataset
gaitthanks to Heather Turner and Ella Kaye, used in examples.- New datasets
penguinsandpenguins_rawthanks to Ella Kaye, Heather Turner, and Kristen Gorman.isSymmetric(<matrix>)gains a new optiontrans = "C"; when set to non-default, it tests for “simple” symmetry of complex matrices.model.frame()produces more informative error messages in some cases when variables in the formula are not found, thanks to Ben Bolker’s PR#18860.selectMethod(f, ..)now keeps the function name if the function belongs to a group generic and the method is for the generic.terms(<formula>, specials = *)now treats non-syntactic specials more gracefully, thanks to Mikael Jagan’s PR#18568.BLAS and LAPACK
- The bundled BLAS and LAPACK sources have been updated to those shipped as part of January 2025’s LAPACK 3.12.1.
- 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.
- 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
dgemmtrandzgemmtrwhich are now used by LAPACK routines. This means that BLAS implementations are no longer interchangeable.- To work around this, R can be configured with option –with-2025blas which arranges for the 2025 BLAS additions to be compiled into
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 symlinking ‘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 (OpenBLAS does as from version 0.3.29).- Windows builds currently use the internal LAPACK and by default the internal BLAS: notes on how to swap the latter via ‘Rblas.dll’ are in file ‘src/extra/blas/Makefile.win’.
INSTALLATION on a UNIX-ALIKE
- A C23 compiler (if available) is now selected by default for compilation of R and packages. R builds can opt out via the
configureflag –without-C23, unless the specified or default (usuallygcc) compiler defaults to C23:gcc15 will. A C23 compiler is known to be selected withgcc13–15, LLVMclang18–20 (and 15 should), Appleclang15–17 and Intel 2024.2–2025.0 (and 2022.2 should). Current binary distributions on macOS use Appleclang14 and so do not use C23.- The minimum
autoconfrequirement for a maintainer build has been increased toautoconf2.72.- Building the HTML and Info versions of the R manuals now requires
texi2anyfrom Texinfo 6.1 or later.- Failures in building the manuals under ‘doc’ now abort the installation, removing any file which caused the failure.
- Control of symbol visibility is now supported on macOS (the previous check only worked on ELF platforms).
- There is now support for installing the debug symbols for recommended packages on macOS: see ‘REC_INSTALL_OPT’ in file ‘config.site’.
configureis now able to find an externallibintlon macOS (the code from an older GNU gettext distribution failed to try linking with the macOS Core Foundation framework).INSTALLATION on WINDOWS
- Both building R and installing packages use the C compiler in C23 mode.
- R on Windows by default uses
pkg-configfor linking against external libraries. This makes it easier to test R and packages with alternative toolchains (such as from Msys2, e.g., testing with LLVM and possibly with sanitizers). It also allows more significant Rtools updates within a single R minor release.- The installer scripts for Windows have been tailored to Rtools45, an update of the Rtools44 toolchain. It is based on GCC 14. The experimental support for 64-bit ARM (
aarch64) CPUs is based on LLVM 19. R-devel and R 4.5.x are no longer maintained to be buildable using Rtools44 and it is advised to switch to Rtools45.DEPRECATED AND DEFUNCT
is.R()is defunct. Environment variable _R_DEPRECATED_IS_R_ no longer has any effect.- Deprecated (for more than 9 years!) functions
linearizeMlist,listFromMlist, andshowMlistand the"MethodsList"class for S4 method handling were removed from package methods. Deprecated functionsbalanceMethodsList,emptyMethodsList,inheritedSubMethodLists,insertMethod,insertMethodInEmptyList,makeMethodsList,mergeMethods,MethodsList,MethodsListSelect, andSignatureMethodwere made defunct, as were the"MethodsList"branches of functionsassignMethodsMetaData,finalDefaultMethod, andMethodAddCoerce.getMethods(*, table = TRUE)is deprecated.- Building with the bundled (and old) version of
libintlis deprecated and now gives aconfigurewarning. This should be selected only if neither the OS’slibc(as on GNU Linux) nor an externallibintllibrary provide suitable functions. Instead installlibintlfrom a recent version of GNU gettext (available for macOS) or useconfigureoption –disable-nls. The ability to use the bundled version may be removed as soon as R 4.5.1.- The deprecated
xfig()graphics device has been removed.PACKAGE INSTALLATION
- Packages are now installed using C23 where supported by the OS and R build. Packages using R‘s compiler settings can ask not to use C23 via including
USE_C17inSystemRequirementsor can be installed byR CMD INSTALL --use-C17. (Some packages ignore these settings in theirconfigurescript or when compiling in sub-directories of ‘src’, as will those using a ‘src/Makefile’.)- Source installs now report the package version in the log.
- There is preliminary support for C++26 with GCC
>=>=14, Appleclang++>=>=16 and LLVMclang++>=>=17.C-LEVEL FACILITIES
- The non-API and hidden entry points
Rf_setIVector,Rf_setRVectorandRf_setSVectorhave been removed.- 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.
SET_TYPEOFnow signals an error unless the old and new types have compatible memory structure and content. Use ofSET_TYPEin 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.- The set of LAPACK (double and complex) routines declared in the headers ‘R_ext/Lapack.h’ and ‘R_ext/Applic.h’ has been extended, mostly to routines actually in use by packages.
- Memory allocation messages now use the (non-SI notation)
"Mb","Gb", …, and"Mbytes"strings as arguments instead of as part of the (translatable format) string. This is one step for PR#18297; from Henrik Bengtsson.- Header ‘R_ext/Constants.h’ (included by ‘R.h’) now always includes header ‘float.h’ or ‘cfloat’ for constants such as
DBL_MAX.- Strict R headers are now the default. This removes the legacy definitions of
PI,Calloc,ReallocandFree: useM_PI,R_Calloc,R_ReallocorR_Freeinstead.- The deprecated and seemingly never-used S-compatibility macros
F77_COMandF77_COMDECLhave been removed from header ‘R_ext/RS.h’.- The
enumRbooleandefined in header ‘R_ext/Boolean.h’ now has a fixed underlying type ofinton 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 ofclang(from LLVM and Apple) and (with a warning when using -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 anenum, it has been possible to assignNA_INTEGERto anRbooleanvariable, coerce it tointand recover the value. If there were a platform which used an underlying type of a different size this would be an ABI-breaking change (but we are unaware of any such platform).- Header ‘R_ext/Boolean.h’ now ensures that a
booltype is available either as a keyword (C23 and C++) or by including the C99 header ‘stdbool.h’. This is being used internally in R to replaceRbooleanbybool.- There are new functions
asRbooleanandasBool, variants ofasLogicalmore suited to converting logical arguments toRbooleanor tobool. They require a length-one input and throw an error if that evaluates toNA.- Header ‘R_exts/Error.h’ now ensures that
Rf_errorand similar are given anoreturnattribute when used from C++ under all compilers.- Header ‘R_exts/Utils.h’ no longer contains a declaration for
F77_SUB(interv). This is intended to be called from Fortran and was wrongly declared:LOGICALin Fortran corresponds toint *notRboolean *.- Defining
R_INCLUDE_BOOLEAN_Hto0before including headers ‘R.h’ or ‘Rinternals.h’ (or any other header which includes ‘R_ext/Boolean.h’) stops the inclusion of headerR_ext/Boolean.hwhich ‘defines’ constantsTRUE,FALSE,true,falseand the typeboolwhich 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.C-LEVEL API
- The ‘Writing R Extensions’ 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.
- ‘Writing R Extensions’ has a new section ‘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.
- New API function
R_mkClosure. This checks that its arguments are valid and should be used instead ofallocSExp(CLOSXPfollowed bySET_FORMALS,SET_BODY, andSET_CLOENV.- New API functions
R_ClosureFormals,R_ClosureBody, andR_ClosureEnvfor extracting closure components. The existing functionsR_ClosureExprandR_BytecodeExprhave also been added to the API.- New API function
R_ParentEnvcorresponding to R‘sparent.env().- Further non-API entry points have been added to those reported by
R CMD check:COMPLEX0,ddfind,DDVAL,ENSURE_NAMEDMAX,ENVFLAGS,FRAME,HASHTAB,INTERNAL,IS_ASCII,IS_UTF8,LEVELS,NAMED,PRSEEN,RDEBUG,REAL0,Rf_findVarInFrame3,SET_BODY,SET_CLOENV,SET_FORMALS,SET_PRSEEN,SET_RDEBUG,STRING_PTR,SYMVALUE, andVECTOR_PTR. Any declarations for these in public header files will be removed in the near future, and they will be hidden where possible.- Some
R CMD check‘NOTE’s on the use of non-API entry points have been upgraded to ‘WARNING’s in preparation for removing declarations and, where possible, hiding these entry points.- Additional non-API entry points have been added to those reported by
R CMD check:IS_LONG_VEC,PRCODE,PRENV,PRVALUE,R_nchar,Rf_NonNullStringMatch,R_shallow_duplicate_attr,Rf_StringBlank,SET_TYPEOF,TRUELENGTH,XLENGTH_EX, andXTRUELENGTH.- Enable defining R_NO_REMAP_RMATH and calling
Rf_*()as has been documented in ‘Writing R Extensions’ for a while, fixing PR#18800 thanks to Mikael Jagan and Suharto Anggono.R_GetCurrentSrcref(skip)now skips calls rather thansrcrefs, consistent with counting items in thetraceback()display. Ifskip == NA_INTEGER, it searches for the firstsrcref, starting at the current evaluation state and proceeding through the call stack; otherwise, it returns thesrcrefof the requested entry from the call stack.UTILITIES
R CMD INSTALL(and hencecheck) now compile C++ code with-DR_NO_REMAP. ‘Writing R Extensions’ has been revised to describe the remapped entry points, for with theRf_prefix remains optional when used from C code (but is recommended for new C code).R CMD check --as-crannotes bad parts in the ‘DESCRIPTION’ file’s URL fields.R CMD checknow reports more warnings on long-deprecated/obsolete Fortran features reported bygfortran -Wall. For hints on how to modernize these, see https://fortranwiki.org/fortran/show/Modernizing+Old+Fortran.- Since almost all supported R versions now use UTF-8,
R CMD checkno longer by default reports on marked UTF-8 or Latin-1 strings in character data. Set environment variable _R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_ to a false value for the previous behaviour.tools::checkDocFiles()notes more cases of usage documentation without corresponding\alias.R CMD checkwith a true value for environment variable _R_CHECK_BASHISMS_ checks more thoroughly, including forbashscripts and bashisms in components ofautoconf-generatedconfigurescripts.R CMD checkgains 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 _R_CHECK_PACKAGES_USED_IN_DEMO_ to a true value (as done byR CMD check --as-cran).R CMD buildnow supports –compression=zstd on platforms with sufficient support forzstd.tools::texi2pdf(..., texinputs=paths)now prepends the specified paths to TEXINPUTS. When building R itself (‘doc/NEWS.pdf’ and base vignettes) or package manuals usingR CMD Rd2pdf, it is ensured that this R‘s ‘Rd.sty’ takes precedence over any other (incompatible) versions in default “texmf trees”.tools::Rd2latex()no longer outputs an ‘\inputencoding{utf8}’ line by default; such a declaration is obsolete since LaTeX 2018-04-01.BUG FIXES
update_pkg_po()now copies ‘.mo’ files to the translation package even if a ‘DESCRIPTION’ file exists, thanks to Michael Chirico fixing PR#18694.- Auto-generated
citation()entries no longer include (additional) URLs in the ‘note’ field (PR#18547).as.data.frame.list()gets a new optionnew.namesand now preservesNAnames, thus fixing theformat()method for data frames, and also bug PR#18745. Relatedly, theformat()method gets an optioncut.names.stem()formats correctly also in cases where rounding up, e.g., from 9.96 to 10 needs more digits; thanks to Ella Kaye and Kelly Bodwin, fixing PR#8934 during ‘R Dev Day’ at useR!2024. Additionally,stem(x)now works normally also whenlength(x) == 1.- tools’
toTitleCase()now works better, fixing PR#18674, thanks to Shannon Pileggi, Sarah Zeller, Reiko Okamoto, and Hugo Gruson’s ‘R Dev Day’ effort.- Printing matrices (typically with many rows and or columns) now also omits columns when desirable according to option
max.print, or argumentmax, respectively. This is primarily the work of Lorena Abad, Ekaterina Akimova, Hanne Oberman, Abhishek Ulayil, and Lionel Henry at the ‘R Dev Day’, thus fixing PR#15027.Sys.setLanguage()now warns about some failures to change the language.- Printing
ls.str()now shows"<missing>"even when R‘s language setting is not English.xyTable()now handles and reportsNAs fixing PR#18654. Thanks to Heather Turner and Zhian Kamvar for report and patch.as(*, "raw")now works as documented, thanks to Mikael Jagan’s PR#18795.- Informational messages of e.g.,
print(1:1e4, max=1000), now correctly mentionmaxin addition togetOption("max.print").rowSums(A, dims = dd),colMeans(..), etc, give a more helpful error message whenddis not of length one, thanks to Michael Chirico’s PR#18811.seq.Date()no longer explicitly coerces results from integer to double, analogously withseq.default(),seq.int()andseq.POSIXt(), resolving a modified PR#18782.axisTicks(usr, ...)documentation clarification forlog = TRUE, fixing bug PR#18821 thanks to Duncan Murdoch.debug()anddebugonce(fun)now also accept a stringfunwhen it names an S4 generic, fixing PR#18822 thanks to Mikael Jagan.debugonce(<S4-simple-body>, signature=*)now works correctly when “called twice”, fixing PR#18824 thanks to Mikael Jagan.format(dtime, digits=* / format=*)is more consistent when thePOSIXtdate-time objectdtimehas fractional (non integer) seconds. Fixes PR#17350, thanks to new contributions by LatinR’s ‘R Dev Day’ participants, Heather Turner and Dirk Eddelbuettel; also fixes more cases, notably whenformatcontains “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 default0, e.g., in case of anNA.cbind()could segfault withNULLinputs. (Seen when R was built withgcc-14, LTO and C99 inlining semantics.)- Fix segfault on
quartz()fromgrid.glyph()call withglyphInfo()that describes non-existent font (PR#18784). Thanks to Tomek Gieorgijewski.format()etc, usingdecimal.mark = s, by default gettings <- getOption("OutDec"), signals a warning (to become an error in the future) whensis not a string with exactly one character.- When
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 offormat().pwilcox()andqwilcox()now check for user interrupt less frequently.summary(<stl>)(which prints directly) finally gets the samedigitsdefault as the formatting printing of defaultsummary()method results, and it is documented explicitly.options(show.error.locations = TRUE)once again shows the most recent known location when an error is reported. Setting its value to"bottom"is no longer supported. Numerical values are converted to logical.- C API function
R_GetCurrentSrcref(skip)now returnssrcrefentries correctly. (Note that there is also a change to the interpretation ofskip; see the C-LEVEL API entry above.)tools::Rd2latex()now removes leading and trailing spaces from\aliasentries as documented, fixing indexing and linking hiccups in some PDF manuals.R CMD Rd2pdfcan now render the package manual from a –latex installation also when the help contains figures.- The argument of
as.environment()is now namedx, notobject, as was always documented and shown when printing it; thanks to Gael Millot’s PR#18849.- When
R CMD checkaims at getting the time+date from a world clock, it is more robust against unexpected non-error results, thanks to Michael Chirico’s PR#18852.- The
tools::parseLatex()parser made several parsing errors (PR#18855).- Error messages produced by
tools::parseLatex()are now more readable (PR#18855).R CMD build <pkg>excludes more file patterns when it tars the <pkg> directory, fixing both PR#18432 and PR#18434, forvimandGNU Globalemacsusers, thanks to Dirk Eddelbuettel’s patch.quantile()‘s default method gets an optionfuzzto protect against floating point inaccuracy before rounding, thus fixing PR#15811 and, en passant, PR#17683.- Printing arrays now also omits columns, rows and slices when desirable according to option
max.print, or argumentmax, respectively, addressing most of the remaining part of PR#15027, thanks to Sherry Zhang’s patch.drop.terms(y ~ w, 1)and similar now work, thanks to Benjamin Sommer’s report in PR#18861 and collaboration with Heather Turner improvingreformulate().- Many arguments which should be length-1 logical are checked more thoroughly. The most commonly seen errors are in
unlink(, recursive),tempdir()and thena.rmarguments ofmax(),min(),sum(), ….grep(),strsplit()and similar took non-TRUE/FALSEvalues of their logical arguments asFALSE, but these were almost always mismatches to unnamed arguments and are now reported asNA.vignette("reshape")is now also available on Windows.trace(coerce, ..)now works correctly, fixing PR#18823 thanks to Mikael Jagan.R CMD checknow also reports bad symbols in package shared objects linked in from local static libraries (PR#18789).factanal()now works correctly also, e.g., for GPArotation,oblimin()rotations, fixing PR#18417, thanks to Coen Bernaards and others.- Setting
attributeson primitive functions is deprecated now and already an error in the development version of R.

https://cran.r-project.org/doc/manuals/r-devel/NEWS.html




