Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:R:patched
R
R-release.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File R-release.diff of Package R
# cd *inside* the ...../R-4.4.2/ directory, and do # zcat ..../R-release.diff.gz | patch -p1 -E # --------- ===== # You need a "g[un]zip capable zcat", and canNOT use Solaris "patch"! # Rather get ("gzip" and) "diffutils" from any GNU mirror. # diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/SVN-REVISION R-patched/SVN-REVISION --- R-release-orig/SVN-REVISION 2024-10-31 09:02:38.000000000 +0100 +++ R-patched/SVN-REVISION 2024-11-25 01:32:23.873630939 +0100 @@ -1,2 +1,2 @@ -Revision: 87279 -Last Changed Date: 2024-10-31 +Revision: 87369 +Last Changed Date: 2024-11-24 diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/VERSION R-patched/VERSION --- R-release-orig/VERSION 2024-10-31 09:00:02.000000000 +0100 +++ R-patched/VERSION 2024-11-11 15:37:29.089761415 +0100 @@ -1 +1 @@ -4.4.2 +4.4.2 Patched diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/FAQ R-patched/doc/FAQ --- R-release-orig/doc/FAQ 2024-10-31 09:02:39.000000000 +0100 +++ R-patched/doc/FAQ 2024-11-25 01:32:24.832636338 +0100 @@ -85,7 +85,7 @@ 7.28 Why is read.table() so inefficient? 7.29 What is the difference between package and library? 7.30 I installed a package but the functions are not there - 7.31 Why doesn’t R think these numbers are equal? + 7.31 Why doesn't R think these numbers are equal? 7.32 How can I capture or ignore errors in a long simulation? 7.33 Why are powers of negative numbers wrong? 7.34 How can I save the result of each iteration in a loop into a separate file? @@ -121,8 +121,8 @@ 1.1 Legalese ============ -Copyright © 1998–2020 Kurt Hornik -Copyright © 2021–2024 R Core Team +Copyright © 1998-2020 Kurt Hornik +Copyright © 2021-2024 R Core Team This document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -151,7 +151,7 @@ ======================== In publications, please refer to this FAQ as Hornik and R Core Team (2024), -“The R FAQ”, and give the above, _official_ URL: +"The R FAQ", and give the above, _official_ URL: @Misc{, author = {Kurt Hornik and the R Core Team}, @@ -172,9 +172,9 @@ Feedback via email to <R-devel@R-project.org> is most welcome. Features specific to the Windows and macOS ports of R are described in -the “R for Windows FAQ” -(https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) and the “R for Mac -OS X FAQ” (https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html). If you +the "R for Windows FAQ" +(https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) and the "R for Mac +OS X FAQ" (https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html). If you have information on Mac or Windows systems that you think should be added to this document, please let us know. @@ -190,7 +190,7 @@ files. The design of R has been heavily influenced by two existing languages: -Becker, Chambers & Wilks’ S (*note What is S?::) and Sussman’s Scheme +Becker, Chambers & Wilks' S (*note What is S?::) and Sussman's Scheme (http://community.schemewiki.org/?scheme-faq). Whereas the resulting language is very similar in appearance to S, the underlying implementation and semantics are derived from Scheme. *Note What are the differences @@ -205,8 +205,8 @@ models, nonlinear regression models, time series analysis, classical parametric and nonparametric tests, clustering and smoothing. There is also a large set of functions which provide a flexible graphical environment for -creating various kinds of data presentations. Additional modules (“add-on -packages”) are available for a variety of specific purposes (*note R Add-On +creating various kinds of data presentations. Additional modules ("add-on +packages") are available for a variety of specific purposes (*note R Add-On Packages::). R was initially written by Ross Ihaka <Ross.Ihaka@R-project.org> and @@ -215,7 +215,7 @@ addition, a large group of individuals has contributed to R by sending code and bug reports. - Since mid-1997 there has been a core group (the “R Core Team”) who can + Since mid-1997 there has been a core group (the "R Core Team") who can modify the R source code archive, currently consisting of John Chambers, Peter Dalgaard, @@ -243,7 +243,7 @@ R has a home page at <https://www.R-project.org/>. It is free software (https://www.gnu.org/philosophy/free-sw.html) distributed under a GNU-style copyleft (https://www.gnu.org/copyleft/copyleft.html), and an official part -of the GNU (https://www.gnu.org/) project (“GNU S”). +of the GNU (https://www.gnu.org/) project ("GNU S"). 2.2 What machines does R run on? ================================ @@ -265,11 +265,11 @@ 2.3 What is the current version of R? ===================================== -R uses a ‘major.minor.patchlevel’ numbering scheme. Based on this, there -are the current release version of R (‘r-release’) as well as two +R uses a 'major.minor.patchlevel' numbering scheme. Based on this, there +are the current release version of R ('r-release') as well as two development versions of R, a patched version of the current release -(‘r-patched’) and one working towards the next minor or eventually major -(‘r-devel’) releases of R, respectively. New features are typically +('r-patched') and one working towards the next minor or eventually major +('r-devel') releases of R, respectively. New features are typically introduced in r-devel, while r-patched is for bug fixes mostly. See <https://CRAN.R-project.org/sources.html> for the current versions of @@ -279,7 +279,7 @@ ========================== Sources, binaries and documentation for R can be obtained via CRAN, the -“Comprehensive R Archive Network” (see *note What is CRAN?::). +"Comprehensive R Archive Network" (see *note What is CRAN?::). Sources are also available via <https://svn.R-project.org/R/>, the R Subversion repository, but currently not via anonymous rsync (nor CVS). @@ -305,7 +305,7 @@ Otherwise, you can compile and install R yourself, which can be done very easily under a number of common Unix-like platforms (see *note What machines does R run on?::). The file ‘INSTALL’ that comes with the R distribution -contains a brief introduction, and the “R Installation and Administration” +contains a brief introduction, and the "R Installation and Administration" guide (*note What documentation exists for R?::) has full details. Note that you need a FORTRAN 90 compiler as well as a C compiler to build @@ -321,7 +321,7 @@ front-end called ‘R’ are created and copied to the ‘bin’ directory. You can copy the script to a place where users can invoke it, for example to ‘/usr/local/bin’. In addition, HTML versions of the R manuals (e.g., -‘R-exts.html’, the “Writing R Extensions” manual) are built in the +‘R-exts.html’, the "Writing R Extensions" manual) are built in the ‘doc/manual’ subdirectory. Use ‘make pdf’ to build PDF (Portable Document Format) versions of the R @@ -334,7 +334,7 @@ Finally, use ‘make check’ to find out whether your R system works correctly. - You can also perform a “system-wide” installation using ‘make install’. + You can also perform a "system-wide" installation using ‘make install’. By default, this will install to the following directories: ‘${prefix}/bin’ @@ -342,8 +342,8 @@ ‘${prefix}/man/man1’ the man page ‘${prefix}/lib/R’ - all the rest (libraries, on-line help system, ...). This is the “R - Home Directory” (‘R_HOME’) of the installed system. + all the rest (libraries, on-line help system, ...). This is the "R + Home Directory" (‘R_HOME’) of the installed system. In the above, ‘prefix’ is determined during configuration (typically ‘/usr/local’) and can be set by running ‘configure’ with the option @@ -370,19 +370,19 @@ The same directory has links to snapshots of the r-patched and r-devel versions of R. - See the “R for Windows FAQ” + See the "R for Windows FAQ" (https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) for more details. 2.5.3 How can R be installed (Mac) ---------------------------------- The ‘bin/macosx’ directory of a CRAN site contains a standard Apple -installer package to run on macOS 10.13 (‘High Sierra’) or later, and -another which runs only on ‘Apple Silicon’ Macs under macOS 11 (‘Big Sur’) +installer package to run on macOS 10.13 ('High Sierra') or later, and +another which runs only on 'Apple Silicon' Macs under macOS 11 ('Big Sur') or later. Once downloaded and executed, the installer will install the current release of R and R.app, the macOS GUI. This port of R for macOS is maintained by Simon Urbanek <Simon.Urbanek@R-project.org> (and previously by -Stefano Iacus). The “R for macOS FAQ” +Stefano Iacus). The "R for macOS FAQ" (https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html) has more details. Snapshots of the r-patched and r-devel versions of R are available as @@ -392,7 +392,7 @@ ======================================= Binary distributions of R are available on many Unix-like OSes: only some -can be mentioned here so check your OS’s search facilities to see if one is +can be mentioned here so check your OS's search facilities to see if one is available for yours. The ‘bin/linux’ directory of a CRAN site contains R packages for Debian @@ -403,7 +403,7 @@ maintenance tool. Use e.g. ‘apt-get install r-base r-recommended’ to install the R environment and recommended packages. If you also want to build R packages from source, also run ‘apt-get install r-base-dev’ to -obtain the additional tools required for this. So-called “backports” of the +obtain the additional tools required for this. So-called "backports" of the current R packages for at least the “stable” distribution of Debian are provided by Johannes Ranke, and available from CRAN. See <https://CRAN.R-project.org/bin/linux/debian/index.html> for details on R @@ -412,12 +412,12 @@ Michael Rutter, see <https://CRAN.R-project.org/bin/linux/ubuntu/index.html> for instructions. - R binaries for Fedora, maintained by Tom “Spot” Callaway, are provided as + R binaries for Fedora, maintained by Tom "Spot" Callaway, are provided as part of the Fedora distribution and can be accessed through ‘yum’, the RPM -installer/updater. Note that the “Software” application (gnome-software), +installer/updater. Note that the "Software" application (gnome-software), which is the default GUI for software installation in Fedora 20, cannot be used to install R. It is therefore recommended to use the yum command line -tool. The Fedora R RPM is a “meta-package” which installs all the user and +tool. The Fedora R RPM is a "meta-package" which installs all the user and developer components of R (available separately as ‘R-core’ and ‘R-devel’), as well as ‘R-java’, which ensures that R is configured for use with Java. The R RPM also installs the standalone R math library (‘libRmath’ and @@ -451,19 +451,19 @@ The R distribution also comes with the following manuals. - • “An Introduction to R” (‘R-intro’) includes information on data types, + • "An Introduction to R" (‘R-intro’) includes information on data types, programming elements, statistical modeling and graphics. This document - is based on the “Notes on S-PLUS” by Bill Venables and David Smith. - • “Writing R Extensions” (‘R-exts’) currently describes the process of - creating R add-on packages, writing R documentation, R’s system and + is based on the "Notes on S-PLUS" by Bill Venables and David Smith. + • "Writing R Extensions" (‘R-exts’) currently describes the process of + creating R add-on packages, writing R documentation, R's system and foreign language interfaces, and the R API. - • “R Data Import/Export” (‘R-data’) is a guide to importing and exporting + • "R Data Import/Export" (‘R-data’) is a guide to importing and exporting data to and from R. - • “The R Language Definition” (‘R-lang’), a first version of the - “Kernighan & Ritchie of R”, explains evaluation, parsing, object + • "The R Language Definition" (‘R-lang’), a first version of the + "Kernighan & Ritchie of R", explains evaluation, parsing, object oriented programming, computing on the language, and so forth. - • “R Installation and Administration” (‘R-admin’). - • “R Internals” (‘R-ints’) is a guide to R’s internal structures. (Added + • "R Installation and Administration" (‘R-admin’). + • "R Internals" (‘R-ints’) is a guide to R's internal structures. (Added in R 2.4.0.) An annotated bibliography (BibTeX format) of R-related publications can @@ -473,44 +473,44 @@ Books on R by R Core Team members include - John M. Chambers (2008), “Software for Data Analysis: Programming with - R”. Springer, New York, ISBN 978-0-387-75935-7, + John M. Chambers (2008), "Software for Data Analysis: Programming with + R". Springer, New York, ISBN 978-0-387-75935-7, <https://johnmchambers.su.domains/Rbook/>. - Peter Dalgaard (2008), “Introductory Statistics with R”, 2nd edition. + Peter Dalgaard (2008), "Introductory Statistics with R", 2nd edition. Springer, ISBN 978-0-387-79053-4, <http://publicifsv.sund.ku.dk/~pd/ISwR.html>. - Robert Gentleman (2008), “R Programming for Bioinformatics”. Chapman & + Robert Gentleman (2008), "R Programming for Bioinformatics". Chapman & Hall/CRC, Boca Raton, FL, ISBN 978-1-420-06367-7, <https://bioconductor.org/help/publications/books/r-programming-for-bioinformatics/>. - Stefano M. Iacus (2008), “Simulation and Inference for Stochastic - Differential Equations: With R Examples”. Springer, New York, ISBN + Stefano M. Iacus (2008), "Simulation and Inference for Stochastic + Differential Equations: With R Examples". Springer, New York, ISBN 978-0-387-75838-1. - Deepayan Sarkar (2007), “Lattice: Multivariate Data Visualization with - R”. Springer, New York, ISBN 978-0-387-75968-5. + Deepayan Sarkar (2007), "Lattice: Multivariate Data Visualization with + R". Springer, New York, ISBN 978-0-387-75968-5. - W. John Braun and Duncan J. Murdoch (2007), “A First Course in - Statistical Programming with R”. Cambridge University Press, - Cambridge, ISBN 978-0521872652. + W. John Braun and Duncan J. Murdoch (2007), "A First Course in + Statistical Programming with R". Cambridge University Press, Cambridge, + ISBN 978-0521872652. - P. Murrell (2005), “R Graphics”, Chapman & Hall/CRC, ISBN + P. Murrell (2005), "R Graphics", Chapman & Hall/CRC, ISBN 1-584-88486-X, <https://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html>. - William N. Venables and Brian D. Ripley (2002), “Modern Applied - Statistics with S” (4th edition). Springer, ISBN 0-387-95457-0, + William N. Venables and Brian D. Ripley (2002), "Modern Applied + Statistics with S" (4th edition). Springer, ISBN 0-387-95457-0, <https://www.stats.ox.ac.uk/pub/MASS4/>. - Jose C. Pinheiro and Douglas M. Bates (2000), “Mixed-Effects Models in - S and S-Plus”. Springer, ISBN 0-387-98957-0. + Jose C. Pinheiro and Douglas M. Bates (2000), "Mixed-Effects Models in + S and S-Plus". Springer, ISBN 0-387-98957-0. - Last, but not least, Ross’ and Robert’s experience in designing and -implementing R is described in Ihaka & Gentleman (1996), “R: A Language for -Data Analysis and Graphics”, _Journal of Computational and Graphical -Statistics_, *5*, 299–314 (doi: 10.1080/10618600.1996.10474713 + Last, but not least, Ross' and Robert's experience in designing and +implementing R is described in Ihaka & Gentleman (1996), "R: A Language for +Data Analysis and Graphics", _Journal of Computational and Graphical +Statistics_, *5*, 299-314 (doi: 10.1080/10618600.1996.10474713 (https://doi.org/10.1080/10618600.1996.10474713)). 2.8 Citing R @@ -546,10 +546,10 @@ A moderated list for announcements on the availability of new or enhanced contributed packages. ‘R-help’ - The ‘main’ R mailing list, for discussion about problems and solutions + The 'main' R mailing list, for discussion about problems and solutions encountered using R, including using R packages in the standard R - distribution and on CRAN; announcements (not covered by ‘R-announce’ or - ‘R-packages’); the availability of new functionality for R and + distribution and on CRAN; announcements (not covered by 'R-announce' or + 'R-packages'); the availability of new functionality for R and documentation of R; and for posting nice examples and benchmarks. ‘R-devel’ This list is for questions and discussion about code development in R. @@ -595,7 +595,7 @@ 2.10 What is CRAN? ================== -The “Comprehensive R Archive Network” (CRAN) is a collection of sites which +The "Comprehensive R Archive Network" (CRAN) is a collection of sites which carry identical material, consisting of the R distribution(s), the contributed extensions, documentation for R, and binaries. @@ -615,7 +615,7 @@ Windows). CRAN also provides access to documentation on R, existing mailing lists and the R Bug Tracking system. - Since March 2016, “old” material is made available from a central CRAN + Since March 2016, "old" material is made available from a central CRAN archive server (<https://CRAN-archive.R-project.org/>). Please always use the URL of the master site when referring to CRAN. @@ -632,7 +632,7 @@ purposes (e.g., in business or in consulting). The GPL, like all Open Source licenses, permits all and any use of the package. It only restricts distribution of R or of other programs containing code from R. This is made -clear in clause 6 (“No Discrimination Against Fields of Endeavor”) of the +clear in clause 6 ("No Discrimination Against Fields of Endeavor") of the Open Source Definition (https://opensource.org/osd): The license must not restrict anyone from making use of the program in @@ -649,7 +649,7 @@ Most add-on packages, including all recommended ones, also explicitly allow commercial use in this way. A few packages are restricted to -“non-commercial use”; you should contact the author to clarify whether these +"non-commercial use"; you should contact the author to clarify whether these may be used or seek the advice of your legal counsel. None of the discussion in this section constitutes legal advice. The R @@ -660,7 +660,7 @@ The name is partly based on the (first) names of the first two R authors (Robert Gentleman and Ross Ihaka), and partly a play on the name of the Bell -Labs language ‘S’ (*note What is S?::). +Labs language 'S' (*note What is S?::). 2.13 What is the R Foundation? ============================== @@ -683,8 +683,8 @@ to the best in SVN, daily built and checked packages, mailing lists, bug tracking, message boards/forums, site hosting, permanent file archival, full backups, and total web-based administration. For more information, see the -R-Forge web page and Stefan Theußl and Achim Zeileis (2009), “Collaborative -software development using R-Forge”, _The R Journal_, *1*(1):9–14. +R-Forge web page and Stefan Theußl and Achim Zeileis (2009), "Collaborative +software development using R-Forge", _The R Journal_, *1*(1):9-14. 3 R and S ********* @@ -707,53 +707,53 @@ The evolution of the S language is characterized by four books by John Chambers and coauthors, which are also the primary references for S. - • Richard A. Becker and John M. Chambers (1984), “S. An Interactive - Environment for Data Analysis and Graphics,” Monterey: Wadsworth and + • Richard A. Becker and John M. Chambers (1984), "S. An Interactive + Environment for Data Analysis and Graphics," Monterey: Wadsworth and Brooks/Cole. - This is also referred to as the “_Brown Book_”, and of historical + This is also referred to as the "_Brown Book_", and of historical interest only. - • Richard A. Becker, John M. Chambers and Allan R. Wilks (1988), “The New - S Language,” London: Chapman & Hall. + • Richard A. Becker, John M. Chambers and Allan R. Wilks (1988), "The New + S Language," London: Chapman & Hall. - This book is often called the “_Blue Book_”, and introduced what is now + This book is often called the "_Blue Book_", and introduced what is now known as S version 2. - • John M. Chambers and Trevor J. Hastie (1992), “Statistical Models in - S,” London: Chapman & Hall. + • John M. Chambers and Trevor J. Hastie (1992), "Statistical Models in + S," London: Chapman & Hall. - This is also called the “_White Book_”, and introduced S version 3, + This is also called the "_White Book_", and introduced S version 3, which added structures to facilitate statistical modeling in S. - • John M. Chambers (1998), “Programming with Data,” New York: Springer, + • John M. Chambers (1998), "Programming with Data," New York: Springer, ISBN 0-387-98503-4 (<https://johnmchambers.su.domains/Sbook/>). - This “_Green Book_” describes version 4 of S, a major revision of S + This "_Green Book_" describes version 4 of S, a major revision of S designed by John Chambers to improve its usefulness at every stage of the programming process. See <https://johnmchambers.su.domains/papers/96.7.ps> for further -information on the “Evolution of the S Language”. +information on the "Evolution of the S Language". 3.2 What is S-PLUS? =================== S-PLUS is a value-added version of S sold by TIBCO Software Inc -(https://www.tibco.com/) as ‘TIBCO Spotfire S+’. See +(https://www.tibco.com/) as 'TIBCO Spotfire S+'. See <https://en.wikipedia.org/wiki/S-PLUS> for more information. 3.3 What are the differences between R and S? ============================================= We can regard S as a language with three current implementations or -“engines”, the “old S engine” (S version 3; S-PLUS 3.x and 4.x), the “new S -engine” (S version 4; S-PLUS 5.x and above), and R. Given this -understanding, asking for “the differences between R and S” really amounts +"engines", the "old S engine" (S version 3; S-PLUS 3.x and 4.x), the "new S +engine" (S version 4; S-PLUS 5.x and above), and R. Given this +understanding, asking for "the differences between R and S" really amounts to asking for the specifics of the R implementation of the S language, i.e., the difference between the R and S _engines_. - For the remainder of this section, “S” refers to the S engines and not + For the remainder of this section, "S" refers to the S engines and not the S language. 3.3.1 Lexical scoping @@ -778,7 +778,7 @@ n * sq() } - Under S, ‘sq()’ does not “know” about the variable ‘n’ unless it is + Under S, ‘sq()’ does not "know" about the variable ‘n’ unless it is defined globally: S> cube(2) @@ -788,13 +788,13 @@ S> cube(2) [1] 18 - In R, the “environment” created when ‘cube()’ was invoked is also looked + In R, the "environment" created when ‘cube()’ was invoked is also looked in: R> cube(2) [1] 8 - As a more “interesting” real-world problem, suppose you want to write a + As a more "interesting" real-world problem, suppose you want to write a function which returns the density function of the r-th order statistic from a sample of size n from a (continuous) distribution. For simplicity, we shall use both the distribution and density functions distribution as @@ -816,7 +816,7 @@ f } -Rather tricky, isn’t it? The code uses the fact that in S, functions are +Rather tricky, isn't it? The code uses the fact that in S, functions are just lists of special mode with the function body as the last argument, and hence does not work in R (one could make the idea work, though). @@ -841,7 +841,7 @@ } } -This seems to be the “natural” implementation, and it works because the free +This seems to be the "natural" implementation, and it works because the free variables in the returned function can be looked up in the defining environment (this is lexical scope). @@ -849,7 +849,7 @@ along with all variable bindings needed for evaluating it. Since in the above version, the free variables in the value function are not modified, you can actually use it in S as well if you abstract out the closure -operation into a function ‘MC()’ (for “make closure”): +operation into a function ‘MC()’ (for "make closure"): dorder <- function(n, r, pfun, dfun) { con <- round(exp(lgamma(n + 1) - lgamma(r) - lgamma(n - r + 1))) @@ -860,7 +860,7 @@ } Given the appropriate definitions of the closure operator, this works in -both R and S, and is much “cleaner” than a substitute/eval solution (or one +both R and S, and is much "cleaner" than a substitute/eval solution (or one which overrules the default scoping rules by using explicit access to evaluation frames, as is of course possible in both R and S). @@ -899,11 +899,11 @@ Nested lexically scoped functions allow using function closures and maintaining local state. A simple example (taken from Abelson and Sussman) is obtained by typing ‘demo("scoping")’ at the R prompt. Further -information is provided in the standard R reference “R: A Language for Data -Analysis and Graphics” (*note What documentation exists for R?::) and in -Robert Gentleman and Ross Ihaka (2000), “Lexical Scope and Statistical -Computing”, _Journal of Computational and Graphical Statistics_, *9*, -491–508 (doi: 10.1080/10618600.2000.10474895 +information is provided in the standard R reference "R: A Language for Data +Analysis and Graphics" (*note What documentation exists for R?::) and in +Robert Gentleman and Ross Ihaka (2000), "Lexical Scope and Statistical +Computing", _Journal of Computational and Graphical Statistics_, *9*, +491-508 (doi: 10.1080/10618600.2000.10474895 (https://doi.org/10.1080/10618600.2000.10474895)). Nested lexically scoped functions also imply a further major difference. @@ -913,12 +913,12 @@ uses it to store the objects. R performs its own memory management of this piece of memory, growing and shrinking its size as needed. Having everything in memory is necessary because it is not really possible to -externally maintain all relevant “environments” of symbol/value pairs. This +externally maintain all relevant "environments" of symbol/value pairs. This difference also seems to make R _faster_ than S. The down side is that if R crashes you will lose all the work for the -current session. Saving and restoring the memory “images” (the functions -and data stored in R’s internal memory at any time) can be a bit slow, +current session. Saving and restoring the memory "images" (the functions +and data stored in R's internal memory at any time) can be a bit slow, especially if they are big. In S this does not happen, because everything is saved in disk files and if you crash nothing is likely to happen to them. (In fact, one might conjecture that the S developers felt that the price of @@ -958,8 +958,8 @@ Apart from lexical scoping and its implications, R follows the S language definition in the Blue and White Books as much as possible, and hence really -is an “implementation” of S. There are some intentional differences where -the behavior of S is considered “not clean”. In general, the rationale is +is an "implementation" of S. There are some intentional differences where +the behavior of S is considered "not clean". In general, the rationale is that R should help you detect programming errors, while at the same time being as compatible as possible with S. @@ -1034,7 +1034,7 @@ the ‘dim’ attribute vector can be 0). This has been determined a useful feature as it helps reducing the need for special-case tests for empty subsets. For example, if ‘x’ is a matrix, ‘x[, FALSE]’ is not - ‘NULL’ but a “matrix” with 0 columns. Hence, such objects need to be + ‘NULL’ but a "matrix" with 0 columns. Hence, such objects need to be tested for by checking whether their ‘length()’ is zero (which works in both R and S), and not using ‘is.null()’. @@ -1056,7 +1056,7 @@ • In S, ‘substitute()’ searches for names for substitution in the given expression in three places: the actual and the default arguments of the matching call, and the local frame (in that order). R looks in the - local frame only, with the special rule to use a “promise” if a + local frame only, with the special rule to use a "promise" if a variable is not evaluated. Since the local frame is initialized with the actual arguments or the default expressions, this is usually equivalent to S, until assignment takes place. @@ -1077,7 +1077,7 @@ ‘Sys.setlocale()’ function. • In S, ‘missing(ARG)’ remains ‘TRUE’ if ARG is subsequently modified; in - R it doesn’t. + R it doesn't. • From R version 1.3.0, ‘data.frame’ strips ‘I()’ when creating (column) names. @@ -1100,9 +1100,9 @@ ‘$’ allow partial matches). In S, ‘[’ allows partial matches. • S has a two-argument version of ‘atan’ and no ‘atan2’. A call in S - such as ‘atan(x1, x2)’ is equivalent to R’s ‘atan2(x1, x2)’. However, - beware of named arguments since S’s ‘atan(x = a, y = b)’ is equivalent - to R’s ‘atan2(y = a, x = b)’ with the meanings of ‘x’ and ‘y’ + such as ‘atan(x1, x2)’ is equivalent to R's ‘atan2(x1, x2)’. However, + beware of named arguments since S's ‘atan(x = a, y = b)’ is equivalent + to R's ‘atan2(y = a, x = b)’ with the meanings of ‘x’ and ‘y’ interchanged. (R used to have undocumented support for a two-argument ‘atan’ with positional arguments, but this has been withdrawn to avoid further confusion.) @@ -1121,7 +1121,7 @@ Since almost anything you can do in R has source code that you could port to S-PLUS with little effort there will never be much you can do in R that you -couldn’t do in S-PLUS if you wanted to. (Note that using lexical scoping +couldn't do in S-PLUS if you wanted to. (Note that using lexical scoping may simplify matters considerably, though.) R offers several graphics features that S-PLUS does not, such as finer @@ -1129,9 +1129,9 @@ correction for color, and, most importantly, mathematical annotation in plot texts, via input expressions reminiscent of TeX constructs. See the help page for ‘plotmath’, which features an impressive on-line example. More -details can be found in Paul Murrell and Ross Ihaka (2000), “An Approach to -Providing Mathematical Annotation in Plots”, _Journal of Computational and -Graphical Statistics_, *9*, 582–599 (doi: 10.1080/10618600.2000.10474900 +details can be found in Paul Murrell and Ross Ihaka (2000), "An Approach to +Providing Mathematical Annotation in Plots", _Journal of Computational and +Graphical Statistics_, *9*, 582-599 (doi: 10.1080/10618600.2000.10474900 (https://doi.org/10.1080/10618600.2000.10474900)). 3.5 What is R-plus? @@ -1151,17 +1151,17 @@ 4 R Web Interfaces ****************** -Please refer to the CRAN task view on “Web Technologies and Services” +Please refer to the CRAN task view on "Web Technologies and Services" (<https://CRAN.R-project.org/view=WebTechnologies>), specifically section -“Web and Server Frameworks”, for up-to-date information on R web interface +"Web and Server Frameworks", for up-to-date information on R web interface packages. - Early references on R web interfaces include Jeff Banfield (1999), “Rweb: -Web-based Statistical Analysis” (doi: 10.18637/jss.v004.i01 -(https://doi.org/10.18637/jss.v004.i01)), David Firth (2003), “CGIwithR: -Facilities for processing web forms using R” (doi: 10.18637/jss.v008.i10 + Early references on R web interfaces include Jeff Banfield (1999), "Rweb: +Web-based Statistical Analysis" (doi: 10.18637/jss.v004.i01 +(https://doi.org/10.18637/jss.v004.i01)), David Firth (2003), "CGIwithR: +Facilities for processing web forms using R" (doi: 10.18637/jss.v008.i10 (https://doi.org/10.18637/jss.v008.i10)), and Angelo Mineo and Alfredo -Pontillo (2006), “Using R via PHP for Teaching Purposes: R-php” +Pontillo (2006), "Using R via PHP for Teaching Purposes: R-php" (doi: 10.18637/jss.v017.i04 (https://doi.org/10.18637/jss.v017.i04)). 5 R Add-On Packages @@ -1216,15 +1216,15 @@ *KernSmooth* Functions for kernel smoothing (and density estimation) corresponding - to the book “Kernel Smoothing” by M. P. Wand and M. C. Jones, 1995. + to the book "Kernel Smoothing" by M. P. Wand and M. C. Jones, 1995. *MASS* Functions and datasets from the main package of Venables and Ripley, - “Modern Applied Statistics with S”. + "Modern Applied Statistics with S". *Matrix* Support for spares and dense matrices *boot* - Functions and datasets for bootstrapping from the book “Bootstrap - Methods and Their Applications” by A. C. Davison and D. V. Hinkley, + Functions and datasets for bootstrapping from the book "Bootstrap + Methods and Their Applications" by A. C. Davison and D. V. Hinkley, 1997, Cambridge University Press. *class* Functions for classification (k-nearest neighbor and LVQ). @@ -1243,13 +1243,13 @@ *nlme* Fit and compare Gaussian linear and nonlinear mixed-effects models. *nnet* - Software for single hidden layer perceptrons (“feed-forward neural - networks”), and for multinomial log-linear models. + Software for single hidden layer perceptrons ("feed-forward neural + networks"), and for multinomial log-linear models. *rpart* Recursive PARTitioning and regression trees. *spatial* - Functions for kriging and point pattern analysis from “Modern Applied - Statistics with S” by W. Venables and B. Ripley. + Functions for kriging and point pattern analysis from "Modern Applied + Statistics with S" by W. Venables and B. Ripley. *survival* Functions for survival analysis, including penalized likelihood. See the CRAN contributed packages page for more information. @@ -1358,7 +1358,7 @@ tools Tools for Package Development utils The R Utils Package - You can “load” the installed package PKG by + You can "load" the installed package PKG by library(PKG) @@ -1398,7 +1398,7 @@ contain files ‘INDEX’, ‘NAMESPACE’, ‘configure’, ‘cleanup’, ‘LICENSE’, ‘LICENCE’, ‘COPYING’ and ‘NEWS’. - See section “Creating R packages” in ‘Writing R Extensions’, for details. + See section "Creating R packages" in ‘Writing R Extensions’, for details. This manual is included in the R distribution, *note What documentation exists for R?::, and gives information on package structure, the configure and cleanup mechanisms, and on automated package checking and building. @@ -1428,7 +1428,7 @@ 6.1 Is there Emacs support for R? ================================= -There is an Emacs package called ESS (“Emacs Speaks Statistics”) which +There is an Emacs package called ESS ("Emacs Speaks Statistics") which provides a standard interface between statistical programs and statistical processes. It is intended to provide assistance for interactive statistical programming and data analysis. Languages supported include: S dialects (R, @@ -1473,7 +1473,7 @@ Yes, instead of just running it in a console, _definitely_. As an alternative to other IDEs such as RStudio, _possibly_, notably if you are -interested to use Emacs for other computer interaction. You’d be using ESS, +interested to use Emacs for other computer interaction. You'd be using ESS, Emacs Speaks Statistics, see previous FAQ. Inferior R mode provides a readline/history mechanism, object name @@ -1496,7 +1496,7 @@ 6.3 Debugging R from within Emacs ================================= -To debug R “from within Emacs”, there are several possibilities. To use the +To debug R "from within Emacs", there are several possibilities. To use the Emacs GUD (Grand Unified Debugger) library with the recommended debugger GDB, type ‘M-x gdb’ and give the path to the R _binary_ as argument. At the ‘gdb’ prompt, set ‘R_HOME’ and other environment variables as needed (using @@ -1549,7 +1549,7 @@ 7.2 How can I save my workspace? ================================ -‘save.image()’ saves the objects in the user’s ‘.GlobalEnv’ to the file +‘save.image()’ saves the objects in the user's ‘.GlobalEnv’ to the file ‘.RData’ in the R startup directory. (This is also what happens after ‘q("yes")’.) Using ‘save.image(FILE)’ one can save the image under a different name. @@ -1576,14 +1576,14 @@ This is because in both cases, the first argument is evaluated in the calling environment first. The result (which should be an object of mode ‘"expression"’ or ‘"call"’) is then evaluated or differentiated. What you -(most likely) really want is obtained by “quoting” the first argument upon +(most likely) really want is obtained by "quoting" the first argument upon surrounding it with ‘expression()’. For example, R> D(expression(x^2), "x") 2 * x Although this behavior may initially seem to be rather strange, it is -perfectly logical. The “intuitive” behavior could easily be implemented, +perfectly logical. The "intuitive" behavior could easily be implemented, but problems would arise whenever the expression is contained in a variable, passed as a parameter, or is the result of a function call. Consider for instance the semantics in cases like @@ -1633,7 +1633,7 @@ PKG)’, where NAME and PKG are strings giving the names of an object and the package containing it, stores some information in this environment. When R tries to evaluate NAME, it loads the corresponding package PKG and -reevaluates NAME in the new package’s environment. +reevaluates NAME in the new package's environment. Using this mechanism makes R behave as if the package was loaded, but does not occupy memory (yet). @@ -1644,10 +1644,10 @@ ============================= The function ‘options()’ allows setting and examining a variety of global -“options” which affect the way in which R computes and displays its results. +"options" which affect the way in which R computes and displays its results. The variable ‘.Options’ holds the current values of these options, but should never directly be assigned to unless you want to drive yourself -crazy—simply pretend that it is a “read-only” variable. +crazy--simply pretend that it is a "read-only" variable. For example, given @@ -1688,7 +1688,7 @@ This is about a problem rarely seen with modern X11 installations. On an X11 device, plotting sometimes, e.g., when running ‘demo("image")’, -results in “Error: color allocation error”. This is an X problem, and only +results in "Error: color allocation error". This is an X problem, and only indirectly related to R. It occurs when applications started prior to R have used all the available colors. (How many colors are available depends on the X configuration; sometimes only 256 colors can be used.) @@ -1724,18 +1724,18 @@ You could also look at ‘coplot()’ and ‘dotchart()’ which might do at least some of what you want. Note also that the R version of ‘pairs()’ is fairly general and provides most of the functionality of ‘splom()’, and that -R’s default plot method has an argument ‘asp’ allowing to specify (and fix +R's default plot method has an argument ‘asp’ allowing to specify (and fix against device resizing) the aspect ratio of the plot. - (Because the word “Trellis” has been claimed as a trademark we do not use -it in R. The name “lattice” has been chosen for the R equivalent.) + (Because the word "Trellis" has been claimed as a trademark we do not use +it in R. The name "lattice" has been chosen for the R equivalent.) 7.12 What are the enclosing and parent environments? ==================================================== Inside a function you may want to access variables in two additional -environments: the one that the function was defined in (“enclosing”), and -the one it was invoked in (“parent”). +environments: the one that the function was defined in ("enclosing"), and +the one it was invoked in ("parent"). If you create a function at the command line or load it in a package its enclosing environment is the global workspace. If you define a function @@ -1744,7 +1744,7 @@ when the function is created. You can find out the enclosing environment for a function ‘f()’ using ‘environment(f)’. - The “parent” environment, on the other hand, is defined when you invoke a + The "parent" environment, on the other hand, is defined when you invoke a function. If you invoke ‘lm()’ at the command line its parent environment is the global workspace, if you invoke it inside a function ‘f()’ then its parent environment is the environment inside ‘f()’. You can find out the @@ -1760,7 +1760,7 @@ Parent environments are important because things like model formulas need to be evaluated in the environment the function was called from, since -that’s where all the variables will be available. This relies on the parent +that's where all the variables will be available. This relies on the parent environment being potentially different with each invocation. Enclosing environments are important because a function can use variables @@ -1806,8 +1806,8 @@ argument ‘check.names’ to these functions controls whether variable names are checked and adjusted by ‘make.names()’ if needed.) - To understand what names are “valid”, one needs to take into account that -the term “name” is used in several different (but related) ways in the + To understand what names are "valid", one needs to take into account that +the term "name" is used in several different (but related) ways in the language: 1. A _syntactic name_ is a string the parser interprets as this type of @@ -1835,7 +1835,7 @@ 5. Finally, a _file name_ is a string identifying a file in the operating system for reading, writing, etc. It really has nothing much to do with names in the language, but it is traditional to call these strings - file “names”. + file "names". 7.15 Are GAMs implemented in R? =============================== @@ -1870,7 +1870,7 @@ If you type ‘1+1’ or ‘summary(glm(y~x+z, family=binomial))’ at the command line the returned value is automatically printed (unless it is ‘invisible()’), but in other circumstances, such as in a ‘source()’d file or -inside a function it isn’t printed unless you specifically print it. +inside a function it isn't printed unless you specifically print it. To print the value use @@ -1927,7 +1927,7 @@ Some packages report instead the sums of squares based on comparing the full model to the models with each factor removed one at a time (the famous -‘Type III sums of squares’ from SAS, for example). These do not depend on +'Type III sums of squares' from SAS, for example). These do not depend on the order of factors in the model. The question of which set of sums of squares is the Right Thing provokes low-level holy wars on R-help from time to time. @@ -1960,7 +1960,7 @@ The Unix-like command-line interface to R can only provide the inbuilt command line editor which allows recall, editing and re-submission of prior commands provided that the GNU readline library is available at the time R -is configured for compilation. Note that the ‘development’ version of +is configured for compilation. Note that the 'development' version of readline including the appropriate headers is needed: users of Linux binary distributions will need to install packages such as ‘libreadline-dev’ (Debian) or ‘readline-devel’ (Red Hat). @@ -2065,8 +2065,8 @@ getS3method("[", "terms") To see the code for an unexported function ‘foo()’ in the namespace of -package ‘"bar"’ use ‘bar:::foo’. Don’t use these constructions to call -unexported functions in your own code—they are probably unexported for a +package ‘"bar"’ use ‘bar:::foo’. Don't use these constructions to call +unexported functions in your own code--they are probably unexported for a reason and may change without warning. 7.27 How can I create rotated axis labels? @@ -2096,8 +2096,8 @@ x axis. See ‘?par’ for more information. Also see Figure 1 and associated code in Paul Murrell (2003), -“Integrating grid Graphics Output with Base Graphics Output”, _R News_, -*3/2*, 7–12. +"Integrating grid Graphics Output with Base Graphics Output", _R News_, +*3/2*, 7-12. 7.28 Why is read.table() so inefficient? ======================================== @@ -2114,12 +2114,12 @@ A “package” is a standardized collection of material extending R, e.g. providing code, data, or documentation. A “library” is a place (directory) where R knows to find packages it can use (i.e., which were “installed”). R -is told to use a package (to “load” it and add it to the search path) via +is told to use a package (to "load" it and add it to the search path) via calls to the function ‘library’. I.e., ‘library()’ is employed to load a package from libraries containing packages. *Note R Add-On Packages::, for more details. See also Uwe Ligges (2003), -“R Help Desk: Package Management”, _R News_, *3/3*, 37–39. +"R Help Desk: Package Management", _R News_, *3/3*, 37-39. 7.30 I installed a package but the functions are not there ========================================================== @@ -2129,10 +2129,10 @@ See *note R Add-On Packages:: and *note What is the difference between package and library?:: for more information. -7.31 Why doesn’t R think these numbers are equal? +7.31 Why doesn't R think these numbers are equal? ================================================= -The only numbers that can be represented exactly in R’s numeric type are +The only numbers that can be represented exactly in R's numeric type are integers and fractions whose denominator is a power of 2. All other numbers are internally rounded to (typically) 53 binary digits accuracy. As a result, two floating point numbers will not reliably be equal unless they @@ -2152,15 +2152,15 @@ you will need to consider error propagation carefully. A discussion with many easily followed examples is in Appendix G -“Computational Precision and Floating Point Arithmetic”, pages 753–771 of +"Computational Precision and Floating Point Arithmetic", pages 753-771 of _Statistical Analysis and Data Display: An Intermediate Course with Examples in R_, Richard M. Heiberger and Burt Holland (Springer 2015, second edition). This appendix is a free download from <https://link.springer.com/content/pdf/bbm:978-1-4939-2122-5/1.pdf>. - For more information, see e.g. David Goldberg (1991), “What Every -Computer Scientist Should Know About Floating-Point Arithmetic”, _ACM -Computing Surveys_, *23/1*, 5–48, also available via + For more information, see e.g. David Goldberg (1991), "What Every +Computer Scientist Should Know About Floating-Point Arithmetic", _ACM +Computing Surveys_, *23/1*, 5-48, also available via <https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html>. Here is another example, this time using addition: @@ -2365,8 +2365,8 @@ In most cases, typing the name of the function will print its source code. However, code is sometimes hidden in a namespace, or compiled. For a -complete overview on how to access source code, see Uwe Ligges (2006), “Help -Desk: Accessing the sources”, _R News_, *6/4*, 43–45 +complete overview on how to access source code, see Uwe Ligges (2006), "Help +Desk: Accessing the sources", _R News_, *6/4*, 43-45 (<https://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf>). 7.41 Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept? @@ -2385,17 +2385,17 @@ a line through the origin. All these come down to saying that if you know _a priori_ that E[Y]=0 -when x=0 then the ‘null’ model that you should compare to the fitted line, -the model where x doesn’t explain any of the variance, is the model where -E[Y]=0 everywhere. (If you don’t know a priori that E[Y]=0 when x=0, then -you probably shouldn’t be fitting a line through the origin.) +when x=0 then the 'null' model that you should compare to the fitted line, +the model where x doesn't explain any of the variance, is the model where +E[Y]=0 everywhere. (If you don't know a priori that E[Y]=0 when x=0, then +you probably shouldn't be fitting a line through the origin.) 7.42 Why is R apparently not releasing memory? ============================================== -This question is often asked in different flavors along the lines of “I have +This question is often asked in different flavors along the lines of "I have removed objects in R and run ‘gc()’ and yet ‘ps’/‘top’ still shows the R -process using a lot of memory”, often on Linux machines. +process using a lot of memory", often on Linux machines. This is an artifact of the way the operating system (OS) allocates memory. In general it is common that the OS is not capable of releasing all @@ -2421,7 +2421,7 @@ regions. For smaller allocations the system can expand the data segment of the process (historically using the ‘brk’ system call), but this whole area is always contiguous. The OS can only move the end of this space, it cannot -create any “holes”. Since this operation is fairly cheap, it is used for +create any "holes". Since this operation is fairly cheap, it is used for allocations of small pieces of memory. However, the side-effect is that even if there is just one byte that is in use at the end of the data segment, the OS cannot release any memory at all, because it cannot change @@ -2458,7 +2458,7 @@ Since March 2016, Windows and macOS binaries of CRAN packages for old versions of R (released more than 5 years ago) are made available from a central CRAN archive server instead of the CRAN mirrors. To get these, one -should set the CRAN “mirror” element of the ‘repos’ option accordingly, by +should set the CRAN "mirror" element of the ‘repos’ option accordingly, by something like local({r <- getOption("repos") r["CRAN"] <- "http://CRAN-archive.R-project.org" @@ -2479,7 +2479,7 @@ This approach is preferred over having ‘summary.foo()’ print summary information and return something useful, as sometimes you need to grab something computed by ‘summary()’ inside a function or similar. In such -cases you don’t want anything printed. +cases you don't want anything printed. 8.2 How can I debug dynamically loaded code? ============================================ @@ -2487,7 +2487,7 @@ Roughly speaking, you need to start R inside the debugger, load the code, send an interrupt, and then set the required breakpoints. - See section “Finding entry points in dynamically loaded code” in ‘Writing + See section "Finding entry points in dynamically loaded code" in ‘Writing R Extensions’. This manual is included in the R distribution, *note What documentation exists for R?::. @@ -2496,7 +2496,7 @@ The most convenient way is to call ‘R_PV’ from the symbolic debugger. - See section “Inspecting R objects when debugging” in ‘Writing R + See section "Inspecting R objects when debugging" in ‘Writing R Extensions’. 8.4 How can I change compilation flags? @@ -2508,7 +2508,7 @@ Starting with R 2.1.0, users can provide personal ‘Makevars’ configuration files in ‘$HOME/.R’ to override the default flags. See -section “Add-on packages” in ‘R Installation and Administration’. +section "Add-on packages" in ‘R Installation and Administration’. 8.5 How can I debug S4 methods? =============================== @@ -2525,31 +2525,31 @@ If R executes an illegal instruction, or dies with an operating system error message that indicates a problem in the program (as opposed to something -like “disk full”), then it is certainly a bug. If you call ‘.C()’, +like "disk full"), then it is certainly a bug. If you call ‘.C()’, ‘.Fortran()’, ‘.External()’ or ‘.Call()’ (or ‘.Internal()’) yourself (or in a function you wrote), you can always crash R by using wrong argument types (modes). This is not a bug. Taking forever to complete a command can be a bug, but you must make -certain that it was really R’s fault. Some commands simply take a long +certain that it was really R's fault. Some commands simply take a long time. If the input was such that you _know_ it should have been processed -quickly, report a bug. If you don’t know whether the command should take a +quickly, report a bug. If you don't know whether the command should take a long time, find out by looking in the manual or by asking for assistance. If a command you are familiar with causes an R error message in a case where its usual definition ought to be reasonable, it is probably a bug. If a command does the wrong thing, that is a bug. But be sure you know for -certain what it ought to have done. If you aren’t familiar with the -command, or don’t know for certain how the command is supposed to work, then +certain what it ought to have done. If you aren't familiar with the +command, or don't know for certain how the command is supposed to work, then it might actually be working right. For example, people sometimes think -there is a bug in R’s mathematics because they don’t understand how +there is a bug in R's mathematics because they don't understand how finite-precision arithmetic works. Rather than jumping to conclusions, show the problem to someone who knows for certain. Unexpected results of comparison of decimal numbers, for example ‘0.28 * 100 != 28’ or ‘0.1 + 0.2 != 0.3’, are not a bug. *Note Why doesn't R think these numbers are equal?::, for more details. - Finally, a command’s intended definition may not be best for statistical + Finally, a command's intended definition may not be best for statistical analysis. This is a very important sort of problem, but it is also a matter of judgment. Also, it is easy to come to such a conclusion out of ignorance of some of the existing features. It is probably best not to complain about @@ -2557,15 +2557,15 @@ feel confident that you understand it, and know for certain that what you want is not available. If you are not sure what the command is supposed to do after a careful reading of the manual this indicates a bug in the manual. -The manual’s job is to make everything clear. It is just as important to +The manual's job is to make everything clear. It is just as important to report documentation bugs as program bugs. However, we know that the -introductory documentation is seriously inadequate, so you don’t need to +introductory documentation is seriously inadequate, so you don't need to report this. If the online argument list of a function disagrees with the manual, one of them must be wrong, so report the bug. - See also “Making sure it’s a bug” in Bug Reporting in R + See also "Making sure it's a bug" in Bug Reporting in R (https://www.r-project.org/bugs.html) for more information. 9.2 How to report a bug @@ -2599,7 +2599,7 @@ guess that they should try a day of the week variable name. Or perhaps the command fails because the last command you used was a -method for ‘"["()’ that had a bug causing R’s internal data structures to be +method for ‘"["()’ that had a bug causing R's internal data structures to be corrupted and making the ‘data.frame()’ command fail from then on. This is why others need to know what other commands you have typed (or read from your startup file). @@ -2617,8 +2617,8 @@ ensures that the site profile and saved data files are not read. Before you actually submit a bug report, you should check whether the bug -has already been reported and/or fixed. First, try the “Show open bugs -new-to-old” or the search facility on <https://bugs.R-project.org/>. +has already been reported and/or fixed. First, try the "Show open bugs +new-to-old" or the search facility on <https://bugs.R-project.org/>. Second, consult <https://svn.R-project.org/R/trunk/doc/NEWS.Rd>, which records changes that will appear in the _next_ release of R, including bug fixes that do not appear on the Bug Tracker. Third, if possible try the @@ -2632,10 +2632,10 @@ A bug report can be generated using the function ‘bug.report()’. For reports on R this will open the R Bugzilla page at <https://bugs.R-project.org/>: for a contributed package it will open the -package’s bug tracker Web page or help you compose an email to the -maintainer. Since 2016, only “members” (including all who have previously -submitted bugs) can submit new bugs on the R Bugzilla. See “Where to submit -bug reports and patches” on Bug Reporting in R +package's bug tracker Web page or help you compose an email to the +maintainer. Since 2016, only "members" (including all who have previously +submitted bugs) can submit new bugs on the R Bugzilla. See "Where to submit +bug reports and patches" on Bug Reporting in R (https://www.r-project.org/bugs.html) for more information. There is a section of the bug repository for suggestions for enhancements diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/NEWS R-patched/doc/NEWS --- R-release-orig/doc/NEWS 2024-10-31 09:06:07.000000000 +0100 +++ R-patched/doc/NEWS 2024-11-25 01:35:27.325970489 +0100 @@ -1,5 +1,25 @@ R News +CHANGES IN R 4.4.2 patched: + + C-LEVEL FACILITIES: + + * The functions R_strtod and R_atof now allow hexadecimal constants + without an exponent, for compatibility with their C99 versions + (PR#18805). + + BUG FIXES: + + * kappa(A, exact=TRUE) for singular A returns Inf more generally, + fixing PR#18817 reported by Mikael Jagan. + + * Fixed URLs of the sun spots (sunspot.month etc) data sets and + mention future changes due to recalibration. + + * The parser now accepts hexadecimal constants with a decimal point + without an exponent (taken as p0) as documented in + ?NumericConstants (PR#18819). + CHANGES IN R 4.4.2: C-LEVEL FACILITIES: diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/NEWS.Rd R-patched/doc/NEWS.Rd --- R-release-orig/doc/NEWS.Rd 2024-10-22 00:15:01.000000000 +0200 +++ R-patched/doc/NEWS.Rd 2024-11-11 15:37:29.111917723 +0100 @@ -5,6 +5,30 @@ \title{R News} \encoding{UTF-8} +\section{\Rlogo CHANGES IN R 4.4.2 patched}{ + \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{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}). + } + } +} + \section{\Rlogo CHANGES IN R 4.4.2}{ \subsection{C-LEVEL FACILITIES}{ \itemize{ Binary files R-release-orig/doc/NEWS.pdf and R-patched/doc/NEWS.pdf differ diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/RESOURCES R-patched/doc/RESOURCES --- R-release-orig/doc/RESOURCES 2024-10-31 09:02:39.000000000 +0100 +++ R-patched/doc/RESOURCES 2024-11-25 01:32:24.089146680 +0100 @@ -1,5 +1,5 @@ - AVAILABLE R RESOURCES + AVAILABLE R RESOURCES 1 FAQ ***** @@ -9,9 +9,9 @@ <https://CRAN.R-project.org/doc/FAQ/R-FAQ.html> -A text version is in file 'FAQ' in this directory, and an HTML version is -available as file 'doc/html/faq.html' and via the on-line help (on the index -page given by 'help.start()'). +A text version is in file ‘FAQ’ in this directory, and an HTML version is +available as file ‘doc/html/faq.html’ and via the on-line help (on the index +page given by ‘help.start()’). 2 Mailing lists *************** diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/html/NEWS.html R-patched/doc/html/NEWS.html --- R-release-orig/doc/html/NEWS.html 2024-10-31 09:06:07.000000000 +0100 +++ R-patched/doc/html/NEWS.html 2024-11-25 01:35:28.746857432 +0100 @@ -18,6 +18,45 @@ <h2>R News</h2> +<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 4.4.2 patched</h3> + + + +<h4>C-LEVEL FACILITIES</h4> + + +<ul> +<li><p> The functions <code>R_strtod</code> and <code>R_atof</code> now allow +hexadecimal constants without an exponent, for compatibility with +their C99 versions (<a href="https://bugs.R-project.org/show_bug.cgi?id=18805">PR#18805</a>). +</p> +</li></ul> + + + + +<h4>BUG FIXES</h4> + + +<ul> +<li> <p><code>kappa(A, exact=TRUE)</code> for singular <code>A</code> returns +<code>Inf</code> more generally, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18817">PR#18817</a> reported by +Mikael Jagan. +</p> +</li> +<li><p> Fixed URLs of the sun spots (<code>sunspot.month</code> etc) data +sets and mention future changes due to recalibration. +</p> +</li> +<li><p> The parser now accepts hexadecimal constants with a decimal +point without an exponent (taken as <code>p0</code>) as documented in +<code>?NumericConstants</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18819">PR#18819</a>). +</p> +</li></ul> + + + + <h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 4.4.2</h3> diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/html/R-admin.html R-patched/doc/html/R-admin.html --- R-release-orig/doc/html/R-admin.html 2024-10-31 09:08:46.000000000 +0100 +++ R-patched/doc/html/R-admin.html 2024-11-25 01:43:31.958766504 +0100 @@ -1,11 +1,11 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<!-- This manual is for R, version 4.4.2 (2024-10-31). +<!-- This manual is for R, version 4.4.2 Patched (2024-11-24). -Copyright (C) 2001-2024 R Core Team +Copyright © 2001-2024 R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -37,21 +37,18 @@ <link href="dir.html#Top" rel="prev" title="(dir)"> <style type="text/css"> <!-- -a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em} -a.summary-letter {text-decoration: none} -blockquote.indentedblock {margin-right: 0em} -div.display {margin-left: 3.2em} +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +a.summary-letter-printindex {text-decoration: none} div.example {margin-left: 3.2em} -kbd {font-style: oblique} -pre.display {font-family: inherit} -pre.format {font-family: inherit} -pre.menu-comment {font-family: serif} -pre.menu-preformatted {font-family: serif} -span.nolinebreak {white-space: nowrap} -span.roman {font-family: initial; font-weight: normal} -span.sansserif {font-family: sans-serif; font-weight: normal} -span:hover a.copiable-anchor {visibility: visible} -ul.no-bullet {list-style: none} +kbd.kbd {font-style: oblique} +span.r {font-family: initial; font-weight: normal; font-style: normal} +span:hover a.copiable-link {visibility: visible} +td.printindex-index-entry {vertical-align: top} +td.printindex-index-section {vertical-align: top; padding-left: 1em} +th.entries-header-printindex {text-align:left} +th.sections-header-printindex {text-align:left; padding-left: 1em} +ul.mark-bullet {list-style-type: disc} +ul.toc-numbered-mark {list-style: none} body { margin-left: 5%; margin-right: 5%; @@ -133,7 +130,6 @@ </head> <body lang="en"> -<h1 class="settitle" align="center">R Installation and Administration</h1> @@ -158,16 +154,16 @@ -<div class="top" id="Top"> -<span id="R-Installation-and-Administration"></span><h1 class="top">R Installation and Administration</h1> +<div class="top-level-extent" id="Top"> +<h1 class="top" id="R-Installation-and-Administration"><span>R Installation and Administration<a class="copiable-link" href="#R-Installation-and-Administration"> ¶</a></span></h1> <p>This is a guide to installation and administration for R. </p> -<p>This manual is for R, version 4.4.2 (2024-10-31). +<p>This manual is for R, version 4.4.2 Patched (2024-11-24). </p> <p>Copyright © 2001–2024 R Core Team </p> -<blockquote> +<blockquote class="quotation"> <p>Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @@ -185,22 +181,22 @@ -<div class="Contents_element" id="SEC_Contents"> +<div class="element-contents" id="SEC_Contents"> <h2 class="contents-heading">Table of Contents</h2> <div class="contents"> -<ul class="no-bullet"> +<ul class="toc-numbered-mark"> <li><a id="toc-Obtaining-R-1" href="#Obtaining-R">1 Obtaining R</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Getting-and-unpacking-the-sources-1" href="#Getting-and-unpacking-the-sources">1.1 Getting and unpacking the sources</a></li> <li><a id="toc-Getting-patched-and-development-versions-1" href="#Getting-patched-and-development-versions">1.2 Getting patched and development versions</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Using-Subversion-and-rsync-1" href="#Using-Subversion-and-rsync">1.2.1 Using Subversion and rsync</a></li> </ul></li> </ul></li> <li><a id="toc-Installing-R-under-Unix_002dalikes-1" href="#Installing-R-under-Unix_002dalikes">2 Installing R under Unix-alikes</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Simple-compilation-1" href="#Simple-compilation">2.1 Simple compilation</a></li> <li><a id="toc-Help-options-1" href="#Help-options">2.2 Help options</a></li> <li><a id="toc-Making-the-manuals-1" href="#Making-the-manuals">2.3 Making the manuals</a></li> @@ -208,24 +204,24 @@ <li><a id="toc-Uninstallation-1" href="#Uninstallation">2.5 Uninstallation</a></li> <li><a id="toc-Sub_002darchitectures-1" href="#Sub_002darchitectures">2.6 Sub-architectures</a></li> <li><a id="toc-Other-Options-1" href="#Other-Options">2.7 Other Options</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Debugging-Symbols-1" href="#Debugging-Symbols">2.7.1 Debugging Symbols</a></li> - <li><a id="toc-OpenMP-Support-1" href="#OpenMP-Support">2.7.2 <abbr>OpenMP</abbr> Support</a></li> + <li><a id="toc-OpenMP-Support-1" href="#OpenMP-Support">2.7.2 <abbr class="abbr">OpenMP</abbr> Support</a></li> <li><a id="toc-C_002b_002b-Support-1" href="#C_002b_002b-Support">2.7.3 C++ Support</a></li> <li><a id="toc-C-standards-1" href="#C-standards">2.7.4 C standards</a></li> <li><a id="toc-Link_002dTime-Optimization-1" href="#Link_002dTime-Optimization">2.7.5 Link-Time Optimization</a> - <ul class="no-bullet"> - <li><a id="toc-LTO-with-GCC-1" href="#LTO-with-GCC">2.7.5.1 <abbr>LTO</abbr> with GCC</a></li> - <li><a id="toc-LTO-with-LLVM-1" href="#LTO-with-LLVM">2.7.5.2 <abbr>LTO</abbr> with LLVM</a></li> - <li><a id="toc-LTO-for-package-checking-1" href="#LTO-for-package-checking">2.7.5.3 <abbr>LTO</abbr> for package checking</a></li> + <ul class="toc-numbered-mark"> + <li><a id="toc-LTO-with-GCC-1" href="#LTO-with-GCC">2.7.5.1 <abbr class="abbr">LTO</abbr> with GCC</a></li> + <li><a id="toc-LTO-with-LLVM-1" href="#LTO-with-LLVM">2.7.5.2 <abbr class="abbr">LTO</abbr> with LLVM</a></li> + <li><a id="toc-LTO-for-package-checking-1" href="#LTO-for-package-checking">2.7.5.3 <abbr class="abbr">LTO</abbr> for package checking</a></li> </ul></li> </ul></li> <li><a id="toc-Testing-an-Installation" href="#Testing-a-Unix_002dalike-Installation">2.8 Testing an Installation</a></li> </ul></li> <li><a id="toc-Installing-R-under-Windows-1" href="#Installing-R-under-Windows">3 Installing R under Windows</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Building-from-source-1" href="#Building-from-source">3.1 Building from source</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-The-Windows-toolset-1" href="#The-Windows-toolset">3.1.1 The Windows toolset</a></li> <li><a id="toc-LaTeX" href="#LaTeX-on-Windows">3.1.2 LaTeX</a></li> </ul></li> @@ -233,18 +229,18 @@ <li><a id="toc-Testing-an-Installation-1" href="#Testing-a-Windows-Installation">3.3 Testing an Installation</a></li> </ul></li> <li><a id="toc-Installing-R-under-macOS-1" href="#Installing-R-under-macOS">4 Installing R under macOS</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Running-R-under-macOS-1" href="#Running-R-under-macOS">4.1 Running R under macOS</a></li> <li><a id="toc-Uninstalling-under-macOS-1" href="#Uninstalling-under-macOS">4.2 Uninstalling under macOS</a></li> <li><a id="toc-Multiple-versions-1" href="#Multiple-versions">4.3 Multiple versions</a></li> </ul></li> <li><a id="toc-Running-R-1" href="#Running-R">5 Running R</a></li> <li><a id="toc-Add_002don-packages-1" href="#Add_002don-packages">6 Add-on packages</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Default-packages-1" href="#Default-packages">6.1 Default packages</a></li> <li><a id="toc-Managing-libraries-1" href="#Managing-libraries">6.2 Managing libraries</a></li> <li><a id="toc-Installing-packages-1" href="#Installing-packages">6.3 Installing packages</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Windows" href="#Windows-packages">6.3.1 Windows</a></li> <li><a id="toc-macOS-1" href="#macOS-packages">6.3.2 macOS</a></li> <li><a id="toc-Customizing-package-compilation-1" href="#Customizing-package-compilation">6.3.3 Customizing package compilation</a></li> @@ -258,9 +254,9 @@ <li><a id="toc-Checking-installed-source-packages-1" href="#Checking-installed-source-packages">6.7 Checking installed source packages</a></li> </ul></li> <li><a id="toc-Internationalization-and-Localization" href="#Internationalization">7 Internationalization and Localization</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Locales-1" href="#Locales">7.1 Locales</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Locales-under-Unix_002dalikes-1" href="#Locales-under-Unix_002dalikes">7.1.1 Locales under Unix-alikes</a></li> <li><a id="toc-Locales-under-Windows-1" href="#Locales-under-Windows">7.1.2 Locales under Windows</a></li> <li><a id="toc-Locales-under-macOS-1" href="#Locales-under-macOS">7.1.3 Locales under macOS</a></li> @@ -269,23 +265,23 @@ </ul></li> <li><a id="toc-Choosing-between-32_002d-and-64_002dbit-builds-1" href="#Choosing-between-32_002d-and-64_002dbit-builds">8 Choosing between 32- and 64-bit builds</a></li> <li><a id="toc-The-standalone-Rmath-library-1" href="#The-standalone-Rmath-library">9 The standalone Rmath library</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Unix_002dalikes" href="#Unix_002dalike-standalone">9.1 Unix-alikes</a></li> <li><a id="toc-Windows-1" href="#Windows-standalone">9.2 Windows</a></li> </ul></li> <li><a id="toc-Essential-and-useful-other-programs-under-a-Unix_002dalike-1" href="#Essential-and-useful-other-programs-under-a-Unix_002dalike">Appendix A Essential and useful other programs under a Unix-alike</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Essential-programs-and-libraries-1" href="#Essential-programs-and-libraries">A.1 Essential programs and libraries</a></li> <li><a id="toc-Useful-libraries-and-programs-1" href="#Useful-libraries-and-programs">A.2 Useful libraries and programs</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Tcl_002fTk-1" href="#Tcl_002fTk">A.2.1 Tcl/Tk</a></li> <li><a id="toc-Java-support-1" href="#Java-support">A.2.2 Java support</a></li> <li><a id="toc-Other-compiled-languages-1" href="#Other-compiled-languages">A.2.3 Other compiled languages</a></li> </ul></li> <li><a id="toc-Linear-algebra-1" href="#Linear-algebra">A.3 Linear algebra</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-BLAS-1" href="#BLAS">A.3.1 BLAS</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-ATLAS-1" href="#ATLAS">A.3.1.1 ATLAS</a></li> <li><a id="toc-OpenBLAS-and-BLIS-1" href="#OpenBLAS-and-BLIS">A.3.1.2 OpenBLAS and BLIS</a></li> <li><a id="toc-Intel-MKL" href="#MKL">A.3.1.3 Intel MKL</a></li> @@ -296,11 +292,11 @@ </ul></li> </ul></li> <li><a id="toc-Configuration-on-a-Unix_002dalike-1" href="#Configuration-on-a-Unix_002dalike">Appendix B Configuration on a Unix-alike</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Configuration-options-1" href="#Configuration-options">B.1 Configuration options</a></li> <li><a id="toc-Internationalization-support-1" href="#Internationalization-support">B.2 Internationalization support</a></li> <li><a id="toc-Configuration-variables-1" href="#Configuration-variables">B.3 Configuration variables</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Setting-paper-size-1" href="#Setting-paper-size">B.3.1 Setting paper size</a></li> <li><a id="toc-Setting-the-browsers-1" href="#Setting-the-browsers">B.3.2 Setting the browsers</a></li> <li><a id="toc-Compilation-flags-1" href="#Compilation-flags">B.3.3 Compilation flags</a></li> @@ -313,22 +309,22 @@ <li><a id="toc-Maintainer-mode-1" href="#Maintainer-mode">B.8 Maintainer mode</a></li> </ul></li> <li><a id="toc-Platform-notes-1" href="#Platform-notes">Appendix C Platform notes</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-X11-issues-1" href="#X11-issues">C.1 X11 issues</a></li> <li><a id="toc-Linux-1" href="#Linux">C.2 Linux</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Clang-1" href="#Clang">C.2.1 Clang</a></li> <li><a id="toc-flang-1" href="#flang">C.2.2 flang</a></li> <li><a id="toc-Intel-compilers-1" href="#Intel-compilers">C.2.3 Intel compilers</a></li> </ul></li> <li><a id="toc-macOS-2" href="#macOS">C.3 macOS</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Prerequisites-1" href="#Prerequisites">C.3.1 Prerequisites</a></li> <li><a id="toc-Fortran-compiler" href="#Fortran-compilers">C.3.2 Fortran compiler</a></li> <li><a id="toc-Cairo-graphics-1" href="#Cairo-graphics">C.3.3 Cairo graphics</a></li> <li><a id="toc-Other-C_002fC_002b_002b-compilers-1" href="#Other-C_002fC_002b_002b-compilers">C.3.4 Other C/C++ compilers</a></li> <li><a id="toc-Other-libraries-1" href="#Other-libraries">C.3.5 Other libraries</a> - <ul class="no-bullet"> + <ul class="toc-numbered-mark"> <li><a id="toc-Accelerate-1" href="#Accelerate">C.3.5.1 Accelerate</a></li> <li><a id="toc-OpenBLAS" href="#OpenBLAS-_0028macOS_0029">C.3.5.2 OpenBLAS</a></li> </ul></li> @@ -337,7 +333,7 @@ <li><a id="toc-Frameworks-1" href="#Frameworks">C.3.8 Frameworks</a></li> <li><a id="toc-Building-R_002eapp-1" href="#Building-R_002eapp">C.3.9 Building R.app</a></li> <li><a id="toc-Building-binary-packages-1" href="#Building-binary-packages">C.3.10 Building binary packages</a></li> - <li><a id="toc-Building-for-Intel-on-arm64-1" href="#Building-for-Intel-on-arm64">C.3.11 Building for Intel on ‘<samp>arm64</samp>’</a></li> + <li><a id="toc-Building-for-Intel-on-arm64-1" href="#Building-for-Intel-on-arm64">C.3.11 Building for Intel on ‘<samp class="samp">arm64</samp>’</a></li> <li><a id="toc-Installer-1" href="#Installer">C.3.12 Installer</a></li> </ul></li> <li><a id="toc-FreeBSD-1" href="#FreeBSD">C.4 FreeBSD</a></li> @@ -352,56 +348,56 @@ </div> </div> <hr> -<div class="chapter" id="Obtaining-R"> -<span id="Obtaining-R-1"></span><h2 class="chapter">1 Obtaining R</h2> -<span id="index-Obtaining-R"></span> +<div class="chapter-level-extent" id="Obtaining-R"> +<h2 class="chapter" id="Obtaining-R-1"><span>1 Obtaining R<a class="copiable-link" href="#Obtaining-R-1"> ¶</a></span></h2> +<a class="index-entry-id" id="index-Obtaining-R"></a> <p>Sources, binaries and documentation for R can be obtained via -<acronym>CRAN</acronym>, the “Comprehensive R Archive Network” whose current -members are listed at <a href="https://CRAN.R-project.org/mirrors.html">https://CRAN.R-project.org/mirrors.html</a>. +<abbr class="acronym">CRAN</abbr>, the “Comprehensive R Archive Network” whose current +members are listed at <a class="uref" href="https://CRAN.R-project.org/mirrors.html">https://CRAN.R-project.org/mirrors.html</a>. </p> <hr> -<div class="section" id="Getting-and-unpacking-the-sources"> -<span id="Getting-and-unpacking-the-sources-1"></span><h3 class="section">1.1 Getting and unpacking the sources</h3> -<span id="index-Sources-for-R"></span> +<div class="section-level-extent" id="Getting-and-unpacking-the-sources"> +<h3 class="section" id="Getting-and-unpacking-the-sources-1"><span>1.1 Getting and unpacking the sources<a class="copiable-link" href="#Getting-and-unpacking-the-sources-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Sources-for-R"></a> <p>The simplest way is to download the most recent -<samp>R-<var>x</var>.<var>y</var>.<var>z</var>.tar.gz</samp> file, and unpack it with +<samp class="file">R-<var class="var">x</var>.<var class="var">y</var>.<var class="var">z</var>.tar.gz</samp> file, and unpack it with </p> <div class="example"> -<pre class="example">tar -xf R-<var>x</var>.<var>y</var>.<var>z</var>.tar.gz +<pre class="example-preformatted">tar -xf R-<var class="var">x</var>.<var class="var">y</var>.<var class="var">z</var>.tar.gz </pre></div> -<p>on systems that have a suitable<a id="DOCF1" href="#FOOT1"><sup>1</sup></a> -<code>tar</code> installed. On other systems you need to have the -<code>gzip</code> program installed, when you can use +<p>on systems that have a suitable<a class="footnote" id="DOCF1" href="#FOOT1"><sup>1</sup></a> +<code class="command">tar</code> installed. On other systems you need to have the +<code class="command">gzip</code> program installed, when you can use </p> <div class="example"> -<pre class="example">gzip -dc R-<var>x</var>.<var>y</var>.<var>z</var>.tar.gz | tar -xf - +<pre class="example-preformatted">gzip -dc R-<var class="var">x</var>.<var class="var">y</var>.<var class="var">z</var>.tar.gz | tar -xf - </pre></div> <p>The pathname of the directory into which the sources are unpacked should -not contain spaces, as most <code>make</code> programs (and specifically -<acronym>GNU</acronym> <code>make</code>) do not expect spaces. +not contain spaces, as most <code class="command">make</code> programs (and specifically +<abbr class="acronym">GNU</abbr> <code class="command">make</code>) do not expect spaces. </p> -<p>If you want the build to be usable by a group of users, set <code>umask</code> +<p>If you want the build to be usable by a group of users, set <code class="code">umask</code> before unpacking so that the files will be readable by the target group -(e.g., <code>umask 022</code> to be usable by all users). Keep this -setting of <code>umask</code> whilst building and installing. +(e.g., <code class="code">umask 022</code> to be usable by all users). Keep this +setting of <code class="code">umask</code> whilst building and installing. </p> -<p>If you use a fairly recent <acronym>GNU</acronym> version of <code>tar</code> and do +<p>If you use a fairly recent <abbr class="acronym">GNU</abbr> version of <code class="command">tar</code> and do this as a root account (which on Windows includes accounts with administrator privileges) you may see many warnings about changing ownership. In which case you can use </p> <div class="example"> -<pre class="example">tar --no-same-owner -xf R-<var>x</var>.<var>y</var>.<var>z</var>.tar.gz +<pre class="example-preformatted">tar --no-same-owner -xf R-<var class="var">x</var>.<var class="var">y</var>.<var class="var">z</var>.tar.gz </pre></div> -<p>and perhaps also include the option <samp>--no-same-permissions</samp>. -<span id="index-TAR_005fOPTIONS"></span> -(These options can also be set in the <code>TAR_OPTIONS</code> environment +<p>and perhaps also include the option <samp class="option">--no-same-permissions</samp>. +<a class="index-entry-id" id="index-TAR_005fOPTIONS"></a> +(These options can also be set in the <code class="env">TAR_OPTIONS</code> environment variable: if more than one option is included they should be separated by spaces.) </p> @@ -409,84 +405,84 @@ <hr> </div> -<div class="section" id="Getting-patched-and-development-versions"> -<span id="Getting-patched-and-development-versions-1"></span><h3 class="section">1.2 Getting patched and development versions</h3> +<div class="section-level-extent" id="Getting-patched-and-development-versions"> +<h3 class="section" id="Getting-patched-and-development-versions-1"><span>1.2 Getting patched and development versions<a class="copiable-link" href="#Getting-patched-and-development-versions-1"> ¶</a></span></h3> -<p>A patched version of the current release, ‘<samp>r-patched</samp>’, and the -current development version, ‘<samp>r-devel</samp>’, are available as daily +<p>A patched version of the current release, ‘<samp class="samp">r-patched</samp>’, and the +current development version, ‘<samp class="samp">r-devel</samp>’, are available as daily tarballs and via access to the R Subversion repository. (For the two -weeks prior to the release of a minor (4.x.0) version, ‘<samp>r-patched</samp>’ +weeks prior to the release of a minor (4.x.0) version, ‘<samp class="samp">r-patched</samp>’ tarballs may refer to beta/release candidates of the upcoming release, the patched version of the current release being available via Subversion.) </p> <p>The tarballs are available from -<a href="https://cran.r-project.org/src/base-prerelease">https://cran.r-project.org/src/base-prerelease</a>. Download -<samp>R-patched.tar.gz</samp> or <samp>R-devel.tar.gz</samp> (or the <samp>.tar.bz2</samp> +<a class="uref" href="https://cran.r-project.org/src/base-prerelease">https://cran.r-project.org/src/base-prerelease</a>. Download +<samp class="file">R-patched.tar.gz</samp> or <samp class="file">R-devel.tar.gz</samp> (or the <samp class="file">.tar.bz2</samp> versions) and unpack as described in the previous section. They are built in exactly the same way and on the same platform as distributions of R releases. Notice, that you probably want to use the CRAN master site for this, due to propagation delays. An -alternative source of daily snapshots is maintained at <a href="https://stat.ethz.ch/R/daily/">https://stat.ethz.ch/R/daily/</a>. +alternative source of daily snapshots is maintained at <a class="uref" href="https://stat.ethz.ch/R/daily/">https://stat.ethz.ch/R/daily/</a>. </p> <hr> -<div class="subsection" id="Using-Subversion-and-rsync"> -<span id="Using-Subversion-and-rsync-1"></span><h4 class="subsection">1.2.1 Using Subversion and rsync</h4> -<span id="index-Subversion"></span> +<div class="subsection-level-extent" id="Using-Subversion-and-rsync"> +<h4 class="subsection" id="Using-Subversion-and-rsync-1"><span>1.2.1 Using Subversion and rsync<a class="copiable-link" href="#Using-Subversion-and-rsync-1"> ¶</a></span></h4> +<a class="index-entry-id" id="index-Subversion"></a> -<p>Sources are also available via <a href="https://svn.R-project.org/R/">https://svn.R-project.org/R/</a>, the +<p>Sources are also available via <a class="uref" href="https://svn.R-project.org/R/">https://svn.R-project.org/R/</a>, the R Subversion repository. If you have a Subversion client (see -<a href="https://subversion.apache.org/">https://subversion.apache.org/</a>), you can check out and update the -current ‘<samp>r-devel</samp>’ from -<a href="https://svn.r-project.org/R/trunk/">https://svn.r-project.org/R/trunk/</a> and the current -‘<samp>r-patched</samp>’ from -‘<samp>https://svn.r-project.org/R/branches/R-<var>x</var>-<var>y</var>-branch/</samp>’ -(where <var>x</var> and <var>y</var> are the major and minor number of the current +<a class="uref" href="https://subversion.apache.org/">https://subversion.apache.org/</a>), you can check out and update the +current ‘<samp class="samp">r-devel</samp>’ from +<a class="uref" href="https://svn.r-project.org/R/trunk/">https://svn.r-project.org/R/trunk/</a> and the current +‘<samp class="samp">r-patched</samp>’ from +‘<samp class="samp">https://svn.r-project.org/R/branches/R-<var class="var">x</var>-<var class="var">y</var>-branch/</samp>’ +(where <var class="var">x</var> and <var class="var">y</var> are the major and minor number of the current released version of R). E.g., use </p> <div class="example"> -<pre class="example">svn checkout https://svn.r-project.org/R/trunk/ <var>path</var> +<pre class="example-preformatted">svn checkout https://svn.r-project.org/R/trunk/ <var class="var">path</var> </pre></div> -<p>to check out ‘<samp>r-devel</samp>’ into directory <var>path</var> (which will be +<p>to check out ‘<samp class="samp">r-devel</samp>’ into directory <var class="var">path</var> (which will be created if necessary). The alpha, beta and RC versions of an upcoming -<var>x.y.0</var> release are available from -‘<samp>https://svn.r-project.org/R/branches/R-<var>x</var>-<var>y</var>-branch/</samp>’ in +<var class="var">x.y.0</var> release are available from +‘<samp class="samp">https://svn.r-project.org/R/branches/R-<var class="var">x</var>-<var class="var">y</var>-branch/</samp>’ in the four-week period prior to the release. </p> -<p>Note that ‘<samp>https:</samp>’ is required<a id="DOCF2" href="#FOOT2"><sup>2</sup></a>, -and that the <abbr>SSL</abbr> certificate for the Subversion server of the R +<p>Note that ‘<samp class="samp">https:</samp>’ is required<a class="footnote" id="DOCF2" href="#FOOT2"><sup>2</sup></a>, +and that the <abbr class="abbr">SSL</abbr> certificate for the Subversion server of the R project should be recognized as from a trusted source. </p> -<p>Note that retrieving the sources by e.g. <code>wget -r</code> or -<code>svn export</code> from that URL will not work (and will give a error -early in the <code>make</code> process): the Subversion information is +<p>Note that retrieving the sources by e.g. <code class="command">wget -r</code> or +<code class="command">svn export</code> from that URL will not work (and will give a error +early in the <code class="command">make</code> process): the Subversion information is needed to build R. </p> <p>The Subversion repository does not contain the current sources for the -recommended packages, which can be obtained by <code>rsync</code> or -downloaded from <acronym>CRAN</acronym>. To use <code>rsync</code> to install the +recommended packages, which can be obtained by <code class="command">rsync</code> or +downloaded from <abbr class="acronym">CRAN</abbr>. To use <code class="code">rsync</code> to install the appropriate sources for the recommended packages, run -<code>./tools/rsync-recommended</code> from the top-level directory of the +<code class="code">./tools/rsync-recommended</code> from the top-level directory of the R sources. </p> -<p>If downloading manually from <acronym>CRAN</acronym>, do ensure that you have the +<p>If downloading manually from <abbr class="acronym">CRAN</abbr>, do ensure that you have the correct versions of the recommended packages: if the number in the file -<samp>VERSION</samp> is ‘<samp><var>x</var>.<var>y</var>.<var>z</var></samp>’ you need to download -the contents of ‘<samp>https://CRAN.R-project.org/src/contrib/<var>dir</var></samp>’, -where <var>dir</var> is ‘<samp><var>x</var>.<var>y</var>.<var>z</var>/Recommended</samp>’ for -r-devel or <samp><var>x</var>.<var>y</var>-patched/Recommended</samp> for r-patched, -respectively, to directory <samp>src/library/Recommended</samp> in the sources +<samp class="file">VERSION</samp> is ‘<samp class="samp"><var class="var">x</var>.<var class="var">y</var>.<var class="var">z</var></samp>’ you need to download +the contents of ‘<samp class="samp">https://CRAN.R-project.org/src/contrib/<var class="var">dir</var></samp>’, +where <var class="var">dir</var> is ‘<samp class="samp"><var class="var">x</var>.<var class="var">y</var>.<var class="var">z</var>/Recommended</samp>’ for +r-devel or <samp class="file"><var class="var">x</var>.<var class="var">y</var>-patched/Recommended</samp> for r-patched, +respectively, to directory <samp class="file">src/library/Recommended</samp> in the sources you have unpacked. After downloading manually you need to execute -<code>tools/link-recommended</code> from the top level of the sources to -make the requisite links in <samp>src/library/Recommended</samp>. A suitable -incantation from the top level of the R sources using <code>wget</code> -might be (for the correct value of <samp><var>dir</var></samp>) +<code class="command">tools/link-recommended</code> from the top level of the sources to +make the requisite links in <samp class="file">src/library/Recommended</samp>. A suitable +incantation from the top level of the R sources using <code class="command">wget</code> +might be (for the correct value of <samp class="file"><var class="var">dir</var></samp>) </p> <div class="example"> -<pre class="example">wget -r -l1 --no-parent -A\*.gz -nd -P src/library/Recommended \ - https://CRAN.R-project.org/src/contrib/<var>dir</var> +<pre class="example-preformatted">wget -r -l1 --no-parent -A\*.gz -nd -P src/library/Recommended \ + https://CRAN.R-project.org/src/contrib/<var class="var">dir</var> ./tools/link-recommended </pre></div> @@ -496,28 +492,28 @@ </div> </div> </div> -<div class="chapter" id="Installing-R-under-Unix_002dalikes"> -<span id="Installing-R-under-Unix_002dalikes-1"></span><h2 class="chapter">2 Installing R under Unix-alikes</h2> -<span id="index-Installing-under-Unix_002dalikes"></span> +<div class="chapter-level-extent" id="Installing-R-under-Unix_002dalikes"> +<h2 class="chapter" id="Installing-R-under-Unix_002dalikes-1"><span>2 Installing R under Unix-alikes<a class="copiable-link" href="#Installing-R-under-Unix_002dalikes-1"> ¶</a></span></h2> +<a class="index-entry-id" id="index-Installing-under-Unix_002dalikes"></a> <p>R will configure and build under most common Unix and Unix-alike -platforms including ‘<samp><var>cpu</var>-*-linux-gnu</samp>’ for the -‘<samp>alpha</samp>’, ‘<samp>arm64</samp>’ (also known as ‘<samp>aarch64</samp>’, -‘<samp>ix86</samp>’, ‘<samp>mips</samp>’, ‘<samp>mipsel</samp>’#, ‘<samp>ppc64</samp>’, -‘<samp>riscv64</samp>’, ‘<samp>s390x</samp>’, ‘<samp>sparc64</samp>’, and -‘<samp>x86_64</samp>’ <acronym>CPU</acronym>s, -‘<samp>aarch64-apple-darwin</samp>’<a id="DOCF3" href="#FOOT3"><sup>3</sup></a> and -‘<samp>x86_64-apple-darwin</samp>’ as well as perhaps (it is -tested less frequently on these platforms) ‘<samp>x86_64-*-freebsd</samp>’, -‘<samp>x86_64-*-openbsd</samp>’ and ‘<samp>powerpc-ibm-aix6*</samp>’ +platforms including ‘<samp class="samp"><var class="var">cpu</var>-*-linux-gnu</samp>’ for the +‘<samp class="samp">alpha</samp>’, ‘<samp class="samp">arm64</samp>’ (also known as ‘<samp class="samp">aarch64</samp>’, +‘<samp class="samp">ix86</samp>’, ‘<samp class="samp">mips</samp>’, ‘<samp class="samp">mipsel</samp>’#, ‘<samp class="samp">ppc64</samp>’, +‘<samp class="samp">riscv64</samp>’, ‘<samp class="samp">s390x</samp>’, ‘<samp class="samp">sparc64</samp>’, and +‘<samp class="samp">x86_64</samp>’ <abbr class="acronym">CPU</abbr>s, +‘<samp class="samp">aarch64-apple-darwin</samp>’<a class="footnote" id="DOCF3" href="#FOOT3"><sup>3</sup></a> and +‘<samp class="samp">x86_64-apple-darwin</samp>’ as well as perhaps (it is +tested less frequently on these platforms) ‘<samp class="samp">x86_64-*-freebsd</samp>’, +‘<samp class="samp">x86_64-*-openbsd</samp>’ and ‘<samp class="samp">powerpc-ibm-aix6*</samp>’ </p> -<p>Only 64-bit platforms are tested regularly, and <code>configure</code> +<p>Only 64-bit platforms are tested regularly, and <code class="command">configure</code> will warn if it encounters a 32-bit one. </p> -<span id="index-Linux"></span> -<span id="index-macOS"></span> +<a class="index-entry-id" id="index-Linux"></a> +<a class="index-entry-id" id="index-macOS"></a> <p>In addition, binary distributions are available for some common Linux -distributions (see the <acronym>FAQ</acronym> for current details) and for +distributions (see the <abbr class="acronym">FAQ</abbr> for current details) and for macOS. These are installed in platform-specific ways, so for the rest of this chapter we consider only building from the sources. </p> @@ -526,40 +522,40 @@ </p> <hr> -<div class="section" id="Simple-compilation"> -<span id="Simple-compilation-1"></span><h3 class="section">2.1 Simple compilation</h3> +<div class="section-level-extent" id="Simple-compilation"> +<h3 class="section" id="Simple-compilation-1"><span>2.1 Simple compilation<a class="copiable-link" href="#Simple-compilation-1"> ¶</a></span></h3> <p>First review the essential and useful tools and libraries in -<a href="#Essential-and-useful-other-programs-under-a-Unix_002dalike">Essential and useful other programs under a Unix-alike</a>, and install +<a class="ref" href="#Essential-and-useful-other-programs-under-a-Unix_002dalike">Essential and useful other programs under a Unix-alike</a>, and install those you -<span id="index-TMPDIR"></span> -want or need. Ensure that either the environment variable <code>TMPDIR</code> -is either unset (and <samp>/tmp</samp> exists and can be written in and +<a class="index-entry-id" id="index-TMPDIR"></a> +want or need. Ensure that either the environment variable <code class="env">TMPDIR</code> +is either unset (and <samp class="file">/tmp</samp> exists and can be written in and scripts can be executed from) or points to the absolute path to a valid temporary directory (one from which execution of scripts is allowed) which does not contain spaces. </p> -<span id="index-R_005fHOME"></span> +<a class="index-entry-id" id="index-R_005fHOME"></a> <p>Choose a directory to install the R tree (R is not just a binary, but has additional data sets, help files, font metrics etc). Let us call -this place <var>R_HOME</var>. Untar the source code. This should create -directories <samp>src</samp>, <samp>doc</samp>, and several more under a top-level +this place <var class="var">R_HOME</var>. Untar the source code. This should create +directories <samp class="file">src</samp>, <samp class="file">doc</samp>, and several more under a top-level directory: change to that top-level directory (At this point North -American readers should consult <a href="#Setting-paper-size">Setting paper size</a>.) Issue the +American readers should consult <a class="ref" href="#Setting-paper-size">Setting paper size</a>.) Issue the following commands: </p> -<span id="index-configure"></span> +<a class="index-entry-id" id="index-configure"></a> <div class="example"> -<pre class="example">./configure +<pre class="example-preformatted">./configure make </pre></div> -<p>(See <a href="#Using-make">Using make</a> if your make is not called ‘<samp>make</samp>’.) Users of -Debian-based 64-bit systems<a id="DOCF4" href="#FOOT4"><sup>4</sup></a> may need +<p>(See <a class="ref" href="#Using-make">Using make</a> if your make is not called ‘<samp class="samp">make</samp>’.) Users of +Debian-based 64-bit systems<a class="footnote" id="DOCF4" href="#FOOT4"><sup>4</sup></a> may need </p> <div class="example"> -<pre class="example">./configure LIBnn=lib +<pre class="example-preformatted">./configure LIBnn=lib make </pre></div> @@ -567,252 +563,252 @@ <p>Then check the built system works correctly by </p> <div class="example"> -<pre class="example">make check +<pre class="example-preformatted">make check </pre></div> <p>Failures are not necessarily problems as they might be caused by missing functionality, but you should look carefully at any reported discrepancies. (Some non-fatal errors are expected in locales that do -not support Latin-1, in particular in true <code>C</code> locales and +not support Latin-1, in particular in true <code class="code">C</code> locales and non-UTF-8 non-Western-European locales.) A failure in -<samp>tests/ok-errors.R</samp> may indicate inadequate resource limits -(see <a href="#Running-R">Running R</a>). +<samp class="file">tests/ok-errors.R</samp> may indicate inadequate resource limits +(see <a class="pxref" href="#Running-R">Running R</a>). </p> <p>More comprehensive testing can be done by </p> <div class="example"> -<pre class="example">make check-devel +<pre class="example-preformatted">make check-devel </pre></div> <p>or </p> <div class="example"> -<pre class="example">make check-all +<pre class="example-preformatted">make check-all </pre></div> -<p>see <a href="#Testing-a-Unix_002dalike-Installation">Testing an Installation</a> +<p>see <a class="ref" href="#Testing-a-Unix_002dalike-Installation">Testing an Installation</a> for the possibilities of doing this in parallel. Note that these checks are only run completely if the recommended packages are installed. If you have a local CRAN mirror, these checks can be speeded up by either -setting environment variable <code>R_CRAN_WEB</code> to its URL, or having a -file <samp>.R/repositories</samp> specifying it (see <code>?setRepositories</code>). +setting environment variable <code class="env">R_CRAN_WEB</code> to its URL, or having a +file <samp class="file">.R/repositories</samp> specifying it (see <code class="code">?setRepositories</code>). </p> -<p><code>make check-devel</code> checks the included packages’ <samp>tests</samp> -directories. For <strong>grDevices</strong> more complete checks will be run if -the environment variable <code>R_GRDEVICES_COMPARE_PS_PDF</code> is set: those -checks are skipped on platforms using <code>musl</code> such as Alpine Linux, and +<p><code class="command">make check-devel</code> checks the included packages’ <samp class="file">tests</samp> +directories. For <strong class="strong">grDevices</strong> more complete checks will be run if +the environment variable <code class="env">R_GRDEVICES_COMPARE_PS_PDF</code> is set: those +checks are skipped on platforms using <code class="code">musl</code> such as Alpine Linux, and it knows about differences from transliterations in macOS 14 and later. </p> <p>Parallel make is supported for building R but not for the -‘<samp>check</samp>’ targets (as the output is likely to be unreadably -interleaved, although where supported<a id="DOCF5" href="#FOOT5"><sup>5</sup></a> GNU make’s <samp>-O</samp> may help). +‘<samp class="samp">check</samp>’ targets (as the output is likely to be unreadably +interleaved, although where supported<a class="footnote" id="DOCF5" href="#FOOT5"><sup>5</sup></a> GNU make’s <samp class="option">-O</samp> may help). </p> -<p>If the <code>configure</code> and <code>make</code> commands execute -successfully, a shell-script front-end called <samp>R</samp> will be created -and copied to <samp><var>R_HOME</var>/bin</samp>. You can link or copy this script +<p>If the <code class="command">configure</code> and <code class="command">make</code> commands execute +successfully, a shell-script front-end called <samp class="file">R</samp> will be created +and copied to <samp class="file"><var class="var">R_HOME</var>/bin</samp>. You can link or copy this script to a place where users can invoke it, for example to -<samp>/usr/local/bin/R</samp>. You could also copy the man page <samp>R.1</samp> to -a place where your <code>man</code> reader finds it, such as -<samp>/usr/local/man/man1</samp>. If you want to install the complete R -tree to, e.g., <samp>/usr/local/lib/R</samp>, see <a href="#Installation">Installation</a>. Note: -you do not <em>need</em> to install R: you can run it from where it was +<samp class="file">/usr/local/bin/R</samp>. You could also copy the man page <samp class="file">R.1</samp> to +a place where your <code class="command">man</code> reader finds it, such as +<samp class="file">/usr/local/man/man1</samp>. If you want to install the complete R +tree to, e.g., <samp class="file">/usr/local/lib/R</samp>, see <a class="ref" href="#Installation">Installation</a>. Note: +you do not <em class="emph">need</em> to install R: you can run it from where it was built. </p> <p>You do not necessarily have to build R in the top-level source -directory (say, <samp><var>TOP_SRCDIR</var></samp>). To build in -<samp><var>BUILDDIR</var></samp>, run +directory (say, <samp class="file"><var class="var">TOP_SRCDIR</var></samp>). To build in +<samp class="file"><var class="var">BUILDDIR</var></samp>, run </p> -<span id="index-configure-1"></span> +<a class="index-entry-id" id="index-configure-1"></a> <div class="example"> -<pre class="example">cd <var>BUILDDIR</var> -<var>TOP_SRCDIR</var>/configure +<pre class="example-preformatted">cd <var class="var">BUILDDIR</var> +<var class="var">TOP_SRCDIR</var>/configure make </pre></div> <p>and so on, as described further below. This has the advantage of always keeping your source tree clean and is particularly recommended when you work with a version of R from Subversion. (You may need -<acronym>GNU</acronym> <code>make</code> to allow this, and you will need no spaces +<abbr class="acronym">GNU</abbr> <code class="command">make</code> to allow this, and you will need no spaces in the path to the build directory. It is unlikely to work if the source directory has previously been used for a build.) </p> <p>There are many settings which can be customized when building R and -most are described in the file <samp>config.site</samp> in the top-level +most are described in the file <samp class="file">config.site</samp> in the top-level source directory. This can be edited, but for an installation using -<samp><var>BUILDDIR</var></samp> it is better to put the changed settings in a -newly-created file <samp>config.site</samp> in the build directory. +<samp class="file"><var class="var">BUILDDIR</var></samp> it is better to put the changed settings in a +newly-created file <samp class="file">config.site</samp> in the build directory. </p> -<p>Now <code>rehash</code> if necessary, type <kbd>R</kbd>, and read the R manuals -and the R <acronym>FAQ</acronym> (files <samp>FAQ</samp> or -<samp>doc/manual/R-FAQ.html</samp>, or -<a href="https://CRAN.R-project.org/doc/FAQ/R-FAQ.html">https://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a> which always +<p>Now <code class="code">rehash</code> if necessary, type <kbd class="kbd">R</kbd>, and read the R manuals +and the R <abbr class="acronym">FAQ</abbr> (files <samp class="file">FAQ</samp> or +<samp class="file">doc/manual/R-FAQ.html</samp>, or +<a class="uref" href="https://CRAN.R-project.org/doc/FAQ/R-FAQ.html">https://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a> which always has the version for the latest release of R). </p> <p>Note: if you already have R installed, check that where you installed R replaces or comes earlier in your path than the previous -installation. Some systems are set up to have <samp>/usr/bin</samp> (the -standard place for a system installation) ahead of <samp>/usr/local/bin</samp> +installation. Some systems are set up to have <samp class="file">/usr/bin</samp> (the +standard place for a system installation) ahead of <samp class="file">/usr/local/bin</samp> (the default place for installation of R) in their default path, and -some do not have <samp>/usr/local/bin</samp> on the default path. +some do not have <samp class="file">/usr/local/bin</samp> on the default path. </p> <hr> </div> -<div class="section" id="Help-options"> -<span id="Help-options-1"></span><h3 class="section">2.2 Help options</h3> +<div class="section-level-extent" id="Help-options"> +<h3 class="section" id="Help-options-1"><span>2.2 Help options<a class="copiable-link" href="#Help-options-1"> ¶</a></span></h3> <p>R by default provides help pages as plain text displayed in a pager, -with the options (see the help for <code>help</code>) of displaying help as +with the options (see the help for <code class="code">help</code>) of displaying help as HTML or PDF. </p> -<p>By default <acronym>HTML</acronym> help pages are created when needed rather than being +<p>By default <abbr class="acronym">HTML</abbr> help pages are created when needed rather than being built at install time. </p> -<p>If you need to disable the server and want <acronym>HTML</acronym> help, there is the -option to build <acronym>HTML</acronym> pages when packages are installed +<p>If you need to disable the server and want <abbr class="acronym">HTML</abbr> help, there is the +option to build <abbr class="acronym">HTML</abbr> pages when packages are installed (including those installed with R). This is enabled by the -<code>configure</code> option <samp>--enable-prebuilt-html</samp>. Whether -<code>R CMD INSTALL</code> (and hence <code>install.packages</code>) pre-builds -<acronym>HTML</acronym> pages is determined by looking at the R installation and is -reported by <code>R CMD INSTALL --help</code>: it can be overridden by -specifying one of the <code>INSTALL</code> options <samp>--html</samp> or -<samp>--no-html</samp>. +<code class="command">configure</code> option <samp class="option">--enable-prebuilt-html</samp>. Whether +<code class="command">R CMD INSTALL</code> (and hence <code class="code">install.packages</code>) pre-builds +<abbr class="acronym">HTML</abbr> pages is determined by looking at the R installation and is +reported by <code class="command">R CMD INSTALL --help</code>: it can be overridden by +specifying one of the <code class="command">INSTALL</code> options <samp class="option">--html</samp> or +<samp class="option">--no-html</samp>. </p> <p>The server is disabled by setting the environment variable -<span id="index-R_005fDISABLE_005fHTTPD"></span> -<code>R_DISABLE_HTTPD</code> to a non-empty value, either before R is -started or within the R session before <acronym>HTML</acronym> help (including -<code>help.start</code>) is used. It is also possible that system security +<a class="index-entry-id" id="index-R_005fDISABLE_005fHTTPD"></a> +<code class="env">R_DISABLE_HTTPD</code> to a non-empty value, either before R is +started or within the R session before <abbr class="acronym">HTML</abbr> help (including +<code class="code">help.start</code>) is used. It is also possible that system security measures will prevent the server from being started, for example if the loopback interface has been disabled. See -<code>?tools::startDynamicHelp</code> for more details. +<code class="code">?tools::startDynamicHelp</code> for more details. </p> <hr> </div> -<div class="section" id="Making-the-manuals"> -<span id="Making-the-manuals-1"></span><h3 class="section">2.3 Making the manuals</h3> -<span id="index-Manuals"></span> +<div class="section-level-extent" id="Making-the-manuals"> +<h3 class="section" id="Making-the-manuals-1"><span>2.3 Making the manuals<a class="copiable-link" href="#Making-the-manuals-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Manuals"></a> <p>There is a set of manuals that can be built from the sources, </p> -<dl compact="compact"> -<dt><span>‘<samp>fullrefman</samp>’</span></dt> +<dl class="table"> +<dt>‘<samp class="samp">fullrefman</samp>’</dt> <dd><p>Printed versions of all the help pages for base and recommended packages (around 3750 pages). </p></dd> -<dt><span>‘<samp>refman</samp>’</span></dt> +<dt>‘<samp class="samp">refman</samp>’</dt> <dd><p>Printed versions of the help pages for selected base packages (around 2200 pages) </p></dd> -<dt><span>‘<samp>R-FAQ</samp>’</span></dt> -<dd><p>R <acronym>FAQ</acronym> +<dt>‘<samp class="samp">R-FAQ</samp>’</dt> +<dd><p>R <abbr class="acronym">FAQ</abbr> </p></dd> -<dt><span>‘<samp>R-intro</samp>’</span></dt> +<dt>‘<samp class="samp">R-intro</samp>’</dt> <dd><p>“An Introduction to R”. </p></dd> -<dt><span>‘<samp>R-data</samp>’</span></dt> +<dt>‘<samp class="samp">R-data</samp>’</dt> <dd><p>“R Data Import/Export”. </p></dd> -<dt><span>‘<samp>R-admin</samp>’</span></dt> +<dt>‘<samp class="samp">R-admin</samp>’</dt> <dd><p>“R Installation and Administration”, this manual. </p></dd> -<dt><span>‘<samp>R-exts</samp>’</span></dt> +<dt>‘<samp class="samp">R-exts</samp>’</dt> <dd><p>“Writing R Extensions”. </p></dd> -<dt><span>‘<samp>R-lang</samp>’</span></dt> +<dt>‘<samp class="samp">R-lang</samp>’</dt> <dd><p>“The R Language Definition”. </p></dd> </dl> -<p>To make these (with ‘<samp>fullrefman</samp>’ rather than ‘<samp>refman</samp>’), use +<p>To make these (with ‘<samp class="samp">fullrefman</samp>’ rather than ‘<samp class="samp">refman</samp>’), use </p> <div class="example"> -<pre class="example">make pdf <span class="roman">to create PDF versions</span> -make info <span class="roman">to create info files (not ‘<samp>refman</samp>’ nor ‘<samp>fullrefman</samp>’).</span> +<pre class="example-preformatted">make pdf <span class="r">to create PDF versions</span> +make info <span class="r">to create info files (not ‘<samp class="samp">refman</samp>’ nor ‘<samp class="samp">fullrefman</samp>’).</span> </pre></div> <p>You will not be able to build any of these unless you have -<code>texi2any</code> version 5.1 or later installed, and for PDF you must -have <code>texi2dvi</code> and <samp>texinfo.tex</samp> installed (which are part -of the <acronym>GNU</acronym> <strong>texinfo</strong> distribution but are, especially -<samp>texinfo.tex</samp>, often made part of the TeX package in -re-distributions). The path to <code>texi2any</code> can be set by macro -‘<samp>TEXI2ANY</samp>’ in <samp>config.site</samp>. NB: <code>texi2any</code> requires -<code>perl</code>. +<code class="command">texi2any</code> version 5.1 or later installed, and for PDF you must +have <code class="command">texi2dvi</code> and <samp class="file">texinfo.tex</samp> installed (which are part +of the <abbr class="acronym">GNU</abbr> <strong class="strong">texinfo</strong> distribution but are, especially +<samp class="file">texinfo.tex</samp>, often made part of the TeX package in +re-distributions). The path to <code class="command">texi2any</code> can be set by macro +‘<samp class="samp">TEXI2ANY</samp>’ in <samp class="file">config.site</samp>. NB: <code class="command">texi2any</code> requires +<code class="command">perl</code>. </p> <p>The PDF versions can be viewed using any recent PDF viewer: they have hyperlinks that can be followed. The info files are suitable for -reading online with Emacs or the standalone <acronym>GNU</acronym> <code>info</code> +reading online with Emacs or the standalone <abbr class="acronym">GNU</abbr> <code class="command">info</code> program. The PDF versions will be created using the paper size selected at configuration (default ISO a4): this can be overridden by setting -<code>R_PAPERSIZE</code> -<span id="index-R_005fPAPERSIZE"></span> -on the <code>make</code> command line, or setting <code>R_PAPERSIZE</code> in the -environment and using <code>make -e</code>. (If re-making the manuals for +<code class="env">R_PAPERSIZE</code> +<a class="index-entry-id" id="index-R_005fPAPERSIZE"></a> +on the <code class="command">make</code> command line, or setting <code class="env">R_PAPERSIZE</code> in the +environment and using <code class="command">make -e</code>. (If re-making the manuals for a different paper size, you should first delete the file -<samp>doc/manual/version.texi</samp>. The usual value for North America would -be ‘<samp>letter</samp>’.) +<samp class="file">doc/manual/version.texi</samp>. The usual value for North America would +be ‘<samp class="samp">letter</samp>’.) </p> <p>There are some issues with making the PDF reference manual, -<samp>fullrefman.pdf</samp> or <samp>refman.pdf</samp>. The help files contain both -non-ASCII characters (e.g. in <samp>text.Rd</samp>) and upright quotes, +<samp class="file">fullrefman.pdf</samp> or <samp class="file">refman.pdf</samp>. The help files contain both +non-ASCII characters (e.g. in <samp class="file">text.Rd</samp>) and upright quotes, neither of which are contained in the standard LaTeX Computer Modern fonts. We have provided the following alternatives: </p> -<dl compact="compact"> -<dt><span><code>times</code></span></dt> +<dl class="table"> +<dt><code class="code">times</code></dt> <dd><p>(The default.) Using standard PostScript fonts, Times Roman, Helvetica and Courier. This works well both for on-screen viewing and for printing. One disadvantage is that the Usage and Examples sections may -come out rather wide: this can be overcome by using <em>in addition</em> -either of the options <code>inconsolata</code> (on a Unix-alike only if found -by <code>configure</code>) or <code>beramono</code>, which replace the Courier +come out rather wide: this can be overcome by using <em class="emph">in addition</em> +either of the options <code class="code">inconsolata</code> (on a Unix-alike only if found +by <code class="command">configure</code>) or <code class="code">beramono</code>, which replace the Courier monospaced font by Inconsolata or Bera Sans Mono respectively. (You -will need the LaTeX package <strong>inconsolata</strong><a id="DOCF6" href="#FOOT6"><sup>6</sup></a> or -<strong>bera</strong> installed.) +will need the LaTeX package <strong class="strong">inconsolata</strong><a class="footnote" id="DOCF6" href="#FOOT6"><sup>6</sup></a> or +<strong class="strong">bera</strong> installed.) </p> <p>Note that in most LaTeX installations this will not actually use the standard fonts for PDF, but rather embed the URW clones NimbusRom, NimbusSans and (for Courier, if used) NimbusMon. </p> -<p>This needs LaTeX packages <strong>times</strong>, <strong>helvetic</strong> and (if used) -<strong>courier</strong> installed. +<p>This needs LaTeX packages <strong class="strong">times</strong>, <strong class="strong">helvetic</strong> and (if used) +<strong class="strong">courier</strong> installed. </p> </dd> -<dt><span><code>lm</code></span></dt> -<dd><p>Using the <em>Latin Modern</em> fonts. These are not often installed as +<dt><code class="code">lm</code></dt> +<dd><p>Using the <em class="emph">Latin Modern</em> fonts. These are not often installed as part of a TeX distribution, but can obtained from -<a href="https://www.ctan.org/tex-archive/fonts/ps-type1/lm/">https://www.ctan.org/tex-archive/fonts/ps-type1/lm/</a> and +<a class="uref" href="https://www.ctan.org/tex-archive/fonts/ps-type1/lm/">https://www.ctan.org/tex-archive/fonts/ps-type1/lm/</a> and mirrors. This uses fonts rather similar to Computer Modern, but is not -so good on-screen as <code>times</code>. +so good on-screen as <code class="code">times</code>. </p> </dd> </dl> <p>The default can be overridden by setting the environment variable -<span id="index-R_005fRD4PDF"></span> -<code>R_RD4PDF</code>. (On Unix-alikes, this will be picked up at install time -and stored in <samp>etc/Renviron</samp>, but can still be overridden when the -manuals are built, using <code>make -e</code>.) The usual<a id="DOCF7" href="#FOOT7"><sup>7</sup></a> default value for <code>R_RD4PDF</code> is -‘<samp>times,inconsolata,hyper</samp>’: omit ‘<samp>inconsolata</samp>’ if you do not have -LaTeX package <strong>inconsolata</strong> installed. -‘<samp>hyper</samp>’ is always enabled (with a fallback if LaTeX package -<strong>hyperref</strong> is not installed). +<a class="index-entry-id" id="index-R_005fRD4PDF"></a> +<code class="env">R_RD4PDF</code>. (On Unix-alikes, this will be picked up at install time +and stored in <samp class="file">etc/Renviron</samp>, but can still be overridden when the +manuals are built, using <code class="command">make -e</code>.) The usual<a class="footnote" id="DOCF7" href="#FOOT7"><sup>7</sup></a> default value for <code class="env">R_RD4PDF</code> is +‘<samp class="samp">times,inconsolata,hyper</samp>’: omit ‘<samp class="samp">inconsolata</samp>’ if you do not have +LaTeX package <strong class="strong">inconsolata</strong> installed. +‘<samp class="samp">hyper</samp>’ is always enabled (with a fallback if LaTeX package +<strong class="strong">hyperref</strong> is not installed). </p> -<p>Further options, e.g for <strong>hyperref</strong>, can be included in a file -<samp>Rd.cfg</samp> somewhere on your LaTeX search path. For example, if +<p>Further options, e.g for <strong class="strong">hyperref</strong>, can be included in a file +<samp class="file">Rd.cfg</samp> somewhere on your LaTeX search path. For example, if you prefer to hyperlink the text and not the page number in the table of contents use </p><div class="example"> -<pre class="example">\ifthenelse{\boolean{Rd@use@hyper}}{\hypersetup{linktoc=section}}{} +<pre class="example-preformatted">\ifthenelse{\boolean{Rd@use@hyper}}{\hypersetup{linktoc=section}}{} </pre></div> <p>or </p><div class="example"> -<pre class="example">\ifthenelse{\boolean{Rd@use@hyper}}{\hypersetup{linktoc=all}}{} +<pre class="example-preformatted">\ifthenelse{\boolean{Rd@use@hyper}}{\hypersetup{linktoc=all}}{} </pre></div> <p>to hyperlink both text and page number. @@ -820,135 +816,135 @@ <p>Any generated PDF manuals can be compacted by </p> <div class="example"> -<pre class="example">make compact-pdf +<pre class="example-preformatted">make compact-pdf </pre></div> -<p>provided <code>qpdf</code> and <code>gs</code> are available (see -<code>?tools::compactPDF</code> for how to specify them if not on the path). +<p>provided <code class="command">qpdf</code> and <code class="command">gs</code> are available (see +<code class="code">?tools::compactPDF</code> for how to specify them if not on the path). </p> -<p>E-book versions of most of the manuals in one or both of <samp>.epub</samp> and -<samp>.mobi</samp> formats can be made by running in <samp>doc/manual</samp> one of +<p>E-book versions of most of the manuals in one or both of <samp class="file">.epub</samp> and +<samp class="file">.mobi</samp> formats can be made by running in <samp class="file">doc/manual</samp> one of </p><div class="example"> -<pre class="example">make ebooks +<pre class="example-preformatted">make ebooks make epub make mobi </pre></div> -<p>This requires <code>ebook-convert</code> from -<a href="https://calibre-ebook.com/download"><code>Calibre</code></a>, or from +<p>This requires <code class="command">ebook-convert</code> from +<a class="uref" href="https://calibre-ebook.com/download"><code class="command">Calibre</code></a>, or from most Linux distributions. If necessary the path to -<code>ebook-convert</code> can be set as make macro <code>EBOOK</code> by editing -<samp>doc/manual/Makefile</samp> (which contains a commented value suitable -for macOS) or using <code>make -e</code>. +<code class="command">ebook-convert</code> can be set as make macro <code class="env">EBOOK</code> by editing +<samp class="file">doc/manual/Makefile</samp> (which contains a commented value suitable +for macOS) or using <code class="command">make -e</code>. </p> <hr> </div> -<div class="section" id="Installation"> -<span id="Installation-1"></span><h3 class="section">2.4 Installation</h3> -<span id="index-Installation"></span> +<div class="section-level-extent" id="Installation"> +<h3 class="section" id="Installation-1"><span>2.4 Installation<a class="copiable-link" href="#Installation-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Installation"></a> <p>To ensure that the installed tree is usable by the right group of users, -set <code>umask</code> appropriately (perhaps to ‘<samp>022</samp>’) before unpacking +set <code class="code">umask</code> appropriately (perhaps to ‘<samp class="samp">022</samp>’) before unpacking the sources and throughout the build process. </p> <p>After </p> -<span id="index-configure-2"></span> +<a class="index-entry-id" id="index-configure-2"></a> <div class="example"> -<pre class="example">./configure +<pre class="example-preformatted">./configure make make check </pre></div> <p>(or, when building outside the source, -<code><var>TOP_SRCDIR</var>/configure</code>, etc) have been completed +<code class="code"><var class="var">TOP_SRCDIR</var>/configure</code>, etc) have been completed successfully, you can install the complete R tree to your system by typing </p> <div class="example"> -<pre class="example">make install +<pre class="example-preformatted">make install </pre></div> -<p>A parallel make can be used (but run <code>make</code> before <code>make -install</code>). Those using GNU <code>make</code> 4.0 or later may want to use -<code>make -j <var>n</var> -O</code> to avoid interleaving of output. +<p>A parallel make can be used (but run <code class="command">make</code> before <code class="command">make +install</code>). Those using GNU <code class="command">make</code> 4.0 or later may want to use +<code class="command">make -j <var class="var">n</var> -O</code> to avoid interleaving of output. </p> <p>This will install to the following directories: </p> -<dl compact="compact"> -<dt><span><samp><var>prefix</var>/bin</samp> or <samp><var>bindir</var></samp></span></dt> +<dl class="table"> +<dt><samp class="file"><var class="var">prefix</var>/bin</samp> or <samp class="file"><var class="var">bindir</var></samp></dt> <dd><p>the front-end shell script and other scripts and executables </p></dd> -<dt><span><samp><var>prefix</var>/man/man1</samp> or <samp><var>mandir</var>/man1</samp></span></dt> +<dt><samp class="file"><var class="var">prefix</var>/man/man1</samp> or <samp class="file"><var class="var">mandir</var>/man1</samp></dt> <dd><p>the man page </p></dd> -<dt><span><samp><var>prefix</var>/<var>LIBnn</var>/R</samp> or <samp><var>libdir</var>/R</samp></span></dt> +<dt><samp class="file"><var class="var">prefix</var>/<var class="var">LIBnn</var>/R</samp> or <samp class="file"><var class="var">libdir</var>/R</samp></dt> <dd><p>all the rest (libraries, on-line help system, …). Here -<var>LIBnn</var> is usually ‘<samp>lib</samp>’, but may be ‘<samp>lib64</samp>’ on some +<var class="var">LIBnn</var> is usually ‘<samp class="samp">lib</samp>’, but may be ‘<samp class="samp">lib64</samp>’ on some 64-bit Linux systems. This is known as the R home directory. </p></dd> </dl> -<p>where <var>prefix</var> is determined during configuration (typically -<samp>/usr/local</samp>) and can be set by running <code>configure</code> with -the option <samp>--prefix</samp>, as in +<p>where <var class="var">prefix</var> is determined during configuration (typically +<samp class="file">/usr/local</samp>) and can be set by running <code class="command">configure</code> with +the option <samp class="option">--prefix</samp>, as in </p> -<span id="index-configure-3"></span> +<a class="index-entry-id" id="index-configure-3"></a> <div class="example"> -<pre class="example">./configure --prefix=/where/you/want/R/to/go +<pre class="example-preformatted">./configure --prefix=/where/you/want/R/to/go </pre></div> -<p>where the value should be an absolute path. This causes <code>make +<p>where the value should be an absolute path. This causes <code class="command">make install</code> to install the R script to -<samp>/where/you/want/R/to/go/bin</samp>, and so on. The prefix of the +<samp class="file">/where/you/want/R/to/go/bin</samp>, and so on. The prefix of the installation directories can be seen in the status message that is -displayed at the end of <code>configure</code>. The installation may need -to be done by the owner of <samp><var>prefix</var></samp>, often a root account. +displayed at the end of <code class="command">configure</code>. The installation may need +to be done by the owner of <samp class="file"><var class="var">prefix</var></samp>, often a root account. </p> -<p>There is the option of using <code>make install-strip</code> (see <a href="#Debugging-Symbols">Debugging Symbols</a>). +<p>There is the option of using <code class="command">make install-strip</code> (see <a class="pxref" href="#Debugging-Symbols">Debugging Symbols</a>). </p> <p>You can install into another directory tree by using </p> <div class="example"> -<pre class="example">make prefix=/path/to/here install +<pre class="example-preformatted">make prefix=/path/to/here install </pre></div> -<p>at least with <acronym>GNU</acronym> <code>make</code> (but not some other Unix +<p>at least with <abbr class="acronym">GNU</abbr> <code class="command">make</code> (but not some other Unix makes). </p> <p>More precise control is available at configure time via options: see -<code>configure --help</code> for details. (However, most of the ‘Fine +<code class="command">configure --help</code> for details. (However, most of the ‘Fine tuning of the installation directories’ options are not used by R.) </p> -<p>Configure options <samp>--bindir</samp> and <samp>--mandir</samp> are supported -and govern where a copy of the <code>R</code> script and the <code>man</code> +<p>Configure options <samp class="option">--bindir</samp> and <samp class="option">--mandir</samp> are supported +and govern where a copy of the <code class="command">R</code> script and the <code class="command">man</code> page are installed. </p> -<p>The configure option <samp>--libdir</samp> controls where the main R -files are installed: the default is ‘<samp><var>eprefix</var>/<var>LIBnn</var></samp>’, -where <var>eprefix</var> is the prefix used for installing -architecture-dependent files, defaults to <var>prefix</var>, and can be set -via the configure option <samp>--exec-prefix</samp>. -</p> -<p>Each of <code>bindir</code>, <code>mandir</code> and <code>libdir</code> can also be -specified on the <code>make install</code> command line (at least for -<acronym>GNU</acronym> <code>make</code>). -</p> -<p>The <code>configure</code> or <code>make</code> variables <code>rdocdir</code> and -<code>rsharedir</code> can be used to install the system-independent -<samp>doc</samp> and <samp>share</samp> directories to somewhere other than -<code>libdir</code>. The C header files can be installed to the value of -<code>rincludedir</code>: note that as the headers are not installed into a +<p>The configure option <samp class="option">--libdir</samp> controls where the main R +files are installed: the default is ‘<samp class="samp"><var class="var">eprefix</var>/<var class="var">LIBnn</var></samp>’, +where <var class="var">eprefix</var> is the prefix used for installing +architecture-dependent files, defaults to <var class="var">prefix</var>, and can be set +via the configure option <samp class="option">--exec-prefix</samp>. +</p> +<p>Each of <code class="code">bindir</code>, <code class="code">mandir</code> and <code class="code">libdir</code> can also be +specified on the <code class="command">make install</code> command line (at least for +<abbr class="acronym">GNU</abbr> <code class="command">make</code>). +</p> +<p>The <code class="command">configure</code> or <code class="command">make</code> variables <code class="code">rdocdir</code> and +<code class="code">rsharedir</code> can be used to install the system-independent +<samp class="file">doc</samp> and <samp class="file">share</samp> directories to somewhere other than +<code class="code">libdir</code>. The C header files can be installed to the value of +<code class="code">rincludedir</code>: note that as the headers are not installed into a subdirectory you probably want something like -<code>rincludedir=/usr/local/include/R-4.4.2</code>. +<code class="code">rincludedir=/usr/local/include/R-4.4.2</code>. </p> <p>If you want the R home to be something other than -<samp><var>libdir</var>/R</samp>, use <samp>rhome</samp>: for example +<samp class="file"><var class="var">libdir</var>/R</samp>, use <samp class="option">rhome</samp>: for example </p> <div class="example"> -<pre class="example">make install rhome=/usr/local/lib64/R-4.4.2 +<pre class="example-preformatted">make install rhome=/usr/local/lib64/R-4.4.2 </pre></div> <p>will use a version-specific R home on a non-Debian Linux 64-bit @@ -958,208 +954,208 @@ your system’s library directory by </p> <div class="example"> -<pre class="example">make prefix=/path/to/here install-libR +<pre class="example-preformatted">make prefix=/path/to/here install-libR </pre></div> -<p>where <code>prefix</code> is optional, and <code>libdir</code> will give more -precise control.<a id="DOCF8" href="#FOOT8"><sup>8</sup></a> However, you should not install -to a directory mentioned in <code>LDPATHS</code> (e.g. -<samp>/usr/local/lib64</samp>) if you intend to work with multiple versions of -R, since that directory may be given precedence over the <samp>lib</samp> +<p>where <code class="code">prefix</code> is optional, and <code class="code">libdir</code> will give more +precise control.<a class="footnote" id="DOCF8" href="#FOOT8"><sup>8</sup></a> However, you should not install +to a directory mentioned in <code class="env">LDPATHS</code> (e.g. +<samp class="file">/usr/local/lib64</samp>) if you intend to work with multiple versions of +R, since that directory may be given precedence over the <samp class="file">lib</samp> directory of other R installations. </p> <div class="example"> -<pre class="example">make install-strip +<pre class="example-preformatted">make install-strip </pre></div> <p>will install stripped executables, and on platforms where this is -supported, stripped libraries in directories <samp>lib</samp> and -<samp>modules</samp> and in the standard packages. +supported, stripped libraries in directories <samp class="file">lib</samp> and +<samp class="file">modules</samp> and in the standard packages. </p> <p>Note that installing R into a directory whose path contains spaces is not supported, and some aspects (such as installing source packages) will not work. </p> -<span id="index-Manuals_002c-installing"></span> +<a class="index-entry-id" id="index-Manuals_002c-installing"></a> <p>To install info and PDF versions of the manuals, use one or both of </p> <div class="example"> -<pre class="example">make install-info +<pre class="example-preformatted">make install-info make install-pdf </pre></div> -<p>Once again, it is optional to specify <code>prefix</code>, <code>libdir</code> or -<code>rhome</code> (the PDF manuals are installed under the R home +<p>Once again, it is optional to specify <code class="code">prefix</code>, <code class="code">libdir</code> or +<code class="code">rhome</code> (the PDF manuals are installed under the R home directory). </p> <p>More precise control is possible. For info, the setting used is that of -<code>infodir</code> (default <samp><var>prefix</var>/info</samp>, set by configure -option <samp>--infodir</samp>). The PDF files are installed into the R -<samp>doc</samp> tree, set by the <code>make</code> variable <code>rdocdir</code>. +<code class="code">infodir</code> (default <samp class="file"><var class="var">prefix</var>/info</samp>, set by configure +option <samp class="option">--infodir</samp>). The PDF files are installed into the R +<samp class="file">doc</samp> tree, set by the <code class="command">make</code> variable <code class="code">rdocdir</code>. </p> <p>A staged installation is possible, that it is installing R into a temporary directory in order to move the installed tree to its final -destination. In this case <code>prefix</code> (and so on) should reflect the -<span id="index-DESTDIR"></span> -final destination, and <code>DESTDIR</code> should be used: see -<a href="https://www.gnu.org/prep/standards/html_node/DESTDIR.html">https://www.gnu.org/prep/standards/html_node/DESTDIR.html</a>. +destination. In this case <code class="code">prefix</code> (and so on) should reflect the +<a class="index-entry-id" id="index-DESTDIR"></a> +final destination, and <code class="env">DESTDIR</code> should be used: see +<a class="uref" href="https://www.gnu.org/prep/standards/html_node/DESTDIR.html">https://www.gnu.org/prep/standards/html_node/DESTDIR.html</a>. </p> <p>You can optionally install the run-time tests that are part of -<code>make check-all</code> by +<code class="command">make check-all</code> by </p> <div class="example"> -<pre class="example">make install-tests +<pre class="example-preformatted">make install-tests </pre></div> -<p>which populates a <samp>tests</samp> directory in the installation. +<p>which populates a <samp class="file">tests</samp> directory in the installation. </p> <hr> </div> -<div class="section" id="Uninstallation"> -<span id="Uninstallation-1"></span><h3 class="section">2.5 Uninstallation</h3> +<div class="section-level-extent" id="Uninstallation"> +<h3 class="section" id="Uninstallation-1"><span>2.5 Uninstallation<a class="copiable-link" href="#Uninstallation-1"> ¶</a></span></h3> <p>You can uninstall R by </p> <div class="example"> -<pre class="example">make uninstall +<pre class="example-preformatted">make uninstall </pre></div> -<p>optionally specifying <code>prefix</code> etc in the same way as specified for +<p>optionally specifying <code class="code">prefix</code> etc in the same way as specified for installation. </p> <p>This will also uninstall any installed manuals. There are specific targets to uninstall info and PDF manuals in file -<samp>doc/manual/Makefile</samp>. +<samp class="file">doc/manual/Makefile</samp>. </p> -<p>Target <code>uninstall-tests</code> will uninstall any installed tests, as -well as removing the directory <samp>tests</samp> containing the test results. +<p>Target <code class="code">uninstall-tests</code> will uninstall any installed tests, as +well as removing the directory <samp class="file">tests</samp> containing the test results. </p> -<p>An installed shared/static <code>libR</code> can be uninstalled by +<p>An installed shared/static <code class="code">libR</code> can be uninstalled by </p> <div class="example"> -<pre class="example">make prefix=/path/to/here uninstall-libR +<pre class="example-preformatted">make prefix=/path/to/here uninstall-libR </pre></div> <hr> </div> -<div class="section" id="Sub_002darchitectures"> -<span id="Sub_002darchitectures-1"></span><h3 class="section">2.6 Sub-architectures</h3> +<div class="section-level-extent" id="Sub_002darchitectures"> +<h3 class="section" id="Sub_002darchitectures-1"><span>2.6 Sub-architectures<a class="copiable-link" href="#Sub_002darchitectures-1"> ¶</a></span></h3> <p>Now 32-bit builds are unsupported, this section is only of historical interest, although in future the mechanisms could be used for different -CPU types on the same OS (e.g. ‘<samp>x86_64</samp>’ and ‘<samp>aarch64</samp>’). +CPU types on the same OS (e.g. ‘<samp class="samp">x86_64</samp>’ and ‘<samp class="samp">aarch64</samp>’). </p> <p>Some platforms can support closely related builds of R which can share all but the executables and dynamic objects. Examples include -builds under Linux for different <acronym>CPU</acronym>s or 32- and 64-bit +builds under Linux for different <abbr class="acronym">CPU</abbr>s or 32- and 64-bit builds. </p> <p>R supports the idea of architecture-specific builds, specified by -adding ‘<samp>r_arch=<var>name</var></samp>’ to the <code>configure</code> line. Here -<var>name</var> can be anything non-empty, and is used to name subdirectories -of <samp>lib</samp>, <samp>etc</samp>, <samp>include</samp> and the package <samp>libs</samp> +adding ‘<samp class="samp">r_arch=<var class="var">name</var></samp>’ to the <code class="command">configure</code> line. Here +<var class="var">name</var> can be anything non-empty, and is used to name subdirectories +of <samp class="file">lib</samp>, <samp class="file">etc</samp>, <samp class="file">include</samp> and the package <samp class="file">libs</samp> subdirectories. Example names from other software are the use of -<samp>sparcv9</samp> on Sparc Solaris and <samp>32</samp> by <code>gcc</code> on -‘<samp>x86_64</samp>’ Linux. +<samp class="file">sparcv9</samp> on Sparc Solaris and <samp class="file">32</samp> by <code class="command">gcc</code> on +‘<samp class="samp">x86_64</samp>’ Linux. </p> <p>If you have two or more such builds you can install them over each other (and for 32/64-bit builds on one architecture, one build can be done -without ‘<samp>r_arch</samp>’). The space savings can be considerable: on -‘<samp>x86_64</samp>’ Linux a basic install (without debugging symbols) took +without ‘<samp class="samp">r_arch</samp>’). The space savings can be considerable: on +‘<samp class="samp">x86_64</samp>’ Linux a basic install (without debugging symbols) took 74Mb, and adding a 32-bit build added 6Mb. If you have installed multiple builds you can select which build to run by </p> <div class="example"> -<pre class="example">R --arch=<var>name</var> +<pre class="example-preformatted">R --arch=<var class="var">name</var> </pre></div> -<p>and just running ‘<samp>R</samp>’ will run the last build that was installed. +<p>and just running ‘<samp class="samp">R</samp>’ will run the last build that was installed. </p> -<p><code>R CMD INSTALL</code> will detect if more than one build is installed and +<p><code class="code">R CMD INSTALL</code> will detect if more than one build is installed and try to install packages with the appropriate library objects for each. -This will not be done if the package has an executable <code>configure</code> -script or a <samp>src/Makefile</samp> file. In such cases you can install for +This will not be done if the package has an executable <code class="code">configure</code> +script or a <samp class="file">src/Makefile</samp> file. In such cases you can install for extra builds by </p> <div class="example"> -<pre class="example">R --arch=<var>name</var> CMD INSTALL --libs-only <var>pkg1</var> <var>pkg2</var> … +<pre class="example-preformatted">R --arch=<var class="var">name</var> CMD INSTALL --libs-only <var class="var">pkg1</var> <var class="var">pkg2</var> ... </pre></div> <p>If you want to mix sub-architectures compiled on different platforms -(for example ‘<samp>x86_64</samp>’ Linux and ‘<samp>i686</samp>’ Linux), it is +(for example ‘<samp class="samp">x86_64</samp>’ Linux and ‘<samp class="samp">i686</samp>’ Linux), it is wise to use explicit names for each, and you may also need to set -<samp>libdir</samp> to ensure that they install into the same place. +<samp class="option">libdir</samp> to ensure that they install into the same place. </p> -<p>When sub-architectures are used the version of <code>Rscript</code> in -e.g. <samp>/usr/bin</samp> will be the last installed, but +<p>When sub-architectures are used the version of <code class="command">Rscript</code> in +e.g. <samp class="file">/usr/bin</samp> will be the last installed, but architecture-specific versions will be available in e.g. -<samp>/usr/lib64/R/bin/exec${<var>R_ARCH</var>}</samp>. Normally all installed +<samp class="file">/usr/lib64/R/bin/exec${<var class="var">R_ARCH</var>}</samp>. Normally all installed architectures will run on the platform so the architecture of -<code>Rscript</code> itself does not matter. The executable -<code>Rscript</code> will run the <code>R</code> script, and at that time the -<span id="index-R_005fARCH"></span> -setting of the <code>R_ARCH</code> environment variable determines the +<code class="command">Rscript</code> itself does not matter. The executable +<code class="command">Rscript</code> will run the <code class="command">R</code> script, and at that time the +<a class="index-entry-id" id="index-R_005fARCH"></a> +setting of the <code class="env">R_ARCH</code> environment variable determines the architecture which is run. </p> <p>When running post-install tests with sub-architectures, use </p> <div class="example"> -<pre class="example">R --arch=<var>name</var> CMD make check[-devel|all] +<pre class="example-preformatted">R --arch=<var class="var">name</var> CMD make check[-devel|all] </pre></div> <p>to select a sub-architecture to check. </p> <p>Sub-architectures were also used on Windows, but by selecting executables -within the appropriate <samp>bin</samp> directory such as -<samp><var>R_HOME</var>/bin/x64</samp>. As from R 4.2.0 only the ‘<samp>x64</samp>’ +within the appropriate <samp class="file">bin</samp> directory such as +<samp class="file"><var class="var">R_HOME</var>/bin/x64</samp>. As from R 4.2.0 only the ‘<samp class="samp">x64</samp>’ subdirectory is used. </p> <hr> </div> -<div class="section" id="Other-Options"> -<span id="Other-Options-1"></span><h3 class="section">2.7 Other Options</h3> +<div class="section-level-extent" id="Other-Options"> +<h3 class="section" id="Other-Options-1"><span>2.7 Other Options<a class="copiable-link" href="#Other-Options-1"> ¶</a></span></h3> <p>There are many other installation options, most of which are listed by -<code>configure --help</code>. Almost all of those not listed elsewhere in -this manual are either standard <code>autoconf</code> options not relevant +<code class="command">configure --help</code>. Almost all of those not listed elsewhere in +this manual are either standard <code class="command">autoconf</code> options not relevant to R or intended for specialist uses by the R developers. </p> <p>One that may be useful when working on R itself is the option -<samp>--disable-byte-compiled-packages</samp>, which ensures that the base +<samp class="option">--disable-byte-compiled-packages</samp>, which ensures that the base and recommended packages are not byte-compiled. (Alternatively the -(make or environment) variable <code>R_NO_BASE_COMPILE</code> can be set to a +(make or environment) variable <code class="env">R_NO_BASE_COMPILE</code> can be set to a non-empty value for the duration of the build.) </p> -<p>Option <samp>--with-internal-tzcode</samp> makes use of R’s own code and -copy of the <abbr>IANA</abbr> database for managing timezones. This will be +<p>Option <samp class="option">--with-internal-tzcode</samp> makes use of R’s own code and +copy of the <abbr class="abbr">IANA</abbr> database for managing timezones. This will be preferred where there are issues with the system implementation, usually involving times after 2037 or before 1916. An alternative time-zone -directory<a id="DOCF9" href="#FOOT9"><sup>9</sup></a> can be used, pointed -to by environment variable <code>TZDIR</code>: this should contain files such -as <samp>Europe/London</samp>. On all tested OSes the system timezone was +directory<a class="footnote" id="DOCF9" href="#FOOT9"><sup>9</sup></a> can be used, pointed +to by environment variable <code class="env">TZDIR</code>: this should contain files such +as <samp class="file">Europe/London</samp>. On all tested OSes the system timezone was deduced correctly, but if necessary it can be set as the value of -environment variable <code>TZ</code>. +environment variable <code class="env">TZ</code>. </p> -<p>Options <samp>--with-internal-iswxxxxx</samp>, -<samp>--with-internal-towlower</samp> and <samp>--with-internal-wcwidth</samp> +<p>Options <samp class="option">--with-internal-iswxxxxx</samp>, +<samp class="option">--with-internal-towlower</samp> and <samp class="option">--with-internal-wcwidth</samp> control the replacement of the system wide-character classification -(such as <code>iswprint</code>), case-changing (<code>wctrans</code>) and width -(<code>wcwidth</code> and <code>wcswidth</code>) functions by ones contained in the +(such as <code class="code">iswprint</code>), case-changing (<code class="code">wctrans</code>) and width +(<code class="code">wcwidth</code> and <code class="code">wcswidth</code>) functions by ones contained in the R sources. Replacement of the classification functions has been done -for many years on macOS and <abbr>AIX</abbr> (and Windows): option -<samp>--with-internal-iswxxxxx</samp> allows this to be suppressed on those +for many years on macOS and <abbr class="abbr">AIX</abbr> (and Windows): option +<samp class="option">--with-internal-iswxxxxx</samp> allows this to be suppressed on those platforms or used on others. Replacing the case-changing functions is the default on macOS and Windows. Replacement of the width functions has also been done for many years and remains the default. These options will only matter to those working with non-ASCII character data, -especially in languages written in a non-Western script<a id="DOCF10" href="#FOOT10"><sup>10</sup></a> (which includes ‘symbols’ such as emoji). Note -that one of those <code>iswxxxxx</code> is <code>iswprint</code> which is used to +especially in languages written in a non-Western script<a class="footnote" id="DOCF10" href="#FOOT10"><sup>10</sup></a> (which includes ‘symbols’ such as emoji). Note +that one of those <code class="code">iswxxxxx</code> is <code class="code">iswprint</code> which is used to decide whether to output a character as a glyph or as a -‘<samp>\U{xxxxxx}</samp>’ escape—for example, try ‘<samp>"\U1f600"</samp>’, an +‘<samp class="samp">\U{xxxxxx}</samp>’ escape—for example, try ‘<samp class="samp">"\U1f600"</samp>’, an emoji. The width functions are of most importance in East Asian locale: their values differ between such locales. (Replacing the system functions provides a degree of platform-independence (including to OS @@ -1167,75 +1163,75 @@ </p> <hr> -<div class="subsection" id="Debugging-Symbols"> -<span id="Debugging-Symbols-1"></span><h4 class="subsection">2.7.1 Debugging Symbols</h4> +<div class="subsection-level-extent" id="Debugging-Symbols"> +<h4 class="subsection" id="Debugging-Symbols-1"><span>2.7.1 Debugging Symbols<a class="copiable-link" href="#Debugging-Symbols-1"> ¶</a></span></h4> -<p>By default, <code>configure</code> adds a flag (usually <samp>-g</samp>) to the +<p>By default, <code class="command">configure</code> adds a flag (usually <samp class="option">-g</samp>) to the compilation flags for C, Fortran and C++ sources. This will slow down compilation and increase object sizes of both R and packages, so it -may be a good idea to change those flags (set ‘<samp>CFLAGS</samp>’ etc in -<samp>config.site</samp> before configuring, or edit files <samp>Makeconf</samp> -and <samp>etc/Makeconf</samp> between running <code>configure</code> and -<code>make</code>). +may be a good idea to change those flags (set ‘<samp class="samp">CFLAGS</samp>’ etc in +<samp class="file">config.site</samp> before configuring, or edit files <samp class="file">Makeconf</samp> +and <samp class="file">etc/Makeconf</samp> between running <code class="command">configure</code> and +<code class="command">make</code>). </p> <p>Having debugging symbols available is useful both when running R under a -debugger (e.g., <code>R -d gdb</code>) and when using sanitizers and -<code>valgrind</code>, all things intended for experts. +debugger (e.g., <code class="command">R -d gdb</code>) and when using sanitizers and +<code class="command">valgrind</code>, all things intended for experts. </p> <p>Debugging symbols (and some others) can be ‘stripped’ on installation by using </p><div class="example"> -<pre class="example">make install-strip +<pre class="example-preformatted">make install-strip </pre></div> <p>How well this is supported depends on the platform: it works best on -those using GNU <code>binutils</code>. On ‘<samp>x86_64</samp>’ Linux a typical +those using GNU <code class="code">binutils</code>. On ‘<samp class="samp">x86_64</samp>’ Linux a typical reduction in overall size was from 92MB to 66MB. On macOS debugging -symbols are not by default included in <samp>.dylib</samp> and <samp>.so</samp> +symbols are not by default included in <samp class="file">.dylib</samp> and <samp class="file">.so</samp> files, so there is negligible difference. </p> <hr> </div> -<div class="subsection" id="OpenMP-Support"> -<span id="OpenMP-Support-1"></span><h4 class="subsection">2.7.2 <abbr>OpenMP</abbr> Support</h4> +<div class="subsection-level-extent" id="OpenMP-Support"> +<h4 class="subsection" id="OpenMP-Support-1"><span>2.7.2 <abbr class="abbr">OpenMP</abbr> Support<a class="copiable-link" href="#OpenMP-Support-1"> ¶</a></span></h4> -<p>By default <code>configure</code> searches for suitable flags<a id="DOCF11" href="#FOOT11"><sup>11</sup></a> for <abbr>OpenMP</abbr> support for the C, C++ (default standard) +<p>By default <code class="command">configure</code> searches for suitable flags<a class="footnote" id="DOCF11" href="#FOOT11"><sup>11</sup></a> for <abbr class="abbr">OpenMP</abbr> support for the C, C++ (default standard) and Fortran compilers. </p> <p>Only the C result is currently used for R itself, and only if -<code>MAIN_LD</code>/<code>DYLIB_LD</code> were not specified. This can be +<code class="code">MAIN_LD</code>/<code class="code">DYLIB_LD</code> were not specified. This can be overridden by specifying </p><div class="example"> -<pre class="example">R_OPENMP_CFLAGS +<pre class="example-preformatted">R_OPENMP_CFLAGS </pre></div> -<p>Use for packages has similar restrictions (involving <code>SHLIB_LD</code> and +<p>Use for packages has similar restrictions (involving <code class="code">SHLIB_LD</code> and similar: note that as Fortran code is by default linked by the C (or -C++) compiler, both need to support <abbr>OpenMP</abbr>) and can be overridden by +C++) compiler, both need to support <abbr class="abbr">OpenMP</abbr>) and can be overridden by specifying some of </p><div class="example"> -<pre class="example">SHLIB_OPENMP_CFLAGS +<pre class="example-preformatted">SHLIB_OPENMP_CFLAGS SHLIB_OPENMP_CXXFLAGS SHLIB_OPENMP_FFLAGS </pre></div> -<p>Setting these to an empty value will disable <abbr>OpenMP</abbr> for that compiler -(and configuring with <samp>--disable-openmp</samp> will disable all -detection<a id="DOCF12" href="#FOOT12"><sup>12</sup></a> of <abbr>OpenMP</abbr>). The -<code>configure</code> detection test is to compile and link a standalone -<abbr>OpenMP</abbr> program, which is not the same as compiling a shared object and +<p>Setting these to an empty value will disable <abbr class="abbr">OpenMP</abbr> for that compiler +(and configuring with <samp class="option">--disable-openmp</samp> will disable all +detection<a class="footnote" id="DOCF12" href="#FOOT12"><sup>12</sup></a> of <abbr class="abbr">OpenMP</abbr>). The +<code class="command">configure</code> detection test is to compile and link a standalone +<abbr class="abbr">OpenMP</abbr> program, which is not the same as compiling a shared object and loading it into the C program of R’s executable. Note that overridden values are not tested. </p> <hr> </div> -<div class="subsection" id="C_002b_002b-Support"> -<span id="C_002b_002b-Support-1"></span><h4 class="subsection">2.7.3 C++ Support</h4> +<div class="subsection-level-extent" id="C_002b_002b-Support"> +<h4 class="subsection" id="C_002b_002b-Support-1"><span>2.7.3 C++ Support<a class="copiable-link" href="#C_002b_002b-Support-1"> ¶</a></span></h4> <p>C++ is not used by R itself, but support is provided for installing -packages with C++ code via <code>make</code> macros defined in file -<samp>etc/Makeconf</samp> (and with explanations in file <samp>config.site</samp>): +packages with C++ code via <code class="command">make</code> macros defined in file +<samp class="file">etc/Makeconf</samp> (and with explanations in file <samp class="file">config.site</samp>): </p><div class="example"> -<pre class="example">CXX +<pre class="example-preformatted">CXX CXXFLAGS CXXPICFLAGS CXXSTD @@ -1265,151 +1261,151 @@ CXX23FLAGS CXX23PICFLAGS </pre></div> -<p>The macros <code>CXX</code> etc are those used by default for C++ code. -<code>configure</code> will attempt to set the rest suitably, choosing for -<code>CXXSTD</code> and <code>CXX11STD</code> a suitable flag such as -<samp>-std=gnu++17</samp> for C++17 support (which is required if C++ is to be +<p>The macros <code class="code">CXX</code> etc are those used by default for C++ code. +<code class="command">configure</code> will attempt to set the rest suitably, choosing for +<code class="code">CXXSTD</code> and <code class="code">CXX11STD</code> a suitable flag such as +<samp class="option">-std=gnu++17</samp> for C++17 support (which is required if C++ is to be supported by default). Inferred values can be overridden in file -<samp>config.site</samp> or on the <code>configure</code> command line: +<samp class="file">config.site</samp> or on the <code class="command">configure</code> command line: user-supplied values will be tested by compiling some C++11/14/17/20/23 code. </p> <p>It may be that there is no suitable flag for C++14/17/20/23 support with the default compiler, in which case a different compiler could be -selected for <code>CXX14</code>/<code>CXX17</code>/<code>CXX20</code>/<code>CXX23</code> with its +selected for <code class="code">CXX14</code>/<code class="code">CXX17</code>/<code class="code">CXX20</code>/<code class="code">CXX23</code> with its corresponding flags. </p> <p>If no suitable compiler/flag is found for the default C++ compiler, one -can be set in file <samp>config.site</samp> <em>via</em> macros <code>CXX</code> -and <code>CXXSTD</code>. A user-specified compiler does not need to pass the +can be set in file <samp class="file">config.site</samp> <em class="emph">via</em> macros <code class="code">CXX</code> +and <code class="code">CXXSTD</code>. A user-specified compiler does not need to pass the C++17 tests, so do this at your own risk as some packages may not compile. </p> -<p>The <samp>-std</samp> flag is supported by the GCC, <code>clang++</code> and +<p>The <samp class="option">-std</samp> flag is supported by the GCC, <code class="command">clang++</code> and Intel compilers. Currently accepted values are (plus some synonyms) </p><div class="example"> -<pre class="example">g++: c++11 gnu+11 c++14 gnu++14 c++17 gnu++17 c++2a gnu++2a (from 8) +<pre class="example-preformatted">g++: c++11 gnu+11 c++14 gnu++14 c++17 gnu++17 c++2a gnu++2a (from 8) c++20 gnu++20 (from 10) c++23 gnu++23 c++2b gnu++2b (from 11) Intel: c++11 gnu+11 c++14 gnu++14 c++17 gnu++17 c++20 gnu++20 (from 2021.1) c++2b gnu++2b (from 2022.2) c++23 gnu++23 (at least from 2024.0) </pre></div> -<p>(Those for LLVM <code>clang++</code> are documented at -<a href="https://clang.llvm.org/cxx_status.html">https://clang.llvm.org/cxx_status.html</a>, and follow <code>g++</code>: -<code>-std=c++20</code> is supported from Clang 10, <code>-std=c++2b</code> from -Clang 13 and <code>-std=c++23</code> from Clang 17. Apple Clang supports -<code>-std=c++2b</code> from 13.1.6 and <code>-std=c++23</code> from 16.0.0.) +<p>(Those for LLVM <code class="command">clang++</code> are documented at +<a class="uref" href="https://clang.llvm.org/cxx_status.html">https://clang.llvm.org/cxx_status.html</a>, and follow <code class="code">g++</code>: +<code class="code">-std=c++20</code> is supported from Clang 10, <code class="code">-std=c++2b</code> from +Clang 13 and <code class="code">-std=c++23</code> from Clang 17. Apple Clang supports +<code class="code">-std=c++2b</code> from 13.1.6 and <code class="code">-std=c++23</code> from 16.0.0.) </p> -<p>‘Standards’ for <code>g++</code> starting with ‘<samp>gnu</samp>’ enable ‘GNU +<p>‘Standards’ for <code class="command">g++</code> starting with ‘<samp class="samp">gnu</samp>’ enable ‘GNU extensions’: what those are is hard to track down. </p> <p>For the use of C++ in R packages see the ‘Writing R Extensions’ manual. Prior to R 3.6.0 the default C++ standard was that of the compiler used: currently it is C++17. </p> -<p><a href="https://en.cppreference.com/w/cpp/compiler_support">https://en.cppreference.com/w/cpp/compiler_support</a> indicates +<p><a class="uref" href="https://en.cppreference.com/w/cpp/compiler_support">https://en.cppreference.com/w/cpp/compiler_support</a> indicates which versions of common compilers support (parts of) which C++ standards. GCC introduced C++17 support gradually, but version 7 should suffice. </p> <hr> </div> -<div class="subsection" id="C-standards"> -<span id="C-standards-1"></span><h4 class="subsection">2.7.4 C standards</h4> +<div class="subsection-level-extent" id="C-standards"> +<h4 class="subsection" id="C-standards-1"><span>2.7.4 C standards<a class="copiable-link" href="#C-standards-1"> ¶</a></span></h4> <p>Compiling R requires C99 or later: C11 and C17 are minor updates, but -the substantial update planned for ‘C23’ (now expected <em>ca</em> April +the substantial update planned for ‘C23’ (finally published in October 2024) will also be supported. </p> <p>As from R 4.3.0 there is support for packages to indicate their -preferred C version. Macros <code>CC17</code>, <code>C17FLAGS</code>, <code>CC23</code> -and <code>C23FLAGS</code> can be set in <samp>config.site</samp> (there are examples +preferred C version. Macros <code class="code">CC17</code>, <code class="code">C17FLAGS</code>, <code class="code">CC23</code> +and <code class="code">C23FLAGS</code> can be set in <samp class="file">config.site</samp> (there are examples there). Those for C17 should support C17 or earlier and not allow C23 -additions so for example <code>bool</code>, <code>true</code> and <code>false</code> can +additions so for example <code class="code">bool</code>, <code class="code">true</code> and <code class="code">false</code> can be used as identifiers. Those for C23 should support new types such as -<code>bool</code>. +<code class="code">bool</code>. </p> <p>Some compilers warn enthusiastically about prototypes. For most, -omitting <samp>-Wstrict-prototypes</samp> in <code>C17FLAGS</code> suffices. -However, versions 15 and later of LLVM <code>clang</code> and 14.0.3 and -later of Apple clang warn by default in all modes if <samp>-Wall</samp> or -<samp>-pedantic</samp> is used, and may need -<samp>-Wno-strict-prototypes</samp>. +omitting <samp class="option">-Wstrict-prototypes</samp> in <code class="code">C17FLAGS</code> suffices. +However, versions 15 and later of LLVM <code class="command">clang</code> and 14.0.3 and +later of Apple clang warn by default in all modes if <samp class="option">-Wall</samp> or +<samp class="option">-pedantic</samp> is used, and may need +<samp class="option">-Wno-strict-prototypes</samp>. </p> <hr> </div> -<div class="subsection" id="Link_002dTime-Optimization"> -<span id="Link_002dTime-Optimization-1"></span><h4 class="subsection">2.7.5 Link-Time Optimization</h4> +<div class="subsection-level-extent" id="Link_002dTime-Optimization"> +<h4 class="subsection" id="Link_002dTime-Optimization-1"><span>2.7.5 Link-Time Optimization<a class="copiable-link" href="#Link_002dTime-Optimization-1"> ¶</a></span></h4> -<p>There is support for using link-time optimization (<abbr>LTO</abbr>) if the toolchain -supports it: configure with flag <samp>--enable-lto</samp>. When <abbr>LTO</abbr> is +<p>There is support for using link-time optimization (<abbr class="abbr">LTO</abbr>) if the toolchain +supports it: configure with flag <samp class="option">--enable-lto</samp>. When <abbr class="abbr">LTO</abbr> is enabled it is used for compiled code in add-on packages unless the flag -<samp>--enable-lto=R</samp> is used<a id="DOCF13" href="#FOOT13"><sup>13</sup></a>. +<samp class="option">--enable-lto=R</samp> is used<a class="footnote" id="DOCF13" href="#FOOT13"><sup>13</sup></a>. </p> -<p>The main benefit seen to date from <abbr>LTO</abbr> has been detecting long-standing +<p>The main benefit seen to date from <abbr class="abbr">LTO</abbr> has been detecting long-standing bugs in the ways packages pass arguments to compiled code and between compilation units. Benchmarking in 2020 with -<code>gcc</code>/<code>gfortran</code> 10 showed gains of a few percent +<code class="command">gcc</code>/<code class="command">gfortran</code> 10 showed gains of a few percent in increased performance and reduction in installed size for builds without debug symbols, but large size reductions for some -packages<a id="DOCF14" href="#FOOT14"><sup>14</sup></a> with debug symbols. (Performance and size gains are said to be +packages<a class="footnote" id="DOCF14" href="#FOOT14"><sup>14</sup></a> with debug symbols. (Performance and size gains are said to be most often seen in complex C++ builds.) </p> -<p>Whether toolchains support <abbr>LTO</abbr> is often unclear: all of the C compiler, -the Fortran compiler<a id="DOCF15" href="#FOOT15"><sup>15</sup></a> and linker have +<p>Whether toolchains support <abbr class="abbr">LTO</abbr> is often unclear: all of the C compiler, +the Fortran compiler<a class="footnote" id="DOCF15" href="#FOOT15"><sup>15</sup></a> and linker have to support it, and support it by the same mechanism (so mixing compiler families may not work and a non-default linker may be needed). It has been supported by the GCC and LLVM projects for some years with diverging implementations. </p> -<p><abbr>LTO</abbr> support was added in 2011 for GCC 4.5 on Linux but was little +<p><abbr class="abbr">LTO</abbr> support was added in 2011 for GCC 4.5 on Linux but was little used before 2019: compiler support has steadily improved over those -years and <samp>--enable-lto=R</samp> is nowadays used for some routine -<acronym>CRAN</acronym> checking. +years and <samp class="option">--enable-lto=R</samp> is nowadays used for some routine +<abbr class="acronym">CRAN</abbr> checking. </p> -<p>Unfortunately <samp>--enable-lto</samp> may be accepted but silently do -nothing useful if some of the toolchain does not support <abbr>LTO</abbr>: this is +<p>Unfortunately <samp class="option">--enable-lto</samp> may be accepted but silently do +nothing useful if some of the toolchain does not support <abbr class="abbr">LTO</abbr>: this is less common than it once was. </p> -<p>Various macros can be set in file <samp>config.site</samp> to customize how -<abbr>LTO</abbr> is used. If the Fortran compiler is not of the same family as the -C/C++ compilers, set macro ‘<samp>LTO_FC</samp>’ (probably to empty). Macro -‘<samp>LTO_LD</samp>’ can be used to select an alternative linker should that be +<p>Various macros can be set in file <samp class="file">config.site</samp> to customize how +<abbr class="abbr">LTO</abbr> is used. If the Fortran compiler is not of the same family as the +C/C++ compilers, set macro ‘<samp class="samp">LTO_FC</samp>’ (probably to empty). Macro +‘<samp class="samp">LTO_LD</samp>’ can be used to select an alternative linker should that be needed. </p> <hr> -<div class="subsubsection" id="LTO-with-GCC"> -<span id="LTO-with-GCC-1"></span><h4 class="subsubsection">2.7.5.1 <abbr>LTO</abbr> with GCC</h4> +<div class="subsubsection-level-extent" id="LTO-with-GCC"> +<h4 class="subsubsection" id="LTO-with-GCC-1"><span>2.7.5.1 <abbr class="abbr">LTO</abbr> with GCC<a class="copiable-link" href="#LTO-with-GCC-1"> ¶</a></span></h4> <p>This has been tested on Linux with -<code>gcc</code>/<code>gfortran</code> 8 and later: that needed setting -(e.g. in <samp>config.site</samp>) +<code class="command">gcc</code>/<code class="command">gfortran</code> 8 and later: that needed setting +(e.g. in <samp class="file">config.site</samp>) </p><div class="example"> -<pre class="example">AR=gcc-ar +<pre class="example-preformatted">AR=gcc-ar RANLIB=gcc-ranlib </pre></div> <p>For non-system compilers or if those wrappers have not been installed one may need something like </p><div class="example"> -<pre class="example">AR="ar --plugin=/path/to/liblto_plugin.so" +<pre class="example-preformatted">AR="ar --plugin=/path/to/liblto_plugin.so" RANLIB="ranlib --plugin=/path/to/liblto_plugin.so" </pre></div> -<p>and <code>NM</code> may be needed to be set analogously. (If using an -<abbr>LTO</abbr>-enabled build to check packages, set environment variable -<code>UserNM</code><a id="DOCF16" href="#FOOT16"><sup>16</sup></a> to ‘<samp>gcc-nm</samp>’.) -</p> -<p>With GCC 5 and later it is possible to parallelize parts of the <abbr>LTO</abbr> -linking process: set the make macro ‘<samp>LTO</samp>’ to something like -‘<samp>LTO=-flto=8</samp>’ (to use 8 threads), for example in file -<samp>config.site</samp>. +<p>and <code class="code">NM</code> may be needed to be set analogously. (If using an +<abbr class="abbr">LTO</abbr>-enabled build to check packages, set environment variable +<code class="env">UserNM</code><a class="footnote" id="DOCF16" href="#FOOT16"><sup>16</sup></a> to ‘<samp class="samp">gcc-nm</samp>’.) +</p> +<p>With GCC 5 and later it is possible to parallelize parts of the <abbr class="abbr">LTO</abbr> +linking process: set the make macro ‘<samp class="samp">LTO</samp>’ to something like +‘<samp class="samp">LTO=-flto=8</samp>’ (to use 8 threads), for example in file +<samp class="file">config.site</samp>. </p> <p>Under some circumstances and for a few packages, the PIC flags have needed overriding on Linux with GCC 9: e.g use in -<samp>config.site</samp>: +<samp class="file">config.site</samp>: </p><div class="example"> -<pre class="example">CPICFLAGS=-fPIC +<pre class="example-preformatted">CPICFLAGS=-fPIC CXXPICFLAGS=-fPIC CXX11PICFLAGS=-fPIC CXX14PICFLAGS=-fPIC @@ -1418,70 +1414,70 @@ FPICFLAGS=-fPIC </pre></div> <p>We suggest only using these if the problem is encountered (it had not -been seen on <acronym>CRAN</acronym> with GCC 10–14 at the time of writing). +been seen on <abbr class="acronym">CRAN</abbr> with GCC 10–14 at the time of writing). </p> <p>Note that R may need to be re-compiled after even a minor update to the compiler (e.g. from 13.1 to 13.2). </p> <hr> </div> -<div class="subsubsection" id="LTO-with-LLVM"> -<span id="LTO-with-LLVM-1"></span><h4 class="subsubsection">2.7.5.2 <abbr>LTO</abbr> with LLVM</h4> +<div class="subsubsection-level-extent" id="LTO-with-LLVM"> +<h4 class="subsubsection" id="LTO-with-LLVM-1"><span>2.7.5.2 <abbr class="abbr">LTO</abbr> with LLVM<a class="copiable-link" href="#LTO-with-LLVM-1"> ¶</a></span></h4> -<p>LLVM supports another type of <abbr>LTO</abbr> called ‘Thin <abbr>LTO</abbr>’ as well as a similar -implementation to GCC, sometimes called ‘Full <abbr>LTO</abbr>’. (See -<a href="https://clang.llvm.org/docs/ThinLTO.html">https://clang.llvm.org/docs/ThinLTO.html</a>.) Currently the LLVM -compilers relevant to R are <code>clang</code> and <code>flang</code> for -which this can be selected by setting macro ‘<samp>LTO=-flto=thin</samp>’. LLVM +<p>LLVM supports another type of <abbr class="abbr">LTO</abbr> called ‘Thin <abbr class="abbr">LTO</abbr>’ as well as a similar +implementation to GCC, sometimes called ‘Full <abbr class="abbr">LTO</abbr>’. (See +<a class="uref" href="https://clang.llvm.org/docs/ThinLTO.html">https://clang.llvm.org/docs/ThinLTO.html</a>.) Currently the LLVM +compilers relevant to R are <code class="command">clang</code> and <code class="command">flang</code> for +which this can be selected by setting macro ‘<samp class="samp">LTO=-flto=thin</samp>’. LLVM has </p><div class="example"> -<pre class="example">AR=llvm-ar +<pre class="example-preformatted">AR=llvm-ar RANLIB=llvm-ranlib </pre></div> <p>(but macOS does not, and these are not needed there). Where the linker -supports a parallel backend for Thin <abbr>LTO</abbr> this can be specified <em>via</em> -the macro ‘<samp>LTO_LD</samp>’: see the URL above for per-linker settings and +supports a parallel backend for Thin <abbr class="abbr">LTO</abbr> this can be specified <em class="emph">via</em> +the macro ‘<samp class="samp">LTO_LD</samp>’: see the URL above for per-linker settings and further linking optimizations.) </p> <p>For example, on macOS one might use </p><div class="example"> -<pre class="example">LTO=-flto=thin +<pre class="example-preformatted">LTO=-flto=thin LTO_FC= LTO_LD=-Wl,-mllvm,-threads=4 </pre></div> -<p>to use Thin <abbr>LTO</abbr> with 4 threads for C/C++ code, but skip <abbr>LTO</abbr> for Fortran -code compiled with <code>gfortran</code>. +<p>to use Thin <abbr class="abbr">LTO</abbr> with 4 threads for C/C++ code, but skip <abbr class="abbr">LTO</abbr> for Fortran +code compiled with <code class="command">gfortran</code>. </p> -<p>It is said to be particularly beneficial to use <samp>-O3</samp> for -<code>clang</code> in conjunction with <abbr>LTO</abbr>. +<p>It is said to be particularly beneficial to use <samp class="option">-O3</samp> for +<code class="command">clang</code> in conjunction with <abbr class="abbr">LTO</abbr>. </p> -<p>It seems that <code>flang</code> may support <abbr>LTO</abbr>, but with no documentation +<p>It seems that <code class="command">flang</code> may support <abbr class="abbr">LTO</abbr>, but with no documentation as yet. </p> <p>The 2020s versions of Intel’s C/C++ compilers are based on LLVM and as -such support LLVM-style <abbr>LTO</abbr>, both ‘full’ and ‘thin’. This might use +such support LLVM-style <abbr class="abbr">LTO</abbr>, both ‘full’ and ‘thin’. This might use something like </p><div class="example"> -<pre class="example">LTO=-flto=thin -flto-jobs=8 +<pre class="example-preformatted">LTO=-flto=thin -flto-jobs=8 </pre></div> <hr> </div> -<div class="subsubsection" id="LTO-for-package-checking"> -<span id="LTO-for-package-checking-1"></span><h4 class="subsubsection">2.7.5.3 <abbr>LTO</abbr> for package checking</h4> +<div class="subsubsection-level-extent" id="LTO-for-package-checking"> +<h4 class="subsubsection" id="LTO-for-package-checking-1"><span>2.7.5.3 <abbr class="abbr">LTO</abbr> for package checking<a class="copiable-link" href="#LTO-for-package-checking-1"> ¶</a></span></h4> -<p><abbr>LTO</abbr> effectively compiles all the source code in a package as a single +<p><abbr class="abbr">LTO</abbr> effectively compiles all the source code in a package as a single compilation unit and so allows the compiler (with sufficient diagnostic -flags such as <samp>-Wall</samp>) to check consistency between what are +flags such as <samp class="option">-Wall</samp>) to check consistency between what are normally separate compilation units. </p> -<p>With <code>gcc</code>/<code>gfortran</code> 9.x and later<a id="DOCF17" href="#FOOT17"><sup>17</sup></a> <abbr>LTO</abbr> will flag inconsistencies in calls to Fortran +<p>With <code class="command">gcc</code>/<code class="command">gfortran</code> 9.x and later<a class="footnote" id="DOCF17" href="#FOOT17"><sup>17</sup></a> <abbr class="abbr">LTO</abbr> will flag inconsistencies in calls to Fortran subroutines/functions, both between Fortran source files and between -Fortran and C/C++. <code>gfortran</code> 8.4, 9.2 and later can help +Fortran and C/C++. <code class="command">gfortran</code> 8.4, 9.2 and later can help understanding these by extracting C prototypes from Fortran source files -with option <samp>-fc-prototypes-external</samp>, e.g. that (at the time -of writing) Fortran <code>LOGICAL</code> corresponds to <code>int_least32_t *</code> +with option <samp class="option">-fc-prototypes-external</samp>, e.g. that (at the time +of writing) Fortran <code class="code">LOGICAL</code> corresponds to <code class="code">int_least32_t *</code> in C. </p> @@ -1489,32 +1485,32 @@ </div> </div> </div> -<div class="section" id="Testing-a-Unix_002dalike-Installation"> -<span id="Testing-an-Installation"></span><h3 class="section">2.8 Testing an Installation</h3> +<div class="section-level-extent" id="Testing-a-Unix_002dalike-Installation"> +<h3 class="section" id="Testing-an-Installation"><span>2.8 Testing an Installation<a class="copiable-link" href="#Testing-an-Installation"> ¶</a></span></h3> <p>Full post-installation testing is possible only if the test files have been installed with </p> <div class="example"> -<pre class="example">make install-tests +<pre class="example-preformatted">make install-tests </pre></div> -<p>which populates a <samp>tests</samp> directory in the installation. +<p>which populates a <samp class="file">tests</samp> directory in the installation. </p> <p>If this has been done, two testing routes are available. The first is to move to the home directory of the R installation (as given by -<code>R RHOME</code> or from R as <code>R.home()</code>) and run +<code class="command">R RHOME</code> or from R as <code class="code">R.home()</code>) and run </p> <div class="example"> -<pre class="example">cd tests +<pre class="example-preformatted">cd tests ## followed by one of ../bin/R CMD make check ../bin/R CMD make check-devel ../bin/R CMD make check-all </pre></div> -<p>and other useful targets are <code>test-BasePackages</code> and -<code>test-Recommended</code> to run tests of the standard and recommended +<p>and other useful targets are <code class="code">test-BasePackages</code> and +<code class="code">test-Recommended</code> to run tests of the standard and recommended packages (if installed) respectively. </p> <p>This re-runs all the tests relevant to the installed R (including for @@ -1522,23 +1518,23 @@ checking the example code in the manuals nor making the standalone Rmath library. This can occasionally be useful when the operating environment has been changed, for example by OS updates or by substituting the -<acronym>BLAS</acronym> (see <a href="#Shared-BLAS">Shared BLAS</a>). +<abbr class="acronym">BLAS</abbr> (see <a class="pxref" href="#Shared-BLAS">Shared BLAS</a>). </p> <p>Parallel checking of packages may be possible: set the environment -variable <code>TEST_MC_CORES</code> to the maximum number of processes to be +variable <code class="env">TEST_MC_CORES</code> to the maximum number of processes to be run in parallel. This affects both checking the package examples (part -of <code>make check</code>) and package sources (part of <code>make -check-devel</code> and <code>make check-recommended</code>). It does require a -<code>make</code> command which supports the <code>make -j <var>n</var></code> +of <code class="command">make check</code>) and package sources (part of <code class="command">make +check-devel</code> and <code class="command">make check-recommended</code>). It does require a +<code class="command">make</code> command which supports the <code class="command">make -j <var class="var">n</var></code> option: most do. </p> <p>Alternatively, the installed R can be run, preferably with -<samp>--vanilla</samp>. Then -<span id="index-LC_005fCOLLATE"></span> +<samp class="option">--vanilla</samp>. Then +<a class="index-entry-id" id="index-LC_005fCOLLATE"></a> </p> <div class="example"> -<pre class="example">pdf("tests.pdf") ## optional, but prevents flashing graphics windows +<pre class="example-preformatted">pdf("tests.pdf") ## optional, but prevents flashing graphics windows Sys.setenv(LC_COLLATE = "C", LC_TIME = "C", LANGUAGE = "en") tools::testInstalledBasic("both") tools::testInstalledPackages(scope = "base") @@ -1547,25 +1543,25 @@ <p>runs the basic tests and then all the tests on the standard and recommended packages. These tests can be run from anywhere: the basic -tests write their results in the <samp>tests</samp> folder of the R home +tests write their results in the <samp class="file">tests</samp> folder of the R home directory and run fewer tests than the first approach: in particular they do not test things which need Internet access—that can be tested by </p><div class="example"> -<pre class="example">tools::testInstalledBasic("internet") +<pre class="example-preformatted">tools::testInstalledBasic("internet") </pre></div> <p>It is possible to test the installed packages (but not their -package-specific tests) by <code>testInstalledPackages</code> even if -<code>make install-tests</code> was not run. The outputs are written under the -current directory unless a different one is specified by <code>outDir</code>. +package-specific tests) by <code class="code">testInstalledPackages</code> even if +<code class="command">make install-tests</code> was not run. The outputs are written under the +current directory unless a different one is specified by <code class="code">outDir</code>. </p> <p>Note that the results may depend on the language set for times and messages: for maximal similarity to reference results you may want to try setting (before starting the R session) </p> <div class="example"> -<pre class="example">LANGUAGE=en +<pre class="example-preformatted">LANGUAGE=en </pre></div> <p>and use a UTF-8 or Latin-1 locale. @@ -1574,72 +1570,71 @@ <hr> </div> </div> -<div class="chapter" id="Installing-R-under-Windows"> -<span id="Installing-R-under-Windows-1"></span><h2 class="chapter">3 Installing R under Windows</h2> -<span id="index-Installing-under-Windows"></span> +<div class="chapter-level-extent" id="Installing-R-under-Windows"> +<h2 class="chapter" id="Installing-R-under-Windows-1"><span>3 Installing R under Windows<a class="copiable-link" href="#Installing-R-under-Windows-1"> ¶</a></span></h2> +<a class="index-entry-id" id="index-Installing-under-Windows"></a> <p>[The rest of this paragraph is only relevant after release.] -The <samp>bin/windows</samp> directory of a <acronym>CRAN</acronym> site contains +The <samp class="file">bin/windows</samp> directory of a <abbr class="acronym">CRAN</abbr> site contains binaries for a base distribution and a large number of add-on packages -from <acronym>CRAN</acronym> to run on 64-bit ‘<samp>x86_64</samp>’ Windows. +from <abbr class="acronym">CRAN</abbr> to run on 64-bit ‘<samp class="samp">x86_64</samp>’ Windows. </p> <p>R is most tested on current versions of Windows 10 and Windows Server 2022 with UTF-8 as the charset encoding. It works also on Windows 11. It runs on older versions of Windows, but normally with other charset encoding and -may require manual installation of the Universal C Runtime (<abbr>UCRT</abbr>). +may require manual installation of the Universal C Runtime (<abbr class="abbr">UCRT</abbr>). </p> <p>Your file system must allow long file names (as is likely except perhaps for some network-mounted systems). If it does not also support conversion to short name equivalents (a.k.a. DOS 8.3 names), then R -<em>must</em> be installed in a path that does not contain spaces. +<em class="emph">must</em> be installed in a path that does not contain spaces. </p> -<p>Installation is <em>via</em> the installer -<samp>R-4.4.2-win.exe</samp>. Just double-click on the icon and +<p>Installation is <em class="emph">via</em> the installer +<samp class="file">R-4.4.2patched-win.exe</samp>. Just double-click on the icon and follow the instructions. You can uninstall R from the Control Panel. </p> <p>You will be asked to choose a language for installation: that choice applies to both installation and un-installation but not to running R itself. </p> -<p>See the <a href="https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html">R -Windows <acronym>FAQ</acronym></a> for more details on the binary installer and for +<p>See the <a class="uref" href="https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html">R +Windows <abbr class="acronym">FAQ</abbr></a> for more details on the binary installer and for information on use on older Windows systems. </p> <hr> -<div class="section" id="Building-from-source"> -<span id="Building-from-source-1"></span><h3 class="section">3.1 Building from source</h3> +<div class="section-level-extent" id="Building-from-source"> +<h3 class="section" id="Building-from-source-1"><span>3.1 Building from source<a class="copiable-link" href="#Building-from-source-1"> ¶</a></span></h3> <p>It is possible to use other 64-bit toolchains (including ‘MSYS2’) with -<abbr>UCRT</abbr> support to build R, but this manual only documents that +<abbr class="abbr">UCRT</abbr> support to build R, but this manual only documents that used for recent binary distributions of R. When using other toolchains, makefiles of R and packages may need to be adapted. </p> <hr> -<div class="subsection" id="The-Windows-toolset"> -<span id="The-Windows-toolset-1"></span><h4 class="subsection">3.1.1 The Windows toolset</h4> +<div class="subsection-level-extent" id="The-Windows-toolset"> +<h4 class="subsection" id="The-Windows-toolset-1"><span>3.1.1 The Windows toolset<a class="copiable-link" href="#The-Windows-toolset-1"> ¶</a></span></h4> <p>The binary distribution of R is currently built with tools from -<a href="https://CRAN.R-project.org/bin/windows/Rtools/rtools44/rtools.html">Rtools44 +<a class="uref" href="https://CRAN.R-project.org/bin/windows/Rtools/rtools44/rtools.html">Rtools44 for Windows</a>. See -<a href="https://CRAN.R-project.org/bin/windows/base/howto-R-devel.html">Building -R and packages</a> for more details on how to use it. +<a class="uref" href="https://CRAN.R-project.org/bin/windows/base/howto-R-4.4.html">Building R-4.4 and packages on Windows</a> for more details on how to use it. </p> <p>The toolset includes compilers (currently GCC version 13.2.0 with selected additional patches) and runtime libraries from -<a href="http://mingw-w64.org/">the ‘MinGW-w64’ project</a> and a number of +<a class="uref" href="http://mingw-w64.org/">the ‘MinGW-w64’ project</a> and a number of pre-compiled static libraries and headers used by R and R -packages, compiled by <a href="https://mxe.cc/">’MXE’</a> (M cross environment, +packages, compiled by <a class="uref" href="https://mxe.cc/">’MXE’</a> (M cross environment, with updates maintained by Tomas Kalibera). The toolset also -includes build tools from the <a href="https://www.msys2.org/">the ’MSYS2’ +includes build tools from the <a class="uref" href="https://www.msys2.org/">the ’MSYS2’ project</a>. Additional build tools packaged by ’MSYS2’ may be installed -via a package manager (‘<samp>pacman</samp>’). +via a package manager (‘<samp class="samp">pacman</samp>’). </p> <p>There is also an experimental variant of Rtools44 with support for 64-bit -ARM CPUs (aarch64) via LLVM 17 toolchain using <code>clang</code>/<code>flang-new</code> compilers, -<code>lld</code> linker, and libc++. +ARM CPUs (aarch64) via LLVM 17 toolchain using <code class="command">clang</code>/<code class="command">flang-new</code> compilers, +<code class="command">lld</code> linker, and libc++. </p> <p>The toolsets used for 64-bit Windows from 2008 to 2022 were based on MinGW-w64. The assistance of Yu Gong at a crucial step in @@ -1649,110 +1644,110 @@ </p> <hr> </div> -<div class="subsection" id="LaTeX-on-Windows"> -<span id="LaTeX"></span><h4 class="subsection">3.1.2 LaTeX</h4> +<div class="subsection-level-extent" id="LaTeX-on-Windows"> +<h4 class="subsection" id="LaTeX"><span>3.1.2 LaTeX<a class="copiable-link" href="#LaTeX"> ¶</a></span></h4> <p>Both building R and checking packages need a distribution of LaTeX -installed, with the directory containing <code>pdflatex</code> on the path. +installed, with the directory containing <code class="command">pdflatex</code> on the path. </p> -<p>The ‘<samp>MiKTeX</samp>’ (<a href="https://miktex.org/">https://miktex.org/</a>) distribution of -LaTeX is that used on <acronym>CRAN</acronym>. This can be set up to install +<p>The ‘<samp class="samp">MiKTeX</samp>’ (<a class="uref" href="https://miktex.org/">https://miktex.org/</a>) distribution of +LaTeX is that used on <abbr class="acronym">CRAN</abbr>. This can be set up to install extra packages ‘on the fly’ (without asking), which is the simplest way -to use it. The ‘basic’ version of ‘<samp>MiKTeX</samp>’ will need to add some -packages.<a id="DOCF18" href="#FOOT18"><sup>18</sup></a> In any case ensure that the -<strong>inconsolata</strong> package is installed—you can check with the -‘<samp>MiKTeX</samp>’ Package Manager. +to use it. The ‘basic’ version of ‘<samp class="samp">MiKTeX</samp>’ will need to add some +packages.<a class="footnote" id="DOCF18" href="#FOOT18"><sup>18</sup></a> In any case ensure that the +<strong class="strong">inconsolata</strong> package is installed—you can check with the +‘<samp class="samp">MiKTeX</samp>’ Package Manager. </p> <p>It is also possible to use the TeX Live distribution from -<a href="https://www.tug.org/texlive/">https://www.tug.org/texlive/</a>. (The <acronym>CRAN</acronym> package -<a href="https://CRAN.R-project.org/package=tinytex"><strong>tinytex</strong></a> can install and manage a subset of TeX Live.) +<a class="uref" href="https://www.tug.org/texlive/">https://www.tug.org/texlive/</a>. (The <abbr class="acronym">CRAN</abbr> package +<a class="url" href="https://CRAN.R-project.org/package=tinytex"><strong class="strong">tinytex</strong></a> can install and manage a subset of TeX Live.) </p> <hr> </div> </div> -<div class="section" id="Checking-the-build"> -<span id="Checking-the-build-1"></span><h3 class="section">3.2 Checking the build</h3> +<div class="section-level-extent" id="Checking-the-build"> +<h3 class="section" id="Checking-the-build-1"><span>3.2 Checking the build<a class="copiable-link" href="#Checking-the-build-1"> ¶</a></span></h3> <p>You can test a build by running </p> <div class="example"> -<pre class="example">make check +<pre class="example-preformatted">make check </pre></div> <p>The recommended packages can be checked by </p> <div class="example"> -<pre class="example">make check-recommended +<pre class="example-preformatted">make check-recommended </pre></div> <p>Other levels of checking are </p> <div class="example"> -<pre class="example">make check-devel +<pre class="example-preformatted">make check-devel </pre></div> <p>for a more thorough check of the R functionality, and </p> <div class="example"> -<pre class="example">make check-all +<pre class="example-preformatted">make check-all </pre></div> -<p>for both <code>check-devel</code> and <code>check-recommended</code>. +<p>for both <code class="code">check-devel</code> and <code class="code">check-recommended</code>. </p> -<p>If a test fails, there will almost always be a <samp>.Rout.fail</samp> file in -the directory being checked (often <samp>tests/Examples</samp> or -<samp>tests</samp>): examine the file to help pinpoint the problem. +<p>If a test fails, there will almost always be a <samp class="file">.Rout.fail</samp> file in +the directory being checked (often <samp class="file">tests/Examples</samp> or +<samp class="file">tests</samp>): examine the file to help pinpoint the problem. </p> -<p>Parallel checking of package sources (part of <code>make check-devel</code> -and <code>make check-recommended</code>) is possible: see the environment -variable <code>TEST_MC_CORES</code> to the maximum number of processes to be +<p>Parallel checking of package sources (part of <code class="command">make check-devel</code> +and <code class="command">make check-recommended</code>) is possible: see the environment +variable <code class="env">TEST_MC_CORES</code> to the maximum number of processes to be run in parallel. </p> <hr> </div> -<div class="section" id="Testing-a-Windows-Installation"> -<span id="Testing-an-Installation-1"></span><h3 class="section">3.3 Testing an Installation</h3> +<div class="section-level-extent" id="Testing-a-Windows-Installation"> +<h3 class="section" id="Testing-an-Installation-1"><span>3.3 Testing an Installation<a class="copiable-link" href="#Testing-an-Installation-1"> ¶</a></span></h3> <p>The Windows installer contains a set of test files used when building R. </p> <p>The toolset is not needed to run these tests, but more comprehensive -analysis of errors will be given if <code>diff</code> is in the path. +analysis of errors will be given if <code class="command">diff</code> is in the path. </p> -<p>Launch either <code>Rgui</code> or <code>Rterm</code> (preferred), preferably with -<samp>--vanilla</samp>. Then run +<p>Launch either <code class="code">Rgui</code> or <code class="code">Rterm</code> (preferred), preferably with +<samp class="option">--vanilla</samp>. Then run </p> <div class="example"> -<pre class="example">Sys.setenv(LC_COLLATE = "C", LC_TIME="C", LANGUAGE = "en") +<pre class="example-preformatted">Sys.setenv(LC_COLLATE = "C", LC_TIME="C", LANGUAGE = "en") tools::testInstalledBasic("both") tools::testInstalledPackages(scope = "base") tools::testInstalledPackages(scope = "recommended") </pre></div> <p>runs the basic tests and then all the tests on the standard and recommended -packages. These tests can be run from anywhere: <code>testInstalledBasic</code> -writes results in the <samp>tests</samp> folder of the R home directory (as -given by <code>R.home()</code>) and <code>testInstalledPackages</code> under the current -directory unless a different one is specified by <code>outDir</code>. +packages. These tests can be run from anywhere: <code class="code">testInstalledBasic</code> +writes results in the <samp class="file">tests</samp> folder of the R home directory (as +given by <code class="code">R.home()</code>) and <code class="code">testInstalledPackages</code> under the current +directory unless a different one is specified by <code class="code">outDir</code>. </p> -<p>For the <samp>tests</samp> folder to be writeable, one normally needs to install -R to a directory other than the default <samp>C:\Program Files</samp>. The +<p>For the <samp class="file">tests</samp> folder to be writeable, one normally needs to install +R to a directory other than the default <samp class="file">C:\Program Files</samp>. The installer also allows to install R without Administrator privileges, see -the <a href="https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html">R Windows -<acronym>FAQ</acronym></a> for more details. +the <a class="uref" href="https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html">R Windows +<abbr class="acronym">FAQ</abbr></a> for more details. </p> -<p>The results of <code>example(md5sums)</code> when testing <strong>tools</strong> may +<p>The results of <code class="code">example(md5sums)</code> when testing <strong class="strong">tools</strong> may differ from the reference output as some files are installed with Windows’ CRLF line endings. Also, expect differences in -<samp>reg-plot-latin1.pdf</samp>. +<samp class="file">reg-plot-latin1.pdf</samp>. </p> -<p>One can also run tests from the toolset shell (e.g. <code>bash</code>) similarly +<p>One can also run tests from the toolset shell (e.g. <code class="command">bash</code>) similarly to a Unix-like installation. Move to the home directory of the R -installation (as given by <code>R RHOME</code> or from R as <code>R.home()</code>) +installation (as given by <code class="command">R RHOME</code> or from R as <code class="code">R.home()</code>) and run </p> <div class="example"> -<pre class="example">cd tests +<pre class="example-preformatted">cd tests ## followed by one of ../bin/R CMD make check ../bin/R CMD make check-devel @@ -1764,20 +1759,20 @@ <hr> </div> </div> -<div class="chapter" id="Installing-R-under-macOS"> -<span id="Installing-R-under-macOS-1"></span><h2 class="chapter">4 Installing R under macOS</h2> -<span id="index-macOS-1"></span> +<div class="chapter-level-extent" id="Installing-R-under-macOS"> +<h2 class="chapter" id="Installing-R-under-macOS-1"><span>4 Installing R under macOS<a class="copiable-link" href="#Installing-R-under-macOS-1"> ¶</a></span></h2> +<a class="index-entry-id" id="index-macOS-1"></a> <p>[The rest of this paragraph is only relevant after release.] -The front page of a <acronym>CRAN</acronym> site has a link ‘Download R for (Mac) +The front page of a <abbr class="acronym">CRAN</abbr> site has a link ‘Download R for (Mac) OS X’ which takes you to a new page. Two files are offered for download, -<samp>R-4.4.2-arm64.pkg</samp> and <samp>R-4.4.2-x86_64.pkg</samp>. +<samp class="file">R-4.4.2-arm64.pkg</samp> and <samp class="file">R-4.4.2-x86_64.pkg</samp>. Both are for macOS 11 or later (Big Sur, Monterey, Ventura, Sonoma, …). </p> -<p>The first is for ‘Apple Silicon’ (<em>aka</em> ‘M1’, ‘M2’, …) Macs, the -second for older Macs with an ‘<samp>x86_64</samp>’ (Intel) CPU. +<p>The first is for ‘Apple Silicon’ (<em class="emph">aka</em> ‘M1’, ‘M2’, …) Macs, the +second for older Macs with an ‘<samp class="samp">x86_64</samp>’ (Intel) CPU. </p> <p>It is important that if you use a binary installer package that your OS @@ -1788,11 +1783,11 @@ At the ‘Installation Type’ stage, note the option to ‘Customize’. This currently shows four components: everyone will need the ‘R Framework’ component: the remaining components are optional. (The ‘Tcl/Tk’ -component is needed to use package <strong>tcltk</strong>. The ‘Texinfo’ component +component is needed to use package <strong class="strong">tcltk</strong>. The ‘Texinfo’ component is only needed by those installing source packages or R from its sources.) </p> -<p>Note for Ventura users: installation from the <samp>Downloads</samp> folder +<p>Note for Ventura users: installation from the <samp class="file">Downloads</samp> folder may not be allowed or may require additional authorization, so we suggest you download somewhere else such as your desktop or home folder. </p> @@ -1805,166 +1800,166 @@ want this time …). </p> <p>Various parts of the build require XQuartz to be installed: see -<a href="https://www.xquartz.org/releases/">https://www.xquartz.org/releases/</a>.<a id="DOCF19" href="#FOOT19"><sup>19</sup></a> These include the <strong>tcltk</strong> package -and the <code>X11</code> graphics device: attempting to use these without +<a class="uref" href="https://www.xquartz.org/releases/">https://www.xquartz.org/releases/</a>.<a class="footnote" id="DOCF19" href="#FOOT19"><sup>19</sup></a> These include the <strong class="strong">tcltk</strong> package +and the <code class="code">X11</code> graphics device: attempting to use these without XQuartz will remind you. This is also needed for some -<span id="index-Cairo"></span> +<a class="index-entry-id" id="index-Cairo"></a> builds of the cairographics-based devices (which are not often used on -macOS) such as <code>png(type = "cairo")</code> and <code>svg()</code> and some -third-party packages (e.g. <a href="https://CRAN.R-project.org/package=rgl"><strong>rgl</strong></a>). +macOS) such as <code class="code">png(type = "cairo")</code> and <code class="code">svg()</code> and some +third-party packages (e.g. <a class="url" href="https://CRAN.R-project.org/package=rgl"><strong class="strong">rgl</strong></a>). </p> <p>If you update your macOS version, you should re-install R (and perhaps XQuartz): the installer may tailor the installation to the current version of the OS. </p> <p>Installers for R-patched and R-devel are usually available from -<a href="https://mac.R-project.org">https://mac.R-project.org</a>. (Some of these packages may be +<a class="uref" href="https://mac.R-project.org">https://mac.R-project.org</a>. (Some of these packages may be unsigned/not notarized: to install those Control/right/two-finger click, -select ‘<samp>Open With</samp>’ and ‘<samp>Installer</samp>’.) +select ‘<samp class="samp">Open With</samp>’ and ‘<samp class="samp">Installer</samp>’.) </p> -<p>For building R from source, see <a href="#macOS">macOS</a>. +<p>For building R from source, see <a class="ref" href="#macOS">macOS</a>. </p> <hr> -<div class="section" id="Running-R-under-macOS"> -<span id="Running-R-under-macOS-1"></span><h3 class="section">4.1 Running R under macOS</h3> +<div class="section-level-extent" id="Running-R-under-macOS"> +<h3 class="section" id="Running-R-under-macOS-1"><span>4.1 Running R under macOS<a class="copiable-link" href="#Running-R-under-macOS-1"> ¶</a></span></h3> -<p>There are two ways to run R on macOS from a <acronym>CRAN</acronym> binary +<p>There are two ways to run R on macOS from a <abbr class="acronym">CRAN</abbr> binary distribution. </p> <p>There is a GUI console normally installed with the R icon in -<samp>/Applications</samp> which you can run by double-clicking (e.g. from +<samp class="file">/Applications</samp> which you can run by double-clicking (e.g. from Launchpad or Finder). (If you cannot find it there it was possibly installed elsewhere so try searching for it in Spotlight.) This is -usually referred to as <small>R.APP</small> to distinguish it from command-line R: +usually referred to as <small class="sc">R.APP</small> to distinguish it from command-line R: its user manual is currently part of the macOS FAQ at -<a href="https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html">https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html</a> and -can be viewed from <small>R.APP</small>’s ‘Help’ menu. +<a class="uref" href="https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html">https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html</a> and +can be viewed from <small class="sc">R.APP</small>’s ‘Help’ menu. </p> -<p>You can run command-line R and <code>Rscript</code> from a -Terminal<a id="DOCF20" href="#FOOT20"><sup>20</sup></a> so these can be typed as commands +<p>You can run command-line R and <code class="command">Rscript</code> from a +Terminal<a class="footnote" id="DOCF20" href="#FOOT20"><sup>20</sup></a> so these can be typed as commands as on any other Unix-alike: see the next chapter of this manual. There are some small differences which may surprise users of R on other platforms, notably the default location of the personal library -directory (under <samp>~/Library/R</samp>, e.g. -<samp>~/Library/R/arm64/4.4/library</samp>), and that warnings, messages and -other output to <samp>stderr</samp> are highlighted in bold. +directory (under <samp class="file">~/Library/R</samp>, e.g. +<samp class="file">~/Library/R/arm64/4.4/library</samp>), and that warnings, messages and +other output to <samp class="file">stderr</samp> are highlighted in bold. </p> -<p>Those using the <code>zsh</code> shell (the default for new user accounts) -might find the command <code>R</code> being masked by the <code>zsh</code> -builtin <code>r</code> (which recalls commands). One can use a full path -to R in an alias, or add <code>disable r</code> to <samp>~/.zshrc</samp>. +<p>Those using the <code class="command">zsh</code> shell (the default for new user accounts) +might find the command <code class="command">R</code> being masked by the <code class="command">zsh</code> +builtin <code class="command">r</code> (which recalls commands). One can use a full path +to R in an alias, or add <code class="code">disable r</code> to <samp class="file">~/.zshrc</samp>. </p> -<p>It has been reported that running <small>R.APP</small> may fail if no preferences are +<p>It has been reported that running <small class="sc">R.APP</small> may fail if no preferences are stored, so if it fails when launched for the very first time, try it again (the first attempt will store some preferences). </p> -<p>Users of <small>R.APP</small> need to be aware of the ‘App Nap’ feature -(<a href="https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html">https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html</a>) +<p>Users of <small class="sc">R.APP</small> need to be aware of the ‘App Nap’ feature +(<a class="uref" href="https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html">https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html</a>) which can cause R tasks to appear to run very slowly when not producing output in the console. Here are ways to avoid it: </p> -<ul> -<li> Ensure that the console is completely visible (or at least the activity +<ul class="itemize mark-bullet"> +<li>Ensure that the console is completely visible (or at least the activity indicator at the top right corner is visible). -</li><li> In a Terminal, run +</li><li>In a Terminal, run <div class="example"> -<pre class="example">defaults write org.R-project.R NSAppSleepDisabled -bool YES +<pre class="example-preformatted">defaults write org.R-project.R NSAppSleepDisabled -bool YES </pre></div> -<p>(see <a href="https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html">https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html</a>). +<p>(see <a class="uref" href="https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html">https://developer.apple.com/library/archive/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html</a>). </p></li></ul> -<p>Using the <code>X11</code> graphics device or the X11-based versions of <code>View()</code> -and <code>edit()</code> for data frames and matrices (the latter are the -default for command-line R but not <small>R.APP</small>) requires -<a href="https://www.xquartz.org/">XQuartz</a> to be installed. +<p>Using the <code class="code">X11</code> graphics device or the X11-based versions of <code class="code">View()</code> +and <code class="code">edit()</code> for data frames and matrices (the latter are the +default for command-line R but not <small class="sc">R.APP</small>) requires +<a class="uref" href="https://www.xquartz.org/">XQuartz</a> to be installed. </p> <p>Under some rather nebulous circumstances messages have been seen from -<code>fontconfig</code> about missing/unreadable configuration files when -using cairo-based devices, especially <code>X11(type = "cairo")</code>. With -XQuartz installed there are two <code>fontconfig</code> areas from different +<code class="code">fontconfig</code> about missing/unreadable configuration files when +using cairo-based devices, especially <code class="code">X11(type = "cairo")</code>. With +XQuartz installed there are two <code class="code">fontconfig</code> areas from different versions and it can help to set </p><div class="example"> -<pre class="example">setenv FONTCONFIG_PATH /opt/X11/lib/X11/fontconfig +<pre class="example-preformatted">setenv FONTCONFIG_PATH /opt/X11/lib/X11/fontconfig </pre></div> <p>Another symptom has been that italic/oblique fonts are replaced by upright ones. </p> <hr> </div> -<div class="section" id="Uninstalling-under-macOS"> -<span id="Uninstalling-under-macOS-1"></span><h3 class="section">4.2 Uninstalling under macOS</h3> +<div class="section-level-extent" id="Uninstalling-under-macOS"> +<h3 class="section" id="Uninstalling-under-macOS-1"><span>4.2 Uninstalling under macOS<a class="copiable-link" href="#Uninstalling-under-macOS-1"> ¶</a></span></h3> -<p>R for macOS consists of two parts: the GUI (<small>R.APP</small>) and the R +<p>R for macOS consists of two parts: the GUI (<small class="sc">R.APP</small>) and the R framework. Un-installation is as simple as removing those folders -(e.g. by dragging them onto the Bin<a id="DOCF21" href="#FOOT21"><sup>21</sup></a>). The typical installation will install the GUI into the -<samp>/Applications/R.app</samp> folder and the R framework into the -<samp>/Library/Frameworks/R.framework</samp> folder. The links to <samp>R</samp> -and <samp>Rscript</samp> in <samp>/usr/local/bin</samp> should also be removed. +(e.g. by dragging them onto the Bin<a class="footnote" id="DOCF21" href="#FOOT21"><sup>21</sup></a>). The typical installation will install the GUI into the +<samp class="file">/Applications/R.app</samp> folder and the R framework into the +<samp class="file">/Library/Frameworks/R.framework</samp> folder. The links to <samp class="file">R</samp> +and <samp class="file">Rscript</samp> in <samp class="file">/usr/local/bin</samp> should also be removed. </p> <p>If you want to get rid of R more completely using a Terminal, simply run: </p> <div class="example"> -<pre class="example">sudo rm -Rf /Library/Frameworks/R.framework /Applications/R.app \ +<pre class="example-preformatted">sudo rm -Rf /Library/Frameworks/R.framework /Applications/R.app \ /usr/local/bin/R /usr/local/bin/Rscript </pre></div> -<p>The installation consists of up to four Apple packages:<a id="DOCF22" href="#FOOT22"><sup>22</sup></a> for the ‘Apple Silicon’ build, <code>org.R-project.arm64.R.fw.pkg</code>, -<code>org.R-project.arm64.R.GUI.pkg</code>, <code>org.r-project.arm64.tcltk</code> -and <code>org.r-project.arm64.texinfo</code>. You can use <code>sudo pkgutil +<p>The installation consists of up to four Apple packages:<a class="footnote" id="DOCF22" href="#FOOT22"><sup>22</sup></a> for the ‘Apple Silicon’ build, <code class="code">org.R-project.arm64.R.fw.pkg</code>, +<code class="code">org.R-project.arm64.R.GUI.pkg</code>, <code class="code">org.r-project.arm64.tcltk</code> +and <code class="code">org.r-project.arm64.texinfo</code>. You can use <code class="code">sudo pkgutil --forget</code> if you want the Apple Installer to forget about the package without deleting its files (useful for the R framework when installing multiple R versions in parallel), or after you have -deleted the files. <strong>NB:</strong> the package names are case-sensitive and +deleted the files. <strong class="strong">NB:</strong> the package names are case-sensitive and the R domain is named inconsistently. </p> <p>Uninstalling the Tcl/Tk and Texinfo components (which are installed under -<samp>/opt/R/arm64</samp> on a ‘<samp>arm64</samp>’ build and <samp>/opt/R/x86_64</samp> -for an ‘<samp>x86_64</samp>’ one) is not as simple. You can list the files +<samp class="file">/opt/R/arm64</samp> on a ‘<samp class="samp">arm64</samp>’ build and <samp class="file">/opt/R/x86_64</samp> +for an ‘<samp class="samp">x86_64</samp>’ one) is not as simple. You can list the files they installed in a Terminal by e.g. </p> <div class="example"> -<pre class="example">pkgutil --files org.r-project.arm64.tcltk +<pre class="example-preformatted">pkgutil --files org.r-project.arm64.tcltk pkgutil --files org.r-project.arm64.texinfo </pre></div> -<p>(For the ‘Intel build, replace <code>arm64</code> by <code>x86_64</code>.) -These are paths relative to <samp>/</samp>, the root of the file system. +<p>(For the ‘Intel build, replace <code class="code">arm64</code> by <code class="code">x86_64</code>.) +These are paths relative to <samp class="file">/</samp>, the root of the file system. </p> <p>If you are not compiling R nor installing packages from source you -could remove all of <samp>/opt/R/arm64</samp> or <samp>/opt/R/x86_64</samp>. +could remove all of <samp class="file">/opt/R/arm64</samp> or <samp class="file">/opt/R/x86_64</samp>. </p> <hr> </div> -<div class="section" id="Multiple-versions"> -<span id="Multiple-versions-1"></span><h3 class="section">4.3 Multiple versions</h3> +<div class="section-level-extent" id="Multiple-versions"> +<h3 class="section" id="Multiple-versions-1"><span>4.3 Multiple versions<a class="copiable-link" href="#Multiple-versions-1"> ¶</a></span></h3> -<p>The installer will remove any previous version<a id="DOCF23" href="#FOOT23"><sup>23</sup></a> of the R framework which it -finds installed. This can be avoided by using <code>pkgutil +<p>The installer will remove any previous version<a class="footnote" id="DOCF23" href="#FOOT23"><sup>23</sup></a> of the R framework which it +finds installed. This can be avoided by using <code class="command">pkgutil --forget</code> (see the previous section). However, note that different versions are installed under -<samp>/Library/Frameworks/R.framework/Versions</samp> as <samp>4.4-arm64</samp> (or -<samp>4.4-x86_64</samp>), <samp>4.3</samp> and so on, so it is not possible to have -different ‘<samp>4.x.y</samp>’ versions installed for the same ‘<samp>x</samp>’ and CPU +<samp class="file">/Library/Frameworks/R.framework/Versions</samp> as <samp class="file">4.4-arm64</samp> (or +<samp class="file">4.4-x86_64</samp>), <samp class="file">4.3</samp> and so on, so it is not possible to have +different ‘<samp class="samp">4.x.y</samp>’ versions installed for the same ‘<samp class="samp">x</samp>’ and CPU type. </p> -<p><small>R.APP</small> will always run the ‘current’ version of R, that is the last +<p><small class="sc">R.APP</small> will always run the ‘current’ version of R, that is the last installed version. </p> <hr> </div> </div> -<div class="chapter" id="Running-R"> -<span id="Running-R-1"></span><h2 class="chapter">5 Running R</h2> +<div class="chapter-level-extent" id="Running-R"> +<h2 class="chapter" id="Running-R-1"><span>5 Running R<a class="copiable-link" href="#Running-R-1"> ¶</a></span></h2> <p>How to start R and what command-line options are available is discussed in @@ -1974,139 +1969,139 @@ expects a stack size of at least 8MB and to be able to open at least 256 file descriptors. (Any modern OS should have default limits at least as large as these, but apparently NetBSD may not. Use the shell command -<code>ulimit</code> (<code>sh</code>/<code>bash</code>) or <code>limit</code> -(<code>csh</code>/<code>tcsh</code>) to check.) For some -compilers<a id="DOCF24" href="#FOOT24"><sup>24</sup></a> and packages a larger +<code class="command">ulimit</code> (<code class="command">sh</code>/<code class="command">bash</code>) or <code class="command">limit</code> +(<code class="command">csh</code>/<code class="command">tcsh</code>) to check.) For some +compilers<a class="footnote" id="DOCF24" href="#FOOT24"><sup>24</sup></a> and packages a larger stack size has been needed: 20-25MB has sufficed to date. </p> <p>R makes use of a number of environment variables, the default values -of many of which are set in file <samp><var>R_HOME</var>/etc/Renviron</samp> (there +of many of which are set in file <samp class="file"><var class="var">R_HOME</var>/etc/Renviron</samp> (there are none set by default on Windows and hence no such file). These are -set at <code>configure</code> time, and you would not normally want to -<span id="index-R_005fPAPERSIZE-1"></span> -change them – a possible exception is <code>R_PAPERSIZE</code> (see <a href="#Setting-paper-size">Setting paper size</a>). The paper size will be deduced from the ‘<samp>LC_PAPER</samp>’ -locale category if it exists and <code>R_PAPERSIZE</code> is unset, and this -will normally produce the right choice from ‘<samp>a4</samp>’ and ‘<samp>letter</samp>’ +set at <code class="command">configure</code> time, and you would not normally want to +<a class="index-entry-id" id="index-R_005fPAPERSIZE-1"></a> +change them – a possible exception is <code class="env">R_PAPERSIZE</code> (see <a class="pxref" href="#Setting-paper-size">Setting paper size</a>). The paper size will be deduced from the ‘<samp class="samp">LC_PAPER</samp>’ +locale category if it exists and <code class="env">R_PAPERSIZE</code> is unset, and this +will normally produce the right choice from ‘<samp class="samp">a4</samp>’ and ‘<samp class="samp">letter</samp>’ on modern Unix-alikes (but can always be overridden by setting -<code>R_PAPERSIZE</code>). +<code class="env">R_PAPERSIZE</code>). </p> <p>Various environment variables can be set to determine where R creates its per-session temporary directory. The environment variables -<span id="index-TMPDIR-1"></span> -<span id="index-TMP"></span> -<span id="index-TEMP"></span> -<code>TMPDIR</code>, <code>TMP</code> and <code>TEMP</code> are searched in turn and the +<a class="index-entry-id" id="index-TMPDIR-1"></a> +<a class="index-entry-id" id="index-TMP"></a> +<a class="index-entry-id" id="index-TEMP"></a> +<code class="env">TMPDIR</code>, <code class="env">TMP</code> and <code class="env">TEMP</code> are searched in turn and the first one which is set and points to a writable area is used. If none -do, the final default is <samp>/tmp</samp> on Unix-alikes and the value of -<span id="index-R_005fUSER"></span> -<code>R_USER</code> on Windows. The path should be an absolute path not -containing spaces<a id="DOCF25" href="#FOOT25"><sup>25</sup></a> -(and it is best to avoid non-alphanumeric characters such as <code>+</code> or +do, the final default is <samp class="file">/tmp</samp> on Unix-alikes and the value of +<a class="index-entry-id" id="index-R_005fUSER"></a> +<code class="env">R_USER</code> on Windows. The path should be an absolute path not +containing spaces<a class="footnote" id="DOCF25" href="#FOOT25"><sup>25</sup></a> +(and it is best to avoid non-alphanumeric characters such as <code class="code">+</code> or quotes). </p> <p>Some Unix-alike systems are set up to remove files and directories -periodically from <samp>/tmp</samp>, for example by a <code>cron</code> job -<span id="index-TMPDIR-2"></span> -running <code>tmpwatch</code>. Set <code>TMPDIR</code> to another directory +periodically from <samp class="file">/tmp</samp>, for example by a <code class="command">cron</code> job +<a class="index-entry-id" id="index-TMPDIR-2"></a> +running <code class="command">tmpwatch</code>. Set <code class="env">TMPDIR</code> to another directory before starting long-running jobs on such a system. </p> -<p>Note that <code>TMPDIR</code> will be used to execute <code>configure</code> -scripts when installing packages, so if <samp>/tmp</samp> has been mounted as -‘<samp>noexec</samp>’, <code>TMPDIR</code> needs to be set to a directory from which +<p>Note that <code class="env">TMPDIR</code> will be used to execute <code class="command">configure</code> +scripts when installing packages, so if <samp class="file">/tmp</samp> has been mounted as +‘<samp class="samp">noexec</samp>’, <code class="env">TMPDIR</code> needs to be set to a directory from which execution is allowed. </p> <hr> </div> -<div class="chapter" id="Add_002don-packages"> -<span id="Add_002don-packages-1"></span><h2 class="chapter">6 Add-on packages</h2> -<span id="index-Packages"></span> -<span id="index-Libraries"></span> +<div class="chapter-level-extent" id="Add_002don-packages"> +<h2 class="chapter" id="Add_002don-packages-1"><span>6 Add-on packages<a class="copiable-link" href="#Add_002don-packages-1"> ¶</a></span></h2> +<a class="index-entry-id" id="index-Packages"></a> +<a class="index-entry-id" id="index-Libraries"></a> -<p>It is helpful to use the correct terminology. A <em>package</em> is -loaded from a <em>library</em> by the function <code>library()</code>. Thus a +<p>It is helpful to use the correct terminology. A <em class="emph">package</em> is +loaded from a <em class="emph">library</em> by the function <code class="code">library()</code>. Thus a library is a directory containing installed packages; the main library -is <samp><var>R_HOME</var>/library</samp>, but others can be used, for example by -<span id="index-R_005fLIBS"></span> -setting the environment variable <code>R_LIBS</code> or using the R function -<code>.libPaths()</code>. To avoid any confusion you will often see a library +is <samp class="file"><var class="var">R_HOME</var>/library</samp>, but others can be used, for example by +<a class="index-entry-id" id="index-R_005fLIBS"></a> +setting the environment variable <code class="env">R_LIBS</code> or using the R function +<code class="code">.libPaths()</code>. To avoid any confusion you will often see a library directory referred to as a ‘library tree’. </p> <hr> -<div class="section" id="Default-packages"> -<span id="Default-packages-1"></span><h3 class="section">6.1 Default packages</h3> -<span id="index-Packages_002c-default"></span> +<div class="section-level-extent" id="Default-packages"> +<h3 class="section" id="Default-packages-1"><span>6.1 Default packages<a class="copiable-link" href="#Default-packages-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Packages_002c-default"></a> <p>The set of packages loaded on startup is by default </p> <div class="example"> -<pre class="example">> getOption("defaultPackages") +<pre class="example-preformatted">> getOption("defaultPackages") [1] "datasets" "utils" "grDevices" "graphics" "stats" "methods" </pre></div> -<p>(plus, of course, <strong>base</strong>) and this can be changed by setting the -option in startup code (e.g. in <samp>~/.Rprofile</samp>). It is initially -<span id="index-R_005fDEFAULT_005fPACKAGES"></span> -set to the value of the environment variable <code>R_DEFAULT_PACKAGES</code> if -set (as a comma-separated list). Setting <code>R_DEFAULT_PACKAGES=NULL</code> -ensures that only package <strong>base</strong> is loaded. +<p>(plus, of course, <strong class="strong">base</strong>) and this can be changed by setting the +option in startup code (e.g. in <samp class="file">~/.Rprofile</samp>). It is initially +<a class="index-entry-id" id="index-R_005fDEFAULT_005fPACKAGES"></a> +set to the value of the environment variable <code class="env">R_DEFAULT_PACKAGES</code> if +set (as a comma-separated list). Setting <code class="env">R_DEFAULT_PACKAGES=NULL</code> +ensures that only package <strong class="strong">base</strong> is loaded. </p> <p>Changing the set of default packages is normally used to reduce the set -for speed when scripting: in particular not using <strong>methods</strong> will +for speed when scripting: in particular not using <strong class="strong">methods</strong> will reduce the start-up time by a factor of up to two. But it can also be -used to customize R, e.g. for class use. <code>Rscript</code> -also checks the environment variable <code>R_SCRIPT_DEFAULT_PACKAGES</code>; -<span id="index-R_005fSCRIPT_005fDEFAULT_005fPACKAGES"></span> -if set, this takes precedence over <code>R_DEFAULT_PACKAGES</code>. +used to customize R, e.g. for class use. <code class="command">Rscript</code> +also checks the environment variable <code class="env">R_SCRIPT_DEFAULT_PACKAGES</code>; +<a class="index-entry-id" id="index-R_005fSCRIPT_005fDEFAULT_005fPACKAGES"></a> +if set, this takes precedence over <code class="env">R_DEFAULT_PACKAGES</code>. </p> <hr> </div> -<div class="section" id="Managing-libraries"> -<span id="Managing-libraries-1"></span><h3 class="section">6.2 Managing libraries</h3> -<span id="index-Libraries_002c-managing"></span> +<div class="section-level-extent" id="Managing-libraries"> +<h3 class="section" id="Managing-libraries-1"><span>6.2 Managing libraries<a class="copiable-link" href="#Managing-libraries-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Libraries_002c-managing"></a> -<p>R packages are installed into <em>libraries</em>, which are +<p>R packages are installed into <em class="emph">libraries</em>, which are directories in the file system containing a subdirectory for each package installed there. </p> -<p>R comes with a single library, <samp><var>R_HOME</var>/library</samp> which is -the value of the R object ‘<samp>.Library</samp>’ containing the standard and -recommended<a id="DOCF26" href="#FOOT26"><sup>26</sup></a> packages. +<p>R comes with a single library, <samp class="file"><var class="var">R_HOME</var>/library</samp> which is +the value of the R object ‘<samp class="samp">.Library</samp>’ containing the standard and +recommended<a class="footnote" id="DOCF26" href="#FOOT26"><sup>26</sup></a> packages. Both sites and users can create others and make use of them (or not) in -an R session. At the lowest level ‘<samp>.libPaths()</samp>’ can be used to +an R session. At the lowest level ‘<samp class="samp">.libPaths()</samp>’ can be used to add paths to the collection of libraries or to report the current collection. </p> -<span id="index-Libraries_002c-site"></span> -<span id="index-Site-libraries"></span> +<a class="index-entry-id" id="index-Libraries_002c-site"></a> +<a class="index-entry-id" id="index-Site-libraries"></a> <p>R will automatically make use of a site-specific library -<samp><var>R_HOME</var>/site-library</samp> if this exists (it does not in a +<samp class="file"><var class="var">R_HOME</var>/site-library</samp> if this exists (it does not in a vanilla R installation). This location can be overridden by -setting<a id="DOCF27" href="#FOOT27"><sup>27</sup></a> ‘<samp>.Library.site</samp>’ in -<samp><var>R_HOME</var>/etc/Rprofile.site</samp>, or (not recommended) by setting +setting<a class="footnote" id="DOCF27" href="#FOOT27"><sup>27</sup></a> ‘<samp class="samp">.Library.site</samp>’ in +<samp class="file"><var class="var">R_HOME</var>/etc/Rprofile.site</samp>, or (not recommended) by setting the -<span id="index-R_005fLIBS_005fSITE"></span> -environment variable <code>R_LIBS_SITE</code>. +<a class="index-entry-id" id="index-R_005fLIBS_005fSITE"></a> +environment variable <code class="env">R_LIBS_SITE</code>. </p> -<span id="index-Libraries_002c-user"></span> -<span id="index-User-libraries"></span> -<span id="index-R_005fLIBS_005fUSER"></span> +<a class="index-entry-id" id="index-Libraries_002c-user"></a> +<a class="index-entry-id" id="index-User-libraries"></a> +<a class="index-entry-id" id="index-R_005fLIBS_005fUSER"></a> <p>Users can have one or more libraries, normally specified by the -environment variable <code>R_LIBS_USER</code>. This has a default value (to -see it, use ‘<samp>Sys.getenv("R_LIBS_USER")</samp>’ within an R session), +environment variable <code class="env">R_LIBS_USER</code>. This has a default value (to +see it, use ‘<samp class="samp">Sys.getenv("R_LIBS_USER")</samp>’ within an R session), but that is only used if the corresponding directory actually exists (which by default it will not). </p> -<p>Both <code>R_LIBS_USER</code> and <code>R_LIBS_SITE</code> can specify multiple +<p>Both <code class="env">R_LIBS_USER</code> and <code class="env">R_LIBS_SITE</code> can specify multiple library paths, separated by colons (semicolons on Windows). </p> <hr> </div> -<div class="section" id="Installing-packages"> -<span id="Installing-packages-1"></span><h3 class="section">6.3 Installing packages</h3> -<span id="index-Packages_002c-installing"></span> +<div class="section-level-extent" id="Installing-packages"> +<h3 class="section" id="Installing-packages-1"><span>6.3 Installing packages<a class="copiable-link" href="#Installing-packages-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Packages_002c-installing"></a> @@ -2121,43 +2116,43 @@ more than one library, of course. </p> -<span id="index-TMPDIR-3"></span> -<p>Ensure that the environment variable <code>TMPDIR</code> is either unset (and -<samp>/tmp</samp> exists and can be written in and executed from) or is the +<a class="index-entry-id" id="index-TMPDIR-3"></a> +<p>Ensure that the environment variable <code class="env">TMPDIR</code> is either unset (and +<samp class="file">/tmp</samp> exists and can be written in and executed from) or is the absolute path to a valid temporary directory, not containing spaces. </p> <p>For most users it suffices to call -‘<samp>install.packages(<var>pkgname</var>)</samp>’ or its GUI equivalent if the -intention is to install a <acronym>CRAN</acronym> package and internet access is -available.<a id="DOCF28" href="#FOOT28"><sup>28</sup></a> On most systems ‘<samp>install.packages()</samp>’ +‘<samp class="samp">install.packages(<var class="var">pkgname</var>)</samp>’ or its GUI equivalent if the +intention is to install a <abbr class="acronym">CRAN</abbr> package and internet access is +available.<a class="footnote" id="DOCF28" href="#FOOT28"><sup>28</sup></a> On most systems ‘<samp class="samp">install.packages()</samp>’ will allow packages to be selected from a list box (typically with thousands of items). </p> <p>To install packages from source on a Unix-alike use in a terminal </p> <div class="example"> -<pre class="example">R CMD INSTALL -l /path/to/library <var>pkg1</var> <var>pkg2</var> … +<pre class="example-preformatted">R CMD INSTALL -l /path/to/library <var class="var">pkg1</var> <var class="var">pkg2</var> ... </pre></div> -<p>The part ‘<samp>-l /path/to/library</samp>’ can be omitted, in which case the +<p>The part ‘<samp class="samp">-l /path/to/library</samp>’ can be omitted, in which case the first library of a normal R session is used (that shown by -<code>.libPaths()[1]</code>). +<code class="code">.libPaths()[1]</code>). </p> -<p>There are a number of options available: use <code>R CMD INSTALL --help</code> +<p>There are a number of options available: use <code class="code">R CMD INSTALL --help</code> to see the current list. </p> -<span id="index-install_002epackages"></span> +<a class="index-entry-id" id="index-install_002epackages"></a> <p>Alternatively, packages can be downloaded and installed from within -R. First choose your nearest <acronym>CRAN</acronym> mirror using -<code>chooseCRANmirror()</code>. Then download and install packages -<strong>pkg1</strong> and <strong>pkg2</strong> by +R. First choose your nearest <abbr class="acronym">CRAN</abbr> mirror using +<code class="command">chooseCRANmirror()</code>. Then download and install packages +<strong class="strong">pkg1</strong> and <strong class="strong">pkg2</strong> by </p> <div class="example"> -<pre class="example">> install.packages(c("pkg1", "pkg2")) +<pre class="example-preformatted">> install.packages(c("pkg1", "pkg2")) </pre></div> <p>The essential dependencies of the specified packages will also be fetched. -Unless the library is specified (argument <code>lib</code>) the first library +Unless the library is specified (argument <code class="code">lib</code>) the first library in the library search path is used: if this is not writable, R will ask the user (in an interactive session) if the default personal library should be created, and if allowed to will install the packages there. @@ -2167,114 +2162,113 @@ that are not already installed, use e.g. </p> <div class="example"> -<pre class="example">> install.packages("Rcmdr", dependencies = TRUE) +<pre class="example-preformatted">> install.packages("Rcmdr", dependencies = TRUE) </pre></div> -<p><code>install.packages</code> can install a source package from a local -<samp>.tar.gz</samp> file (or a URL to such a file) by setting argument -<code>repos</code> to <code>NULL</code>: this will be selected automatically if the -name given is a single <samp>.tar.gz</samp> file. +<p><code class="code">install.packages</code> can install a source package from a local +<samp class="file">.tar.gz</samp> file (or a URL to such a file) by setting argument +<code class="code">repos</code> to <code class="code">NULL</code>: this will be selected automatically if the +name given is a single <samp class="file">.tar.gz</samp> file. </p> -<p><code>install.packages</code> can look in several repositories, specified as a -character vector by the argument <code>repos</code>: these can include a -<acronym>CRAN</acronym> mirror, Bioconductor, R-forge, rforge.net, +<p><code class="code">install.packages</code> can look in several repositories, specified as a +character vector by the argument <code class="code">repos</code>: these can include a +<abbr class="acronym">CRAN</abbr> mirror, Bioconductor, R-forge, rforge.net, local archives, local files, …). Function -<code>setRepositories()</code> can select amongst those repositories that the +<code class="code">setRepositories()</code> can select amongst those repositories that the R installation is aware of. </p> -<p>Something which sometimes puzzles users is that <code>install.packages()</code> +<p>Something which sometimes puzzles users is that <code class="code">install.packages()</code> may report that a package which they believe should be available is not found. Some possible reasons: -</p><ul> -<li> The package, such as <strong>grid</strong> or <strong>tcltk</strong>, is part of R +</p><ul class="itemize mark-bullet"> +<li>The package, such as <strong class="strong">grid</strong> or <strong class="strong">tcltk</strong>, is part of R itself and not otherwise available. -</li><li> The package is not in the available repositories, so check which have been +</li><li>The package is not in the available repositories, so check which have been selected by <div class="example"> -<pre class="example">getOption("repos") +<pre class="example-preformatted">getOption("repos") </pre></div> -</li><li> The package is available, but not for the current version of R or for +</li><li>The package is available, but not for the current version of R or for the type of OS (Unix/Windows). To retrieve the information on available -versions of package <code><var>pkg</var></code>, use +versions of package <code class="code"><var class="var">pkg</var></code>, use <div class="example"> -<pre class="example">av <- available.packages(filters=list()) -av[av[, "Package"] == <var>pkg</var>, ] +<pre class="example-preformatted">av <- available.packages(filters=list()) +av[av[, "Package"] == <var class="var">pkg</var>, ] </pre></div> -<p>in your R session, and look at the ‘<samp>Depends</samp>’ and ‘<samp>OS_type</samp>’ +<p>in your R session, and look at the ‘<samp class="samp">Depends</samp>’ and ‘<samp class="samp">OS_type</samp>’ fields (there may be more than one matching entry). If the package depends on a version of R later than the one in use, it is possible that an earlier version is available which will work with your version -of R: for <acronym>CRAN</acronym> look for ‘Old sources’ on the package’s -<acronym>CRAN</acronym> landing page and manually retrieve an appropriate version (of +of R: for <abbr class="acronym">CRAN</abbr> look for ‘Old sources’ on the package’s +<abbr class="acronym">CRAN</abbr> landing page and manually retrieve an appropriate version (of comparable age to your version of R). </p></li></ul> <p>Naive users sometimes forget that as well as installing a package, they -have to use <code>library</code> to make its functionality available. +have to use <code class="code">library</code> to make its functionality available. </p> <hr> -<div class="subsection" id="Windows-packages"> -<span id="Windows"></span><h4 class="subsection">6.3.1 Windows</h4> +<div class="subsection-level-extent" id="Windows-packages"> +<h4 class="subsection" id="Windows"><span>6.3.1 Windows<a class="copiable-link" href="#Windows"> ¶</a></span></h4> -<p>What <code>install.packages</code> does by default is different on Unix-alikes +<p>What <code class="code">install.packages</code> does by default is different on Unix-alikes (except macOS) and Windows. On Unix-alikes it consults the list of -available <em>source</em> packages on <acronym>CRAN</acronym> (or other +available <em class="emph">source</em> packages on <abbr class="acronym">CRAN</abbr> (or other repositories), downloads the latest version of the package sources, and -installs them (via <code>R CMD INSTALL</code>). On ‘<samp>x86_64</samp>’ Windows -it looks (by default) first at the list of <em>binary</em> versions of +installs them (via <code class="code">R CMD INSTALL</code>). On ‘<samp class="samp">x86_64</samp>’ Windows +it looks (by default) first at the list of <em class="emph">binary</em> versions of packages available for your version of R and downloads the latest versions (if any). If no binary version is available or the source version is newer, it will install the source versions of packages without compiled C/C++/Fortran code, and offer to do so for those with, -if <code>make</code> is available (and this can be tuned by option -<code>"install.packages.compile.from.source"</code>). +if <code class="command">make</code> is available (and this can be tuned by option +<code class="code">"install.packages.compile.from.source"</code>). </p> -<p>[At present binary packages are not distributed for ‘<samp>aarch64</samp>’ -Windows, so most of this subsection only applies to ‘<samp>x86_64</samp>’.] +<p>[At present binary packages are not distributed for ‘<samp class="samp">aarch64</samp>’ +Windows, so most of this subsection only applies to ‘<samp class="samp">x86_64</samp>’.] </p> -<p>On Windows <code>install.packages</code> can also install a binary package -from a local <samp>zip</samp> file (or the URL of such a file) by setting -argument <code>repos</code> to <code>NULL</code>. <code>Rgui.exe</code> has a menu -<code>Packages</code> with a GUI interface to <code>install.packages</code>, -<code>update.packages</code> and <code>library</code>. +<p>On Windows <code class="code">install.packages</code> can also install a binary package +from a local <samp class="file">zip</samp> file (or the URL of such a file) by setting +argument <code class="code">repos</code> to <code class="code">NULL</code>. <code class="code">Rgui.exe</code> has a menu +<code class="code">Packages</code> with a GUI interface to <code class="code">install.packages</code>, +<code class="code">update.packages</code> and <code class="code">library</code>. </p> <p>Windows binary packages for R were distributed as a single binary containing either or both architectures (32- and 64-bit). Prior to R 4.2.0, they might contain only the 32-bit architecture. </p> -<p><code>R CMD INSTALL</code> works in Windows to install source packages. No +<p><code class="command">R CMD INSTALL</code> works in Windows to install source packages. No additional tools are needed if the package does not contain compiled -code, and <code>install.packages(type="source")</code> will work for such -packages. Those with compiled code need the tools (see <a href="#The-Windows-toolset">The Windows toolset</a>). The tools are found automatically by R when installed by +code, and <code class="code">install.packages(type="source")</code> will work for such +packages. Those with compiled code need the tools (see <a class="ref" href="#The-Windows-toolset">The Windows toolset</a>). The tools are found automatically by R when installed by the toolset installer. See -<a href="https://cran.r-project.org/bin/windows/base/howto-R-devel.html">Building -R and packages</a> for more details. +<a class="uref" href="https://cran.r-project.org/bin/windows/base/howto-R-4.4.html">Building R-4.4 and packages on Windows</a> for more details. </p> <p>Occasional permission problems after unpacking source packages have been seen on some systems: these have been circumvented by setting the -environment variable <code>R_INSTALL_TAR</code> to ‘<samp>tar.exe</samp>’. -<span id="index-R_005fINSTALL_005fTAR"></span> +environment variable <code class="env">R_INSTALL_TAR</code> to ‘<samp class="samp">tar.exe</samp>’. +<a class="index-entry-id" id="index-R_005fINSTALL_005fTAR"></a> </p> <p>If you have only a source package that is known to work with current R and just want a binary Windows build of it, you could make use of the building service offered at -<a href="https://win-builder.r-project.org/">https://win-builder.r-project.org/</a>. +<a class="uref" href="https://win-builder.r-project.org/">https://win-builder.r-project.org/</a>. </p> -<p>For almost all packages <code>R CMD INSTALL</code> will attempt to install +<p>For almost all packages <code class="command">R CMD INSTALL</code> will attempt to install both 32- and 64-bit builds of a package if run from a 32/64-bit install of R (only 64-bit builds and installs are supported since R 4.2.0). It will report success if the installation of the architecture -of the running <code>R</code> succeeded, whether or not the other +of the running <code class="command">R</code> succeeded, whether or not the other architecture was successfully installed. The exceptions are packages -with a non-empty <samp>configure.win</samp> script or which make use of -<samp>src/Makefile.win</samp>. If <samp>configure.win</samp> does something -appropriate to both architectures use<a id="DOCF29" href="#FOOT29"><sup>29</sup></a> option -<samp>--force-biarch</samp>: otherwise <code>R CMD INSTALL +with a non-empty <samp class="file">configure.win</samp> script or which make use of +<samp class="file">src/Makefile.win</samp>. If <samp class="file">configure.win</samp> does something +appropriate to both architectures use<a class="footnote" id="DOCF29" href="#FOOT29"><sup>29</sup></a> option +<samp class="option">--force-biarch</samp>: otherwise <code class="command">R CMD INSTALL --merge-multiarch</code> can be applied to a source tarball to merge separate 32- and 64-bit installs. (This can only be applied to a tarball, and will only succeed if both installs succeed.) @@ -2287,71 +2281,71 @@ <hr> </div> -<div class="subsection" id="macOS-packages"> -<span id="macOS-1"></span><h4 class="subsection">6.3.2 macOS</h4> +<div class="subsection-level-extent" id="macOS-packages"> +<h4 class="subsection" id="macOS-1"><span>6.3.2 macOS<a class="copiable-link" href="#macOS-1"> ¶</a></span></h4> -<p>On macOS <code>install.packages</code> works as it does on other Unix-alike -systems, but there is an additional type <code>mac.binary</code> (available -for the <acronym>CRAN</acronym> distribution but not when compiling R from -source) which can be passed to <code>install.packages</code> in order to +<p>On macOS <code class="code">install.packages</code> works as it does on other Unix-alike +systems, but there is an additional type <code class="code">mac.binary</code> (available +for the <abbr class="acronym">CRAN</abbr> distribution but not when compiling R from +source) which can be passed to <code class="code">install.packages</code> in order to download and install binary packages from a suitable repository. These -binary package files for macOS have the extension ‘<samp>.tgz</samp>’. The -<small>R.APP</small> GUI provides menus for installation of either binary or source -packages, from <acronym>CRAN</acronym>, other repositories or local files. +binary package files for macOS have the extension ‘<samp class="samp">.tgz</samp>’. The +<small class="sc">R.APP</small> GUI provides menus for installation of either binary or source +packages, from <abbr class="acronym">CRAN</abbr>, other repositories or local files. </p> -<p>On R builds using binary packages, the default is type <code>both</code>: +<p>On R builds using binary packages, the default is type <code class="code">both</code>: this looks first at the list of binary packages available for your version of R and installs the latest versions (if any). If no binary version is available or the source version is newer, it will install the source versions of packages without compiled C/C++/Fortran code and offer -to do so for those with, if <code>make</code> is available. +to do so for those with, if <code class="command">make</code> is available. </p> <p>Note that most binary packages which include compiled code are tied to a particular series (e.g. R 4.4.x or 4.3.x) of R. </p> <p>Installing source packages which do not contain compiled code should work with no additional tools. For others you will need the ‘Command -Line Tools’ for <code>Xcode</code> and compilers which match those used to +Line Tools’ for <code class="command">Xcode</code> and compilers which match those used to build R, plus a Fortran compiler for packages which contain Fortran -code: see <a href="#macOS">macOS</a>. Packages with C/C++ source code which link to -Fortran libraries (which include the <acronym>BLAS</acronym> and <acronym>LAPACK</acronym> -libraries) will need either the Fortran compiler or, for <acronym>CRAN</acronym> +code: see <a class="ref" href="#macOS">macOS</a>. Packages with C/C++ source code which link to +Fortran libraries (which include the <abbr class="acronym">BLAS</abbr> and <abbr class="acronym">LAPACK</abbr> +libraries) will need either the Fortran compiler or, for <abbr class="acronym">CRAN</abbr> binary distributions of R, to specify </p><div class="example"> -<pre class="example">FLIBS = -L/Library/Frameworks/R.framework/Resources/lib -lgfortran -lquadmath +<pre class="example-preformatted">FLIBS = -L/Library/Frameworks/R.framework/Resources/lib -lgfortran -lquadmath </pre></div> -<p>in a <samp>Makevars</samp> file (see the next section) to point to the Fortran +<p>in a <samp class="file">Makevars</samp> file (see the next section) to point to the Fortran libraries in the binary distribution. </p> -<p>Package <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and those which depend on it need a Java runtime +<p>Package <a class="url" href="https://CRAN.R-project.org/package=rJava"><strong class="strong">rJava</strong></a> and those which depend on it need a Java runtime installed and several packages need X11 installed, including those using -Tk. See <a href="#macOS">macOS</a> and <a href="#Java-_0028macOS_0029">Java</a>. Package <a href="https://CRAN.R-project.org/package=rjags"><strong>rjags</strong></a> -needs a build of JAGS installed under <samp>/usr/local</samp>, such as those +Tk. See <a class="ref" href="#macOS">macOS</a> and <a class="ref" href="#Java-_0028macOS_0029">Java</a>. Package <a class="url" href="https://CRAN.R-project.org/package=rjags"><strong class="strong">rjags</strong></a> +needs a build of JAGS installed under <samp class="file">/usr/local</samp>, such as those at -<a href="https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/">https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/</a>. +<a class="uref" href="https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/">https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/</a>. </p> -<p>Tcl/Tk extension <code>BWidget</code> used to be -distributed with R but no longer is; <code>Tktable</code> has been +<p>Tcl/Tk extension <code class="code">BWidget</code> used to be +distributed with R but no longer is; <code class="code">Tktable</code> has been distributed with recent versions of R. </p> <p>The default compilers specified are shown in file -<samp>/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp>. At +<samp class="file">/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp>. At the time of writing those settings assumed that the C, Fortran and C++ -compilers were on the path (see <a href="#macOS">macOS</a>). The settings can be +compilers were on the path (see <a class="ref" href="#macOS">macOS</a>). The settings can be changed, either by editing that file or in a file such as -<samp>~/.R/Makevars</samp> (see the next section). Entries which may need to -be changed include ‘<samp>CC</samp>’, ‘<samp>CXX</samp>’, ‘<samp>FC</samp>’, ‘<samp>FLIBS</samp>’ and -the corresponding flags, and perhaps ‘<samp>CXXCPP</samp>’, ‘<samp>DYLIB_LD</samp>’, -‘<samp>MAIN_LD</samp>’, ‘<samp>SHLIB_CXXLD</samp>’ and ‘<samp>SHLIB_LD</samp>’, as well as their -‘<samp>CXX11</samp>’, ‘<samp>CXX14</samp>’, ‘<samp>CXX17</samp>’ and ‘<samp>CXX20</samp>’ variants. +<samp class="file">~/.R/Makevars</samp> (see the next section). Entries which may need to +be changed include ‘<samp class="samp">CC</samp>’, ‘<samp class="samp">CXX</samp>’, ‘<samp class="samp">FC</samp>’, ‘<samp class="samp">FLIBS</samp>’ and +the corresponding flags, and perhaps ‘<samp class="samp">CXXCPP</samp>’, ‘<samp class="samp">DYLIB_LD</samp>’, +‘<samp class="samp">MAIN_LD</samp>’, ‘<samp class="samp">SHLIB_CXXLD</samp>’ and ‘<samp class="samp">SHLIB_LD</samp>’, as well as their +‘<samp class="samp">CXX11</samp>’, ‘<samp class="samp">CXX14</samp>’, ‘<samp class="samp">CXX17</samp>’ and ‘<samp class="samp">CXX20</samp>’ variants. </p> <p>So for example you could select a specific LLVM -<code>clang</code> for both C and C++ with extensive checking by having in -<samp>~/.R/Makevars</samp> +<code class="command">clang</code> for both C and C++ with extensive checking by having in +<samp class="file">~/.R/Makevars</samp> </p><div class="example"> -<pre class="example">SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk +<pre class="example-preformatted">SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk CC = /usr/local/clang/bin/clang -isysroot $(SDK) CXX = /usr/local/clang/bin/clang++ -isysroot $(SDK) CXX11 = $CXX @@ -2367,11 +2361,11 @@ CXX20FLAGS = $CXXFLAGS CXX23FLAGS = $CXXFLAGS </pre></div> -<p>(the current SDK can be found by running <code>xcrun -show-sdk-path</code>) -and for the current macOS distribution of <code>gfortran</code> at -<a href="https://mac.r-project.org/tools/">https://mac.r-project.org/tools/</a> +<p>(the current SDK can be found by running <code class="command">xcrun -show-sdk-path</code>) +and for the current macOS distribution of <code class="command">gfortran</code> at +<a class="uref" href="https://mac.r-project.org/tools/">https://mac.r-project.org/tools/</a> </p><div class="example"> -<pre class="example">FC = /opt/gfortran/bin/gfortran +<pre class="example-preformatted">FC = /opt/gfortran/bin/gfortran (arm64) FLIBS = -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lemutls_w -lquadmath @@ -2381,47 +2375,47 @@ </pre></div> <p>(line broken here for the manual only). </p> -<p>If that <code>clang</code> build -supports <abbr>OpenMP</abbr>, you can add +<p>If that <code class="command">clang</code> build +supports <abbr class="abbr">OpenMP</abbr>, you can add </p><div class="example"> -<pre class="example">SHLIB_OPENMP_CFLAGS = -fopenmp +<pre class="example-preformatted">SHLIB_OPENMP_CFLAGS = -fopenmp SHLIB_OPENMP_CXXFLAGS = -fopenmp </pre></div> -<p>to compile <abbr>OpenMP</abbr>-using packages. It will also be necessary to arrange -for the <code>libomp.dylib</code> library to be found at both install time and run +<p>to compile <abbr class="abbr">OpenMP</abbr>-using packages. It will also be necessary to arrange +for the <code class="code">libomp.dylib</code> library to be found at both install time and run time, for example by copying/linking it somewhere that is searched such -as <samp>/usr/local/lib</samp>. +as <samp class="file">/usr/local/lib</samp>. </p> <p>Apple includes many Open Source libraries in macOS but increasingly without the corresponding headers (not even in Xcode nor the Command Line Tools): they are often rather old versions. If installing packages from source using them it is usually easiest to install a statically-linked up-to-date copy of the Open Source package from its -sources or from <a href="https://mac.r-project.org/bin/">https://mac.r-project.org/bin/</a>. +sources or from <a class="uref" href="https://mac.r-project.org/bin/">https://mac.r-project.org/bin/</a>. But sometimes it is desirable/necessary to use Apple’s dynamically linked library, in which case appropriate headers could be extracted -from the sources<a id="DOCF30" href="#FOOT30"><sup>30</sup></a> available <em>via</em> -<a href="https://opensource.apple.com/releases">https://opensource.apple.com/releases</a> – this has been used for -<code>iodbc</code>. +from the sources<a class="footnote" id="DOCF30" href="#FOOT30"><sup>30</sup></a> available <em class="emph">via</em> +<a class="uref" href="https://opensource.apple.com/releases">https://opensource.apple.com/releases</a> – this has been used for +<code class="code">iodbc</code>. </p> <p>Some care may be needed with selecting compilers when installing external software for use with packages. The ‘system’ compilers as used when -building R are <code>clang</code> and <code>clang++</code>, but the Apple -toolchain also provides compilers called <code>gcc</code> and <code>g++</code> -which despite their names are based on LLVM and <code>libc++</code> like the +building R are <code class="command">clang</code> and <code class="command">clang++</code>, but the Apple +toolchain also provides compilers called <code class="command">gcc</code> and <code class="command">g++</code> +which despite their names are based on LLVM and <code class="code">libc++</code> like the system ones and which behave in almost the same way as the system ones. -Most Open Source software has a <code>configure</code> script developed -using GNU <code>autoconf</code> and hence will select <code>gcc</code> and -<code>g++</code> as the default compilers: this usually works fine. For +Most Open Source software has a <code class="command">configure</code> script developed +using GNU <code class="command">autoconf</code> and hence will select <code class="command">gcc</code> and +<code class="command">g++</code> as the default compilers: this usually works fine. For consistency one can use </p> <div class="example"> -<pre class="example">./configure CC=clang CFLAGS=-O2 CXX=clang++ CXXFLAGS=-O2 +<pre class="example-preformatted">./configure CC=clang CFLAGS=-O2 CXX=clang++ CXXFLAGS=-O2 </pre></div> -<p>(avoiding <code>autoconf</code>’s default <samp>-g</samp>). -As from R 4.3.0, <code>R CMD INSTALL</code> and -<code>install.packages()</code> try to invoke <code>configure</code> with the +<p>(avoiding <code class="command">autoconf</code>’s default <samp class="option">-g</samp>). +As from R 4.3.0, <code class="command">R CMD INSTALL</code> and +<code class="code">install.packages()</code> try to invoke <code class="command">configure</code> with the same compilers and flags used to build R. </p> @@ -2430,39 +2424,39 @@ <hr> </div> -<div class="subsection" id="Customizing-package-compilation"> -<span id="Customizing-package-compilation-1"></span><h4 class="subsection">6.3.3 Customizing package compilation</h4> +<div class="subsection-level-extent" id="Customizing-package-compilation"> +<h4 class="subsection" id="Customizing-package-compilation-1"><span>6.3.3 Customizing package compilation<a class="copiable-link" href="#Customizing-package-compilation-1"> ¶</a></span></h4> <p>The R system and package-specific compilation flags can be overridden or added to by setting the appropriate Make variables in the personal -file <samp><var>HOME</var>/.R/Makevars-<var>R_PLATFORM</var></samp> (but -<samp><var>HOME</var>/.R/Makevars.win</samp> or <samp><var>HOME</var>/.R/Makevars.win64</samp> -on Windows), or if that does not exist, <samp><var>HOME</var>/.R/Makevars</samp>, -where ‘<samp>R_PLATFORM</samp>’ is the platform for which R was built, as -available in the <code>platform</code> component of the R variable -<code>R.version</code>. The full path to an alternative personal -file<a id="DOCF31" href="#FOOT31"><sup>31</sup></a> can be specified <em>via</em> the environment variable -<code>R_MAKEVARS_USER</code>. +file <samp class="file"><var class="var">HOME</var>/.R/Makevars-<var class="var">R_PLATFORM</var></samp> (but +<samp class="file"><var class="var">HOME</var>/.R/Makevars.win</samp> or <samp class="file"><var class="var">HOME</var>/.R/Makevars.win64</samp> +on Windows), or if that does not exist, <samp class="file"><var class="var">HOME</var>/.R/Makevars</samp>, +where ‘<samp class="samp">R_PLATFORM</samp>’ is the platform for which R was built, as +available in the <code class="code">platform</code> component of the R variable +<code class="code">R.version</code>. The full path to an alternative personal +file<a class="footnote" id="DOCF31" href="#FOOT31"><sup>31</sup></a> can be specified <em class="emph">via</em> the environment variable +<code class="env">R_MAKEVARS_USER</code>. </p> <p>Package developers are encouraged to use this mechanism to enable a reasonable amount of diagnostic messaging (“warnings”) when compiling, -such as e.g. <samp>-Wall -pedantic</samp> for tools from GCC, the GNU -Compiler Collection, and for LLVM (<code>clang</code> and <code>flang-new</code>). +such as e.g. <samp class="option">-Wall -pedantic</samp> for tools from GCC, the GNU +Compiler Collection, and for LLVM (<code class="command">clang</code> and <code class="command">flang-new</code>). </p> <p>Note that this mechanism can also be used when it is necessary to change the optimization level whilst installing a particular package. For example </p> <div class="example"> -<pre class="example">## <span class="roman">for C code</span> +<pre class="example-preformatted">## <span class="r">for C code</span> CFLAGS = -g -O -mtune=native -## <span class="roman">for C++ code</span> +## <span class="r">for C++ code</span> CXXFLAGS = -g -O -mtune=native -## <span class="roman">for C++11 code</span> +## <span class="r">for C++11 code</span> CXX11FLAGS = -g -O -mtune=native -## <span class="roman">for fixed-form Fortran code</span> +## <span class="r">for fixed-form Fortran code</span> FFLAGS = -g -O -mtune=native -## <span class="roman">for C17 code</span> +## <span class="r">for C17 code</span> C17FLAGS = -g -O -mtune=native -Wno-strict-prototypes </pre></div> @@ -2470,11 +2464,11 @@ set the flag(s) appropriate to that standard. </p> <p>Another use is to override the settings in a binary installation of R. -For example, for the current distribution of <code>gfortran</code> at -<a href="https://mac.r-project.org/tools/">https://mac.r-project.org/tools/</a> +For example, for the current distribution of <code class="command">gfortran</code> at +<a class="uref" href="https://mac.r-project.org/tools/">https://mac.r-project.org/tools/</a> </p> <div class="example"> -<pre class="example">FC = /opt/gfortran/bin/gfortran +<pre class="example-preformatted">FC = /opt/gfortran/bin/gfortran (arm64) FLIBS = -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lemutls_w -lquadmath @@ -2485,20 +2479,20 @@ <p>(line broken here for the manual only). </p> -<p>There is also provision for a site-wide <samp>Makevars.site</samp> file under -<samp><var>R_HOME</var>/etc</samp> (in a sub-architecture-specific directory if -appropriate). This is read immediately after <samp>Makeconf</samp>, and the +<p>There is also provision for a site-wide <samp class="file">Makevars.site</samp> file under +<samp class="file"><var class="var">R_HOME</var>/etc</samp> (in a sub-architecture-specific directory if +appropriate). This is read immediately after <samp class="file">Makeconf</samp>, and the path to an alternative file can be specified by environment variable -<code>R_MAKEVARS_SITE</code>. +<code class="env">R_MAKEVARS_SITE</code>. </p> <p>Note that these mechanisms do not work with packages which fail to pass -settings down to sub-makes, perhaps reading <samp>etc/Makeconf</samp> in +settings down to sub-makes, perhaps reading <samp class="file">etc/Makeconf</samp> in makefiles in subdirectories. Fortunately such packages are unusual. </p> <hr> </div> -<div class="subsection" id="Multiple-sub_002darchitectures"> -<span id="Multiple-sub_002darchitectures-1"></span><h4 class="subsection">6.3.4 Multiple sub-architectures</h4> +<div class="subsection-level-extent" id="Multiple-sub_002darchitectures"> +<h4 class="subsection" id="Multiple-sub_002darchitectures-1"><span>6.3.4 Multiple sub-architectures<a class="copiable-link" href="#Multiple-sub_002darchitectures-1"> ¶</a></span></h4> <p>When installing packages from their sources, there are some extra considerations on installations which use sub-architectures. These were @@ -2509,18 +2503,18 @@ multiple sub-architectures, the normal installation process installs the packages for all sub-architectures. The exceptions are </p> -<dl compact="compact"> -<dt><span><em>Unix-alikes</em></span></dt> +<dl class="table"> +<dt><em class="emph">Unix-alikes</em></dt> <dd> -<p>where there is an <samp>configure</samp> script, or a file <samp>src/Makefile</samp>. +<p>where there is an <samp class="file">configure</samp> script, or a file <samp class="file">src/Makefile</samp>. </p> </dd> -<dt><span><em>Windows</em></span></dt> +<dt><em class="emph">Windows</em></dt> <dd> -<p>where there is a non-empty <samp>configure.win</samp> script, or a file -<samp>src/Makefile.win</samp> (with some exceptions where the package is known -to have an architecture-independent <samp>configure.win</samp>, or if -<samp>--force-biarch</samp> or field ‘<samp>Biarch</samp>’ in the <samp>DESCRIPTION</samp> +<p>where there is a non-empty <samp class="file">configure.win</samp> script, or a file +<samp class="file">src/Makefile.win</samp> (with some exceptions where the package is known +to have an architecture-independent <samp class="file">configure.win</samp>, or if +<samp class="option">--force-biarch</samp> or field ‘<samp class="samp">Biarch</samp>’ in the <samp class="file">DESCRIPTION</samp> file is used to assert so). </p> </dd> @@ -2530,27 +2524,27 @@ sub-architectures can be installed by </p> <div class="example"> -<pre class="example">R CMD INSTALL --libs-only <var>pkg</var> +<pre class="example-preformatted">R CMD INSTALL --libs-only <var class="var">pkg</var> </pre></div> -<p>using the path to <code>R</code> or <code>R --arch</code> to select the -additional sub-architecture. There is also <code>R CMD INSTALL +<p>using the path to <code class="command">R</code> or <code class="command">R --arch</code> to select the +additional sub-architecture. There is also <code class="command">R CMD INSTALL --merge-multiarch</code> to build and merge the two architectures, starting with a source tarball. </p> <hr> </div> -<div class="subsection" id="Byte_002dcompilation"> -<span id="Byte_002dcompilation-1"></span><h4 class="subsection">6.3.5 Byte-compilation</h4> +<div class="subsection-level-extent" id="Byte_002dcompilation"> +<h4 class="subsection" id="Byte_002dcompilation-1"><span>6.3.5 Byte-compilation<a class="copiable-link" href="#Byte_002dcompilation-1"> ¶</a></span></h4> <p>Packages are by default byte-compiled on installation. Byte-compilation can be controlled on a per-package basis by the -‘<samp>ByteCompile</samp>’ field in the <samp>DESCRIPTION</samp> file. +‘<samp class="samp">ByteCompile</samp>’ field in the <samp class="file">DESCRIPTION</samp> file. </p> <hr> </div> -<div class="subsection" id="External-software"> -<span id="External-software-1"></span><h4 class="subsection">6.3.6 External software</h4> +<div class="subsection-level-extent" id="External-software"> +<h4 class="subsection" id="External-software-1"><span>6.3.6 External software<a class="copiable-link" href="#External-software-1"> ¶</a></span></h4> <p>Some R packages contain compiled code which links to external software libraries. Unless the external library is statically linked @@ -2559,81 +2553,81 @@ not just when it is installed. How this should be done depends on the OS (and in some cases the version). </p> -<p>For Unix-alikes except macOS the primary mechanism is the <code>ld.so</code> -cache controlled by <code>ldconfig</code>: external dynamic libraries +<p>For Unix-alikes except macOS the primary mechanism is the <code class="code">ld.so</code> +cache controlled by <code class="command">ldconfig</code>: external dynamic libraries recorded in that cache will be found. Standard library locations will be covered by the cache, and well-designed software will add its -locations (as for example <strong>openmpi</strong> does on Fedora). The secondary -mechanism is to consult the environment variable <code>LD_LIBRARY_PATH</code>. +locations (as for example <strong class="strong">openmpi</strong> does on Fedora). The secondary +mechanism is to consult the environment variable <code class="env">LD_LIBRARY_PATH</code>. The R script controls that variable, and sets it to the concatenation -of <code>R_LD_LIBRARY_PATH</code>, <code>R_JAVA_LD_LIBRARY_PATH</code> and the -environment value of <code>LD_LIBRARY_PATH</code>. The first two have defaults +of <code class="env">R_LD_LIBRARY_PATH</code>, <code class="env">R_JAVA_LD_LIBRARY_PATH</code> and the +environment value of <code class="env">LD_LIBRARY_PATH</code>. The first two have defaults which are normally set when R is installed (but can be overridden in -the environment) so <code>LD_LIBRARY_PATH</code> is the best choice for a user +the environment) so <code class="env">LD_LIBRARY_PATH</code> is the best choice for a user to set. </p> <p>On macOS the primary mechanism is to embed the absolute path to dependent dynamic libraries into an object when it is compiled. Few -R packages arrange to do so, but it can be edited<a id="DOCF32" href="#FOOT32"><sup>32</sup></a> <em>via</em> -<code>install_name_tool</code> — that only deals with direct dependencies +R packages arrange to do so, but it can be edited<a class="footnote" id="DOCF32" href="#FOOT32"><sup>32</sup></a> <em class="emph">via</em> +<code class="command">install_name_tool</code> — that only deals with direct dependencies and those would also need to be compiled to include the absolute paths of their dependencies. If the choice of absolute path is to be deferred -to load time, how they are resolved is described in <code>man dyld</code>: -the role of <code>LD_LIBRARY_PATH</code> is replaced on macOS by -<code>DYLD_LIBRARY_PATH</code> and <code>DYLD_FALLBACK_LIBRARY_PATH</code>. Running -<code>R CMD otool -L</code> on the package shared object will show where +to load time, how they are resolved is described in <code class="command">man dyld</code>: +the role of <code class="env">LD_LIBRARY_PATH</code> is replaced on macOS by +<code class="env">DYLD_LIBRARY_PATH</code> and <code class="env">DYLD_FALLBACK_LIBRARY_PATH</code>. Running +<code class="command">R CMD otool -L</code> on the package shared object will show where (if anywhere) its dependencies are -resolved. <code>DYLD_FALLBACK_LIBRARY_PATH</code> is preferred (and it is that +resolved. <code class="env">DYLD_FALLBACK_LIBRARY_PATH</code> is preferred (and it is that which is manipulated by the R script), but as from 10.11 (‘El Capitan’) the default behaviour had been changed for security reasons to discard these environment variables when invoking a shell script (and -<samp>R</samp> is a shell script). That makes the only portable option to set -<code>R_LD_LIBRARY_PATH</code> in the environment, something like +<samp class="file">R</samp> is a shell script). That makes the only portable option to set +<code class="env">R_LD_LIBRARY_PATH</code> in the environment, something like </p> <div class="example"> -<pre class="example">export R_LD_LIBRARY_PATH="`R RHOME`/lib:/opt/local/lib" +<pre class="example-preformatted">export R_LD_LIBRARY_PATH="`R RHOME`/lib:/opt/local/lib" </pre></div> <p>The precise rules for where Windows looks for DLLs are complex and depend on the version of Windows. But for present purposes the main solution is to put the directories containing the DLLs the package -links to (and any those DLLs link to) on the <code>PATH</code>. +links to (and any those DLLs link to) on the <code class="env">PATH</code>. </p> <p>The danger with any of the methods which involve setting environment variables is of inadvertently masking a system library. This is less -for <code>DYLD_FALLBACK_LIBRARY_PATH</code> and for <em>appending</em> to -<code>PATH</code> on Windows (as it should already contain the system library +for <code class="env">DYLD_FALLBACK_LIBRARY_PATH</code> and for <em class="emph">appending</em> to +<code class="env">PATH</code> on Windows (as it should already contain the system library paths). </p> <hr> </div> </div> -<div class="section" id="Updating-packages"> -<span id="Updating-packages-1"></span><h3 class="section">6.4 Updating packages</h3> -<span id="index-update_002epackages"></span> -<span id="index-Packages_002c-updating"></span> +<div class="section-level-extent" id="Updating-packages"> +<h3 class="section" id="Updating-packages-1"><span>6.4 Updating packages<a class="copiable-link" href="#Updating-packages-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-update_002epackages"></a> +<a class="index-entry-id" id="index-Packages_002c-updating"></a> -<p>The command <code>update.packages()</code> is the simplest way to ensure that +<p>The command <code class="code">update.packages()</code> is the simplest way to ensure that all the packages on your system are up to date. It downloads the list of available packages and their current versions, compares it with those installed and offers to fetch and install any that have later versions on the repositories. </p> <p>An alternative interface to keeping packages up-to-date is provided by -the command <code>packageStatus()</code>, which returns an object with +the command <code class="code">packageStatus()</code>, which returns an object with information on all installed packages and packages available at multiple -repositories. The <code>print</code> and <code>summary</code> methods give an -overview of installed and available packages, the <code>upgrade</code> method +repositories. The <code class="code">print</code> and <code class="code">summary</code> methods give an +overview of installed and available packages, the <code class="code">upgrade</code> method offers to fetch and install the latest versions of outdated packages. </p> <p>One sometimes-useful additional piece of information that -<code>packageStatus()</code> returns is the status of a package, as -<code>"ok"</code>, <code>"upgrade"</code> or <code>"unavailable"</code> (in the currently +<code class="code">packageStatus()</code> returns is the status of a package, as +<code class="code">"ok"</code>, <code class="code">"upgrade"</code> or <code class="code">"unavailable"</code> (in the currently selected repositories). For example </p> <div class="example"> -<pre class="example">> inst <- packageStatus()$inst +<pre class="example-preformatted">> inst <- packageStatus()$inst > inst[inst$Status != "ok", c("Package", "Version", "Status")] Package Version Status Biobase Biobase 2.8.0 unavailable @@ -2645,22 +2639,22 @@ <hr> </div> -<div class="section" id="Removing-packages"> -<span id="Removing-packages-1"></span><h3 class="section">6.5 Removing packages</h3> -<span id="index-remove_002epackages"></span> -<span id="index-Packages_002c-removing"></span> +<div class="section-level-extent" id="Removing-packages"> +<h3 class="section" id="Removing-packages-1"><span>6.5 Removing packages<a class="copiable-link" href="#Removing-packages-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-remove_002epackages"></a> +<a class="index-entry-id" id="index-Packages_002c-removing"></a> <p>Packages can be removed in a number of ways. From a command prompt they can be removed by </p> <div class="example"> -<pre class="example">R CMD REMOVE -l /path/to/library <var>pkg1</var> <var>pkg2</var> … +<pre class="example-preformatted">R CMD REMOVE -l /path/to/library <var class="var">pkg1</var> <var class="var">pkg2</var> ... </pre></div> <p>From a running R process they can be removed by </p> <div class="example"> -<pre class="example">> remove.packages(c("pkg1", "pkg2"), +<pre class="example-preformatted">> remove.packages(c("pkg1", "pkg2"), lib = file.path("path", "to", "library")) </pre></div> @@ -2669,94 +2663,94 @@ <hr> </div> -<div class="section" id="Setting-up-a-package-repository"> -<span id="Setting-up-a-package-repository-1"></span><h3 class="section">6.6 Setting up a package repository</h3> -<span id="index-Repositories"></span> +<div class="section-level-extent" id="Setting-up-a-package-repository"> +<h3 class="section" id="Setting-up-a-package-repository-1"><span>6.6 Setting up a package repository<a class="copiable-link" href="#Setting-up-a-package-repository-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Repositories"></a> -<p>Utilities such as <code>install.packages</code> can be pointed at any -<acronym>CRAN</acronym>-style repository, and R users may want to set up their +<p>Utilities such as <code class="code">install.packages</code> can be pointed at any +<abbr class="acronym">CRAN</abbr>-style repository, and R users may want to set up their own. The ‘base’ of a repository is a URL such as -<a href="https://www.stats.ox.ac.uk/pub/RWin/">https://www.stats.ox.ac.uk/pub/RWin/</a>: this must be an URL scheme -that <code>download.packages</code> supports (which also includes -‘<samp>https://</samp>’, ‘<samp>ftp://</samp>’ and ‘<samp>file://</samp>’). Under that base URL +<a class="uref" href="https://www.stats.ox.ac.uk/pub/RWin/">https://www.stats.ox.ac.uk/pub/RWin/</a>: this must be an URL scheme +that <code class="code">download.packages</code> supports (which also includes +‘<samp class="samp">https://</samp>’, ‘<samp class="samp">ftp://</samp>’ and ‘<samp class="samp">file://</samp>’). Under that base URL there should be directory trees for one or more of the following types of package distributions: </p> -<ul> -<li> <code>"source"</code>: located at <samp>src/contrib</samp> and containing -<samp>.tar.gz</samp> files. Other forms of compression can be used, e.g. -<samp>.tar.bz2</samp> or <samp>.tar.xz</samp> files. Complete repositories contain +<ul class="itemize mark-bullet"> +<li><code class="code">"source"</code>: located at <samp class="file">src/contrib</samp> and containing +<samp class="file">.tar.gz</samp> files. Other forms of compression can be used, e.g. +<samp class="file">.tar.bz2</samp> or <samp class="file">.tar.xz</samp> files. Complete repositories contain the sources corresponding to any binary packages, and in any case it is -wise to have a <samp>src/contrib</samp> area with a possibly empty -<samp>PACKAGES</samp> file. +wise to have a <samp class="file">src/contrib</samp> area with a possibly empty +<samp class="file">PACKAGES</samp> file. -</li><li> <code>"win.binary"</code>: located at <samp>bin/windows/contrib/<var>x.y</var></samp> for -R versions <var>x.y.z</var> and containing <samp>.zip</samp> files for Windows. +</li><li><code class="code">"win.binary"</code>: located at <samp class="file">bin/windows/contrib/<var class="var">x.y</var></samp> for +R versions <var class="var">x.y.z</var> and containing <samp class="file">.zip</samp> files for Windows. -</li><li> <code>"mac.binary"</code>: located at -<samp>bin/macosx/big-sur-arm64/contrib/<var>4.y</var></samp> or -<samp>bin/macosx/big-sur-x86_64/contrib/<var>4.y</var></samp> for the <acronym>CRAN</acronym> -builds for macOS for R versions <var>4.y.z</var>, containing <samp>.tgz</samp> -files. (<samp>bin/macosx/contrib/<var>4.y</var></samp> for <code><var>y</var></code> = 0, 1 or 2.) +</li><li><code class="code">"mac.binary"</code>: located at +<samp class="file">bin/macosx/big-sur-arm64/contrib/<var class="var">4.y</var></samp> or +<samp class="file">bin/macosx/big-sur-x86_64/contrib/<var class="var">4.y</var></samp> for the <abbr class="acronym">CRAN</abbr> +builds for macOS for R versions <var class="var">4.y.z</var>, containing <samp class="file">.tgz</samp> +files. (<samp class="file">bin/macosx/contrib/<var class="var">4.y</var></samp> for <code class="code"><var class="var">y</var></code> = 0, 1 or 2.) </li></ul> -<p>Each terminal directory must also contain a <samp>PACKAGES</samp> file. This -can be a concatenation of the <samp>DESCRIPTION</samp> files of the packages +<p>Each terminal directory must also contain a <samp class="file">PACKAGES</samp> file. This +can be a concatenation of the <samp class="file">DESCRIPTION</samp> files of the packages separated by blank lines, but only a few of the fields are needed. The simplest way to set up such a file is to use function -<code>write_PACKAGES</code> in the <strong>tools</strong> package, and its help explains +<code class="code">write_PACKAGES</code> in the <strong class="strong">tools</strong> package, and its help explains which fields are needed. Optionally there can also be -<samp>PACKAGES.rds</samp> and <samp>PACKAGES.gz</samp> files, downloaded in -preference to <samp>PACKAGES</samp>. (If you have a mis-configured server +<samp class="file">PACKAGES.rds</samp> and <samp class="file">PACKAGES.gz</samp> files, downloaded in +preference to <samp class="file">PACKAGES</samp>. (If you have a mis-configured server that does not report correctly non-existent files you may need these files.) </p> -<p>To add your repository to the list offered by <code>setRepositories()</code>, +<p>To add your repository to the list offered by <code class="code">setRepositories()</code>, see the help file for that function. </p> -<p>Incomplete repositories are better specified <em>via</em> a -<code>contriburl</code> argument than <em>via</em> being set as a repository. +<p>Incomplete repositories are better specified <em class="emph">via</em> a +<code class="code">contriburl</code> argument than <em class="emph">via</em> being set as a repository. </p> <p>A repository can contain subdirectories, when the descriptions in the -<samp>PACKAGES</samp> file of packages in subdirectories must include a line +<samp class="file">PACKAGES</samp> file of packages in subdirectories must include a line of the form </p> <div class="example"> -<pre class="example">Path: <var>path/to/subdirectory</var> +<pre class="example-preformatted">Path: <var class="var">path/to/subdirectory</var> </pre></div> -<p>—once again <code>write_PACKAGES</code> is the simplest way to set this up. +<p>—once again <code class="code">write_PACKAGES</code> is the simplest way to set this up. </p> <hr> </div> -<div class="section" id="Checking-installed-source-packages"> -<span id="Checking-installed-source-packages-1"></span><h3 class="section">6.7 Checking installed source packages</h3> +<div class="section-level-extent" id="Checking-installed-source-packages"> +<h3 class="section" id="Checking-installed-source-packages-1"><span>6.7 Checking installed source packages<a class="copiable-link" href="#Checking-installed-source-packages-1"> ¶</a></span></h3> -<p>It can be convenient to run <code>R CMD check</code> on an installed +<p>It can be convenient to run <code class="command">R CMD check</code> on an installed package, particularly on a platform which uses sub-architectures. The outline of how to do this is, with the source package in directory -<samp><var>pkg</var></samp> (or a tarball filename): +<samp class="file"><var class="var">pkg</var></samp> (or a tarball filename): </p> <div class="example"> -<pre class="example">R CMD INSTALL -l <var>libdir</var> <var>pkg</var> > <var>pkg</var>.log 2>&1 -R CMD check -l <var>libdir</var> --install=check:<var>pkg</var>.log <var>pkg</var> +<pre class="example-preformatted">R CMD INSTALL -l <var class="var">libdir</var> <var class="var">pkg</var> > <var class="var">pkg</var>.log 2>&1 +R CMD check -l <var class="var">libdir</var> --install=check:<var class="var">pkg</var>.log <var class="var">pkg</var> </pre></div> -<p>Where sub-architectures are in use the <code>R CMD check</code> line can be +<p>Where sub-architectures are in use the <code class="command">R CMD check</code> line can be repeated with additional architectures by </p> <div class="example"> -<pre class="example">R --arch <var>arch</var> CMD check -l <var>libdir</var> --extra-arch --install=check:<var>pkg</var>.log <var>pkg</var> +<pre class="example-preformatted">R --arch <var class="var">arch</var> CMD check -l <var class="var">libdir</var> --extra-arch --install=check:<var class="var">pkg</var>.log <var class="var">pkg</var> </pre></div> -<p>where <samp>--extra-arch</samp> selects only those checks which depend on +<p>where <samp class="option">--extra-arch</samp> selects only those checks which depend on the installed code and not those which analyse the sources. (If multiple sub-architectures fail only because they need different -settings, e.g. environment variables, <samp>--no-multiarch</samp> may need -to be added to the <code>INSTALL</code> lines.) On Unix-alikes the -architecture to run is selected by <samp>--arch</samp>: this can also be -used on Windows with <samp><var>R_HOME</var>/bin/R.exe</samp>, but it is more usual -to select the path to the <code>Rcmd.exe</code> of the desired +settings, e.g. environment variables, <samp class="option">--no-multiarch</samp> may need +to be added to the <code class="code">INSTALL</code> lines.) On Unix-alikes the +architecture to run is selected by <samp class="option">--arch</samp>: this can also be +used on Windows with <samp class="file"><var class="var">R_HOME</var>/bin/R.exe</samp>, but it is more usual +to select the path to the <code class="command">Rcmd.exe</code> of the desired architecture. </p> <p>So on Windows to install, check and package for distribution a source @@ -2764,25 +2758,25 @@ might use </p> <div class="example"> -<pre class="example">.../bin/x64/Rcmd INSTALL -l <var>libdir</var> <var>tarball</var> --build > <var>pkg</var>.log 2>&1 +<pre class="example-preformatted">.../bin/x64/Rcmd INSTALL -l <var class="var">libdir</var> <var class="var">tarball</var> --build > <var class="var">pkg</var>.log 2>&1 </pre></div> <hr> </div> </div> -<div class="chapter" id="Internationalization"> -<span id="Internationalization-and-Localization"></span><h2 class="chapter">7 Internationalization and Localization</h2> -<span id="index-Internationalization"></span> -<span id="index-Localization"></span> +<div class="chapter-level-extent" id="Internationalization"> +<h2 class="chapter" id="Internationalization-and-Localization"><span>7 Internationalization and Localization<a class="copiable-link" href="#Internationalization-and-Localization"> ¶</a></span></h2> +<a class="index-entry-id" id="index-Internationalization"></a> +<a class="index-entry-id" id="index-Localization"></a> -<p><em>Internationalization</em> refers to the process of enabling support -for many human languages, and <em>localization</em> to adapting to a +<p><em class="emph">Internationalization</em> refers to the process of enabling support +for many human languages, and <em class="emph">localization</em> to adapting to a specific country and language. </p> <p>Current builds of R support all the character sets that the underlying OS can handle. These are interpreted according to the -<span id="index-Locale"></span> -current <code>locale</code>, a sufficiently complicated topic to merit a +<a class="index-entry-id" id="index-Locale"></a> +current <code class="code">locale</code>, a sufficiently complicated topic to merit a separate section. Note though that R has no built-in support for right-to-left languages and bidirectional output, relying on the OS services. For example, how character vectors in UTF-8 containing both @@ -2794,40 +2788,40 @@ </p> <hr> -<div class="section" id="Locales"> -<span id="Locales-1"></span><h3 class="section">7.1 Locales</h3> -<span id="index-Locale-1"></span> +<div class="section-level-extent" id="Locales"> +<h3 class="section" id="Locales-1"><span>7.1 Locales<a class="copiable-link" href="#Locales-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Locale-1"></a> -<p>A <em>locale</em> is a description of the local environment of the user, +<p>A <em class="emph">locale</em> is a description of the local environment of the user, including the preferred language, the encoding of characters, the currency used and its conventions, and so on. Aspects of the locale are -accessed by the R functions <code>Sys.getlocale</code> and -<code>Sys.localeconv</code>. +accessed by the R functions <code class="code">Sys.getlocale</code> and +<code class="code">Sys.localeconv</code>. </p> <p>The system of naming locales is OS-specific. There is quite wide agreement on schemes, but not on the details of their implementation. A locale needs to specify -</p><ul> -<li> A human language. These are generally specified by a lower-case +</p><ul class="itemize mark-bullet"> +<li>A human language. These are generally specified by a lower-case two-character abbreviation following ISO 639 (see e.g. -<a href="https://en.wikipedia.org/wiki/ISO_639-1">https://en.wikipedia.org/wiki/ISO_639-1</a>). +<a class="uref" href="https://en.wikipedia.org/wiki/ISO_639-1">https://en.wikipedia.org/wiki/ISO_639-1</a>). -</li><li> A ‘territory’, used mainly to specify the currency. These are generally +</li><li>A ‘territory’, used mainly to specify the currency. These are generally specified by an upper-case two-character abbreviation following ISO 3166 -(see e.g. <a href="https://en.wikipedia.org/wiki/ISO_3166">https://en.wikipedia.org/wiki/ISO_3166</a>). +(see e.g. <a class="uref" href="https://en.wikipedia.org/wiki/ISO_3166">https://en.wikipedia.org/wiki/ISO_3166</a>). -</li><li> A charset encoding, which determines both how a byte stream should be +</li><li>A charset encoding, which determines both how a byte stream should be divided into characters, and which characters the subsequences of bytes represent. Sometimes the combination of language and territory is used to specify the encoding, for example to distinguish between traditional and simplified Chinese. -</li><li> Optionally, a modifier, for example to indicate that Austria is to be +</li><li>Optionally, a modifier, for example to indicate that Austria is to be considered pre- or post-Euro. The modifier is also used to indicate the -script (<code>@latin</code>, <code>@cyrillic</code> for Serbian, <code>@iqtelif</code>) -or language dialect (e.g. <code>@saaho</code>, a dialect of Afar, and -<code>@bokmal</code> and <code>@nynorsk</code>, dialects of Norwegian regarded by -some OSes as separate languages, <code>no</code> and <code>nn</code>). +script (<code class="code">@latin</code>, <code class="code">@cyrillic</code> for Serbian, <code class="code">@iqtelif</code>) +or language dialect (e.g. <code class="code">@saaho</code>, a dialect of Afar, and +<code class="code">@bokmal</code> and <code class="code">@nynorsk</code>, dialects of Norwegian regarded by +some OSes as separate languages, <code class="code">no</code> and <code class="code">nn</code>). </li></ul> <p>R is principally concerned with the first (for translations) and @@ -2836,104 +2830,104 @@ </p> <hr> -<div class="subsection" id="Locales-under-Unix_002dalikes"> -<span id="Locales-under-Unix_002dalikes-1"></span><h4 class="subsection">7.1.1 Locales under Unix-alikes</h4> +<div class="subsection-level-extent" id="Locales-under-Unix_002dalikes"> +<h4 class="subsection" id="Locales-under-Unix_002dalikes-1"><span>7.1.1 Locales under Unix-alikes<a class="copiable-link" href="#Locales-under-Unix_002dalikes-1"> ¶</a></span></h4> -<p>Modern Linux uses the <abbr>XPG</abbr><a id="DOCF33" href="#FOOT33"><sup>33</sup></a> locale specifications which have the form -‘<samp>en_GB</samp>’, ‘<samp>en_GB.UTF-8</samp>’, ‘<samp>aa_ER.UTF-8@saaho</samp>’, -‘<samp>de_AT.iso885915@euro</samp>’, the components being in the order listed -above. (See <code>man locale</code> and <code>locale -a</code> for more +<p>Modern Linux uses the <abbr class="abbr">XPG</abbr><a class="footnote" id="DOCF33" href="#FOOT33"><sup>33</sup></a> locale specifications which have the form +‘<samp class="samp">en_GB</samp>’, ‘<samp class="samp">en_GB.UTF-8</samp>’, ‘<samp class="samp">aa_ER.UTF-8@saaho</samp>’, +‘<samp class="samp">de_AT.iso885915@euro</samp>’, the components being in the order listed +above. (See <code class="command">man locale</code> and <code class="command">locale -a</code> for more details.) Similar schemes are used by most Unix-alikes: some (including -some distributions of Linux) use ‘<samp>.utf8</samp>’ rather than ‘<samp>.UTF-8</samp>’. +some distributions of Linux) use ‘<samp class="samp">.utf8</samp>’ rather than ‘<samp class="samp">.UTF-8</samp>’. </p> <p>Note that whereas UTF-8 locales are nowadays almost universally used, -locales such as ‘<samp>en_GB</samp>’ use 8-bit encodings for backwards +locales such as ‘<samp class="samp">en_GB</samp>’ use 8-bit encodings for backwards compatibility. </p> <hr> </div> -<div class="subsection" id="Locales-under-Windows"> -<span id="Locales-under-Windows-1"></span><h4 class="subsection">7.1.2 Locales under Windows</h4> +<div class="subsection-level-extent" id="Locales-under-Windows"> +<h4 class="subsection" id="Locales-under-Windows-1"><span>7.1.2 Locales under Windows<a class="copiable-link" href="#Locales-under-Windows-1"> ¶</a></span></h4> <p>Windows also uses locales, but specified in a rather less concise way. Most users will encounter locales only via drop-down menus, but more -information and lists can be found by searching for ‘<samp>Windows +information and lists can be found by searching for ‘<samp class="samp">Windows language country strings</samp>’). </p> <p>It offers only one encoding per language. </p> <p>Some care is needed with Windows’ locale names. For example, -<code>chinese</code> is Traditional Chinese and not Simplified Chinese as used +<code class="code">chinese</code> is Traditional Chinese and not Simplified Chinese as used in most of the Chinese-speaking world. </p> <hr> </div> -<div class="subsection" id="Locales-under-macOS"> -<span id="Locales-under-macOS-1"></span><h4 class="subsection">7.1.3 Locales under macOS</h4> +<div class="subsection-level-extent" id="Locales-under-macOS"> +<h4 class="subsection" id="Locales-under-macOS-1"><span>7.1.3 Locales under macOS<a class="copiable-link" href="#Locales-under-macOS-1"> ¶</a></span></h4> <p>macOS supports locales in its own particular way, but the R GUI tries to make this easier for users. See -<a href="https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/">https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/</a> +<a class="uref" href="https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/">https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/</a> for how users can set their locales. End users will generally only see lists of languages/territories. Users of R in a -terminal may need to set the locale to something like ‘<samp>en_GB.UTF-8</samp>’ -if it defaults to ‘<samp>C</samp>’ (as it sometimes does when logging in -remotely and for batch jobs: note whether <code>Terminal</code> sets the -<code>LANG</code> environment variable is an (advanced) preference, but does so +terminal may need to set the locale to something like ‘<samp class="samp">en_GB.UTF-8</samp>’ +if it defaults to ‘<samp class="samp">C</samp>’ (as it sometimes does when logging in +remotely and for batch jobs: note whether <code class="command">Terminal</code> sets the +<code class="env">LANG</code> environment variable is an (advanced) preference, but does so by default). </p> <p>Internally macOS uses a form similar to Linux: the main difference from other Unix-alikes is that where a character set is not specified it is -assumed to be <code>UTF-8</code>. +assumed to be <code class="code">UTF-8</code>. </p> <hr> </div> </div> -<div class="section" id="Localization-of-messages"> -<span id="Localization-of-messages-1"></span><h3 class="section">7.2 Localization of messages</h3> +<div class="section-level-extent" id="Localization-of-messages"> +<h3 class="section" id="Localization-of-messages-1"><span>7.2 Localization of messages<a class="copiable-link" href="#Localization-of-messages-1"> ¶</a></span></h3> <p>The preferred language for messages is by default taken from the locale. This can be overridden first by the setting of the environment variable -<span id="index-LANGUAGE"></span> -<span id="index-LC_005fALL"></span> -<span id="index-LC_005fMESSAGES"></span> -<span id="index-LANG"></span> -<code>LANGUAGE</code> and then<a id="DOCF34" href="#FOOT34"><sup>34</sup></a> -by the environment variables <code>LC_ALL</code>, <code>LC_MESSAGES</code> and -<code>LANG</code>. (The last three are normally used to set the locale and so +<a class="index-entry-id" id="index-LANGUAGE"></a> +<a class="index-entry-id" id="index-LC_005fALL"></a> +<a class="index-entry-id" id="index-LC_005fMESSAGES"></a> +<a class="index-entry-id" id="index-LANG"></a> +<code class="env">LANGUAGE</code> and then<a class="footnote" id="DOCF34" href="#FOOT34"><sup>34</sup></a> +by the environment variables <code class="env">LC_ALL</code>, <code class="env">LC_MESSAGES</code> and +<code class="env">LANG</code>. (The last three are normally used to set the locale and so should not be needed, but the first is only used to select the language for messages.) The code tries hard to map locales to languages, but on some systems (notably Windows) the locale names needed for the -environment variable <code>LC_ALL</code> do not all correspond to <abbr>XPG</abbr> language -names and so <code>LANGUAGE</code> may need to be set. (One example is -‘<samp>LC_ALL=es</samp>’ on Windows which sets the locale to Estonian and the +environment variable <code class="env">LC_ALL</code> do not all correspond to <abbr class="abbr">XPG</abbr> language +names and so <code class="env">LANGUAGE</code> may need to be set. (One example is +‘<samp class="samp">LC_ALL=es</samp>’ on Windows which sets the locale to Estonian and the language to Spanish.) </p> <p>It is usually possible to change the language once R is running -<em>via</em> (not Windows) <code>Sys.setlocale("LC_MESSAGES", +<em class="emph">via</em> (not Windows) <code class="code">Sys.setlocale("LC_MESSAGES", "new_locale")</code>, or by setting an environment variable such as -<code>LANGUAGE</code>, <em>provided</em><a id="DOCF35" href="#FOOT35"><sup>35</sup></a> the language you are changing to can be output in the current +<code class="env">LANGUAGE</code>, <em class="emph">provided</em><a class="footnote" id="DOCF35" href="#FOOT35"><sup>35</sup></a> the language you are changing to can be output in the current character set. But this is OS-specific, and has been known to stop working on an OS upgrade. Note that translated messages may be cached, so attempting to change the language of an error that has already been output in another language may not work. </p> -<p>Messages are divided into <em>domains</em>, and translations may be +<p>Messages are divided into <em class="emph">domains</em>, and translations may be available for some or all messages in a domain. R makes use of the following domains. </p> -<ul> -<li> Domain <code>R</code> for the C-level error and warning messages from the R +<ul class="itemize mark-bullet"> +<li>Domain <code class="code">R</code> for the C-level error and warning messages from the R interpreter. -</li><li> Domain <code>R-<var>pkg</var></code> for the R <code>stop</code>, <code>warning</code> and -<code>message</code> messages in each package, including <code>R-base</code> for the -<strong>base</strong> package. +</li><li>Domain <code class="code">R-<var class="var">pkg</var></code> for the R <code class="code">stop</code>, <code class="code">warning</code> and +<code class="code">message</code> messages in each package, including <code class="code">R-base</code> for the +<strong class="strong">base</strong> package. -</li><li> Domain <code><var>pkg</var></code> for the C-level messages in each package. +</li><li>Domain <code class="code"><var class="var">pkg</var></code> for the C-level messages in each package. -</li><li> Domain <code>RGui</code> for the menus etc of the R for Windows GUI front-end. +</li><li>Domain <code class="code">RGui</code> for the menus etc of the R for Windows GUI front-end. </li></ul> @@ -2949,78 +2943,78 @@ </p> <p>Translations are looked for by domain according to the currently specified language, as specifically as possible, so for example an -Austrian (‘<samp>de_AT</samp>’) translation catalogue will be used in preference -to a generic German one (‘<samp>de</samp>’) for an Austrian user. However, if a +Austrian (‘<samp class="samp">de_AT</samp>’) translation catalogue will be used in preference +to a generic German one (‘<samp class="samp">de</samp>’) for an Austrian user. However, if a specific translation catalogue exists but does not contain a translation, the less specific catalogues are consulted. For example, -R has catalogues for ‘<samp>en_GB</samp>’ that translate the Americanisms -(e.g., ‘<samp>gray</samp>’) in the standard messages into English.<a id="DOCF36" href="#FOOT36"><sup>36</sup></a> Two other examples: there are catalogues -for ‘<samp>es</samp>’, which is Spanish as written in Spain and these will by +R has catalogues for ‘<samp class="samp">en_GB</samp>’ that translate the Americanisms +(e.g., ‘<samp class="samp">gray</samp>’) in the standard messages into English.<a class="footnote" id="DOCF36" href="#FOOT36"><sup>36</sup></a> Two other examples: there are catalogues +for ‘<samp class="samp">es</samp>’, which is Spanish as written in Spain and these will by default also be used in Spanish-speaking Latin American countries, and -also for ‘<samp>pt_BR</samp>’, which are used for Brazilian locales but not for +also for ‘<samp class="samp">pt_BR</samp>’, which are used for Brazilian locales but not for locales specifying Portugal. </p> <p>Translations in the right language but the wrong charset are made use of -<span id="index-LANGUAGE-1"></span> -by on-the-fly re-encoding. The <code>LANGUAGE</code> variable (only) can be a -colon-separated list, for example ‘<samp>se:de</samp>’, giving a set of +<a class="index-entry-id" id="index-LANGUAGE-1"></a> +by on-the-fly re-encoding. The <code class="env">LANGUAGE</code> variable (only) can be a +colon-separated list, for example ‘<samp class="samp">se:de</samp>’, giving a set of languages in decreasing order of preference. One special value is -‘<samp>en@quot</samp>’, which can be used in a UTF-8 locale to have American +‘<samp class="samp">en@quot</samp>’, which can be used in a UTF-8 locale to have American error messages with pairs of single quotes translated to Unicode directional quotes. </p> <p>If no suitable translation catalogue is found or a particular message is -not translated in any suitable catalogue, ‘English’<a id="DOCF37" href="#FOOT37"><sup>37</sup></a> is used. +not translated in any suitable catalogue, ‘English’<a class="footnote" id="DOCF37" href="#FOOT37"><sup>37</sup></a> is used. </p> -<p>See <a href="https://developer.r-project.org/Translations30.html">https://developer.r-project.org/Translations30.html</a> for how to +<p>See <a class="uref" href="https://developer.r-project.org/Translations30.html">https://developer.r-project.org/Translations30.html</a> for how to prepare and install translation catalogues. </p> <hr> </div> </div> -<div class="chapter" id="Choosing-between-32_002d-and-64_002dbit-builds"> -<span id="Choosing-between-32_002d-and-64_002dbit-builds-1"></span><h2 class="chapter">8 Choosing between 32- and 64-bit builds</h2> +<div class="chapter-level-extent" id="Choosing-between-32_002d-and-64_002dbit-builds"> +<h2 class="chapter" id="Choosing-between-32_002d-and-64_002dbit-builds-1"><span>8 Choosing between 32- and 64-bit builds<a class="copiable-link" href="#Choosing-between-32_002d-and-64_002dbit-builds-1"> ¶</a></span></h2> <p>As from R 4.4.0 32-bit builds are unsupported. </p> <hr> </div> -<div class="chapter" id="The-standalone-Rmath-library"> -<span id="The-standalone-Rmath-library-1"></span><h2 class="chapter">9 The standalone Rmath library</h2> +<div class="chapter-level-extent" id="The-standalone-Rmath-library"> +<h2 class="chapter" id="The-standalone-Rmath-library-1"><span>9 The standalone Rmath library<a class="copiable-link" href="#The-standalone-Rmath-library-1"> ¶</a></span></h2> <p>The routines supporting the distribution and -special<a id="DOCF38" href="#FOOT38"><sup>38</sup></a> functions in R -and a few others are declared in C header file <samp>Rmath.h</samp>. These +special<a class="footnote" id="DOCF38" href="#FOOT38"><sup>38</sup></a> functions in R +and a few others are declared in C header file <samp class="file">Rmath.h</samp>. These can be compiled into a standalone library for linking to other applications. (Note that they are not a separate library when R is built, and the standalone version differs in several ways.) </p> <p>The makefiles and other sources needed are in directory -<samp>src/nmath/standalone</samp>, so the following instructions assume that +<samp class="file">src/nmath/standalone</samp>, so the following instructions assume that is the current working directory (in the build directory tree on a Unix-alike if that is separate from the sources). </p> -<p><samp>Rmath.h</samp> contains ‘<samp>R_VERSION_STRING</samp>’, which is a character -string containing the current R version, for example <code>"4.4.0"</code>. +<p><samp class="file">Rmath.h</samp> contains ‘<samp class="samp">R_VERSION_STRING</samp>’, which is a character +string containing the current R version, for example <code class="code">"4.4.0"</code>. </p> -<p>There is full access to R’s handling of <code>NaN</code>, <code>Inf</code> and -<code>-Inf</code> via special versions of the macros and functions +<p>There is full access to R’s handling of <code class="code">NaN</code>, <code class="code">Inf</code> and +<code class="code">-Inf</code> via special versions of the macros and functions </p> <div class="example"> -<pre class="example"> ISNAN, R_FINITE, R_log, R_pow and R_pow_di +<pre class="example-preformatted"> ISNAN, R_FINITE, R_log, R_pow and R_pow_di </pre></div> -<p>and (extern) constants <code>R_PosInf</code>, <code>R_NegInf</code> and <code>NA_REAL</code>. +<p>and (extern) constants <code class="code">R_PosInf</code>, <code class="code">R_NegInf</code> and <code class="code">NA_REAL</code>. </p> <p>There is no support for R’s notion of missing values, in particular -not for <code>NA_INTEGER</code> nor the distinction between <code>NA</code> and -<code>NaN</code> for doubles. +not for <code class="code">NA_INTEGER</code> nor the distinction between <code class="code">NA</code> and +<code class="code">NaN</code> for doubles. </p> <p>A little care is needed to use the random-number routines. You will need to supply the uniform random number generator </p> <div class="example"> -<pre class="example"> double unif_rand(void) +<pre class="example-preformatted"> double unif_rand(void) </pre></div> <p>or use the one supplied (and with a shared library or DLL you may @@ -3028,17 +3022,17 @@ an entry point </p> <div class="example"> -<pre class="example"> set_seed(unsigned int, unsigned int) +<pre class="example-preformatted"> set_seed(unsigned int, unsigned int) </pre></div> <p>to set its seeds). </p> <p>The facilities to change the normal random number generator are -available through the constant <code>N01_kind</code>. This takes values +available through the constant <code class="code">N01_kind</code>. This takes values from the enumeration type </p> <div class="example"> -<pre class="example">typedef enum { +<pre class="example-preformatted">typedef enum { BUGGY_KINDERMAN_RAMAGE, AHRENS_DIETER, BOX_MULLER, @@ -3048,138 +3042,138 @@ } N01type; </pre></div> -<p>(and ‘<samp>USER_NORM</samp>’ is not available). +<p>(and ‘<samp class="samp">USER_NORM</samp>’ is not available). </p> <hr> -<div class="section" id="Unix_002dalike-standalone"> -<span id="Unix_002dalikes"></span><h3 class="section">9.1 Unix-alikes</h3> +<div class="section-level-extent" id="Unix_002dalike-standalone"> +<h3 class="section" id="Unix_002dalikes"><span>9.1 Unix-alikes<a class="copiable-link" href="#Unix_002dalikes"> ¶</a></span></h3> <p>If R has not already been made in the directory tree, -<code>configure</code> must be run as described in the main build +<code class="command">configure</code> must be run as described in the main build instructions. </p> -<p>Then (in <samp>src/nmath/standalone</samp>) +<p>Then (in <samp class="file">src/nmath/standalone</samp>) </p> <div class="example"> -<pre class="example">make +<pre class="example-preformatted">make </pre></div> -<p>will make standalone libraries <samp>libRmath.a</samp> and <samp>libRmath.so</samp> -(<samp>libRmath.dylib</samp> on macOS): ‘<samp>make static</samp>’ and ‘<samp>make +<p>will make standalone libraries <samp class="file">libRmath.a</samp> and <samp class="file">libRmath.so</samp> +(<samp class="file">libRmath.dylib</samp> on macOS): ‘<samp class="samp">make static</samp>’ and ‘<samp class="samp">make shared</samp>’ will create just one of them. </p> <p>To use the routines in your own C or C++ programs, include </p> <div class="example"> -<pre class="example">#define MATHLIB_STANDALONE +<pre class="example-preformatted">#define MATHLIB_STANDALONE #include <Rmath.h> </pre></div> -<p>and link against ‘<samp>-lRmath</samp>’ (and ‘<samp>-lm</samp>’ if needed on your OS). -The example file <samp>test.c</samp> does nothing useful, but is provided to -test the process (via <code>make test</code>). Note that you will probably +<p>and link against ‘<samp class="samp">-lRmath</samp>’ (and ‘<samp class="samp">-lm</samp>’ if needed on your OS). +The example file <samp class="file">test.c</samp> does nothing useful, but is provided to +test the process (via <code class="command">make test</code>). Note that you will probably not be able to run it unless you add the directory containing -<span id="index-LD_005fLIBRARY_005fPATH"></span> -<samp>libRmath.so</samp> to the <code>LD_LIBRARY_PATH</code> environment variable -(<samp>libRmath.dylib</samp>, <code>DYLD_FALLBACK_LIBRARY_PATH</code> on macOS). +<a class="index-entry-id" id="index-LD_005fLIBRARY_005fPATH"></a> +<samp class="file">libRmath.so</samp> to the <code class="env">LD_LIBRARY_PATH</code> environment variable +(<samp class="file">libRmath.dylib</samp>, <code class="env">DYLD_FALLBACK_LIBRARY_PATH</code> on macOS). </p> <p>The targets </p> <div class="example"> -<pre class="example">make install +<pre class="example-preformatted">make install make uninstall </pre></div> -<p>will (un)install the header <samp>Rmath.h</samp> and shared and static -<span id="index-DESTDIR-1"></span> -libraries (if built). Both <code>prefix=</code> and <code>DESTDIR</code> are +<p>will (un)install the header <samp class="file">Rmath.h</samp> and shared and static +<a class="index-entry-id" id="index-DESTDIR-1"></a> +libraries (if built). Both <code class="code">prefix=</code> and <code class="env">DESTDIR</code> are supported, together with more precise control as described for the main build. </p> -<p>‘<samp>make install</samp>’ installs a file for <code>pkg-config</code> to use by +<p>‘<samp class="samp">make install</samp>’ installs a file for <code class="command">pkg-config</code> to use by e.g. </p> <div class="example"> -<pre class="example">$(CC) `pkg-config --cflags libRmath` -c test.c +<pre class="example-preformatted">$(CC) `pkg-config --cflags libRmath` -c test.c $(CC) `pkg-config --libs libRmath` test.o -o test </pre></div> -<p>On some systems ‘<samp>make install-strip</samp>’ will install a stripped shared +<p>On some systems ‘<samp class="samp">make install-strip</samp>’ will install a stripped shared library. </p> <hr> </div> -<div class="section" id="Windows-standalone"> -<span id="Windows-1"></span><h3 class="section">9.2 Windows</h3> +<div class="section-level-extent" id="Windows-standalone"> +<h3 class="section" id="Windows-1"><span>9.2 Windows<a class="copiable-link" href="#Windows-1"> ¶</a></span></h3> -<p>You need to set up<a id="DOCF39" href="#FOOT39"><sup>39</sup></a> almost all the +<p>You need to set up<a class="footnote" id="DOCF39" href="#FOOT39"><sup>39</sup></a> almost all the tools to make R and then run (in a Unix-like shell) </p> <div class="example"> -<pre class="example">(cd ../../gnuwin32; make MkRules) +<pre class="example-preformatted">(cd ../../gnuwin32; make MkRules) (cd ../../include; make -f Makefile.win config.h Rconfig.h Rmath.h) make -f Makefile.win </pre></div> -<p>Alternatively, in a <samp>cmd.exe</samp> shell use +<p>Alternatively, in a <samp class="file">cmd.exe</samp> shell use </p> <div class="example"> -<pre class="example">cd ../../include +<pre class="example-preformatted">cd ../../include make -f Makefile.win config.h Rconfig.h Rmath.h cd ../nmath/standalone make -f Makefile.win </pre></div> -<p>This creates a static library <samp>libRmath.a</samp> and a DLL -<samp>Rmath.dll</samp>. If you want an import library <samp>libRmath.dll.a</samp> +<p>This creates a static library <samp class="file">libRmath.a</samp> and a DLL +<samp class="file">Rmath.dll</samp>. If you want an import library <samp class="file">libRmath.dll.a</samp> (you don’t need one), use </p> <div class="example"> -<pre class="example">make -f Makefile.win shared implib +<pre class="example-preformatted">make -f Makefile.win shared implib </pre></div> <p>To use the routines in your own C or C++ programs using MinGW-w64, include </p> <div class="example"> -<pre class="example">#define MATHLIB_STANDALONE +<pre class="example-preformatted">#define MATHLIB_STANDALONE #include <Rmath.h> </pre></div> -<p>and link against ‘<samp>-lRmath</samp>’. This will use the first found of -<samp>libRmath.dll.a</samp>, <samp>libRmath.a</samp> and <samp>Rmath.dll</samp> in that +<p>and link against ‘<samp class="samp">-lRmath</samp>’. This will use the first found of +<samp class="file">libRmath.dll.a</samp>, <samp class="file">libRmath.a</samp> and <samp class="file">Rmath.dll</samp> in that order, so the result depends on which files are present. You should be -able to force static or dynamic linking <em>via</em> +able to force static or dynamic linking <em class="emph">via</em> </p> <div class="example"> -<pre class="example">-Wl,-Bstatic -lRmath -Wl,Bdynamic +<pre class="example-preformatted">-Wl,-Bstatic -lRmath -Wl,Bdynamic -Wl,-Bdynamic -lRmath </pre></div> -<p>or by linking to explicit files (as in the ‘<samp>test</samp>’ target in -<samp>Makefile.win</samp>: this makes two executables, <samp>test.exe</samp> which -is dynamically linked, and <samp>test-static.exe</samp>, which is statically +<p>or by linking to explicit files (as in the ‘<samp class="samp">test</samp>’ target in +<samp class="file">Makefile.win</samp>: this makes two executables, <samp class="file">test.exe</samp> which +is dynamically linked, and <samp class="file">test-static.exe</samp>, which is statically linked). </p> -<p>It is possible to link to <samp>Rmath.dll</samp> using other compilers, either +<p>It is possible to link to <samp class="file">Rmath.dll</samp> using other compilers, either directly or via an import library: if you make a MinGW-w64 import library as -above, you will create a file <samp>Rmath.def</samp> which can be used +above, you will create a file <samp class="file">Rmath.def</samp> which can be used (possibly after editing) to create an import library for other systems such as Visual C++. </p> <p>If you make use of dynamic linking you should use </p> <div class="example"> -<pre class="example">#define MATHLIB_STANDALONE +<pre class="example-preformatted">#define MATHLIB_STANDALONE #define RMATH_DLL #include <Rmath.h> </pre></div> -<p>to ensure that the constants like <code>NA_REAL</code> are linked correctly. +<p>to ensure that the constants like <code class="code">NA_REAL</code> are linked correctly. (Auto-import will probably work with MinGW-w64, but it is better to be sure. This is likely to also work with VC++, Borland and similar compilers.) @@ -3188,294 +3182,294 @@ <hr> </div> </div> -<div class="appendix" id="Essential-and-useful-other-programs-under-a-Unix_002dalike"> -<span id="Essential-and-useful-other-programs-under-a-Unix_002dalike-1"></span><h2 class="appendix">Appendix A Essential and useful other programs under a Unix-alike</h2> +<div class="appendix-level-extent" id="Essential-and-useful-other-programs-under-a-Unix_002dalike"> +<h2 class="appendix" id="Essential-and-useful-other-programs-under-a-Unix_002dalike-1"><span>Appendix A Essential and useful other programs under a Unix-alike<a class="copiable-link" href="#Essential-and-useful-other-programs-under-a-Unix_002dalike-1"> ¶</a></span></h2> <p>This appendix gives details of programs you will need to build R on Unix-like platforms, or which will be used by R if found by -<code>configure</code>. +<code class="command">configure</code>. </p> -<p>Remember that some package management systems (such as <abbr>RPM</abbr> and +<p>Remember that some package management systems (such as <abbr class="abbr">RPM</abbr> and Debian/Ubuntu’s) make a distinction between the user version of a package and the development version. The latter usually has the same -name but with the extension ‘<samp>-devel</samp>’ or ‘<samp>-dev</samp>’: you need both +name but with the extension ‘<samp class="samp">-devel</samp>’ or ‘<samp class="samp">-dev</samp>’: you need both versions installed. </p> <hr> -<div class="section" id="Essential-programs-and-libraries"> -<span id="Essential-programs-and-libraries-1"></span><h3 class="section">A.1 Essential programs and libraries</h3> +<div class="section-level-extent" id="Essential-programs-and-libraries"> +<h3 class="section" id="Essential-programs-and-libraries-1"><span>A.1 Essential programs and libraries<a class="copiable-link" href="#Essential-programs-and-libraries-1"> ¶</a></span></h3> -<p>You need a means of compiling C and Fortran 90 (see <a href="#Using-Fortran">Using Fortran</a>). Your C compiler should be -<acronym>ISO</acronym>/<acronym>IEC</acronym> 60059<a id="DOCF40" href="#FOOT40"><sup>40</sup></a>, POSIX 1003.1 and C99-compliant.<a id="DOCF41" href="#FOOT41"><sup>41</sup></a> R tries to choose suitable -flags<a id="DOCF42" href="#FOOT42"><sup>42</sup></a> for the C compilers it knows about, but you may have to -set <code>CC</code> or <code>CFLAGS</code> suitably. (Note that options essential +<p>You need a means of compiling C and Fortran 90 (see <a class="ref" href="#Using-Fortran">Using Fortran</a>). Your C compiler should be +<abbr class="acronym">ISO</abbr>/<abbr class="acronym">IEC</abbr> 60059<a class="footnote" id="DOCF40" href="#FOOT40"><sup>40</sup></a>, POSIX 1003.1 and C99-compliant.<a class="footnote" id="DOCF41" href="#FOOT41"><sup>41</sup></a> R tries to choose suitable +flags<a class="footnote" id="DOCF42" href="#FOOT42"><sup>42</sup></a> for the C compilers it knows about, but you may have to +set <code class="code">CC</code> or <code class="code">CFLAGS</code> suitably. (Note that options essential to run the compiler even for linking, such as those to set the -architecture, should be specified as part of <code>CC</code> rather than in -<code>CFLAGS</code>.) +architecture, should be specified as part of <code class="code">CC</code> rather than in +<code class="code">CFLAGS</code>.) </p> <p>Unless you do not want to view graphs on-screen (or use macOS) you need -‘<samp>X11</samp>’ installed, including its headers and client libraries. For -recent Fedora/RedHat distributions it means (at least) <abbr>RPM</abbr>s -‘<samp>libX11</samp>’, ‘<samp>libX11-devel</samp>’, ‘<samp>libXt</samp>’ and ‘<samp>libXt-devel</samp>’. -On Debian/Ubuntu we recommend the meta-package ‘<samp>xorg-dev</samp>’. If you +‘<samp class="samp">X11</samp>’ installed, including its headers and client libraries. For +recent Fedora/RedHat distributions it means (at least) <abbr class="abbr">RPM</abbr>s +‘<samp class="samp">libX11</samp>’, ‘<samp class="samp">libX11-devel</samp>’, ‘<samp class="samp">libXt</samp>’ and ‘<samp class="samp">libXt-devel</samp>’. +On Debian/Ubuntu we recommend the meta-package ‘<samp class="samp">xorg-dev</samp>’. If you really do not want these you will need to explicitly configure R -without X11, using <samp>--with-x=no</samp>. +without X11, using <samp class="option">--with-x=no</samp>. </p> <p>The command-line editing (and command completion) depends on the -<acronym>GNU</acronym> <code>readline</code> library (including its headers): version +<abbr class="acronym">GNU</abbr> <code class="code">readline</code> library (including its headers): version 6.0 or later is needed for all the features to be enabled. Otherwise -you will need to configure with <samp>--with-readline=no</samp> (or +you will need to configure with <samp class="option">--with-readline=no</samp> (or equivalent). </p> -<p>A suitably comprehensive <code>iconv</code> function is essential. The R -usage requires <code>iconv</code> to be able to translate between -<code>"latin1"</code> and <code>"UTF-8"</code>, to recognize <code>""</code> (as the -current encoding) and <code>"ASCII"</code>, and to translate to and from the -Unicode wide-character formats <code>"UCS-[24][BL]E"</code> — this is true -by default for <code>glibc</code><a id="DOCF43" href="#FOOT43"><sup>43</sup></a> but not of most commercial Unixes. However, you -can make use of <acronym>GNU</acronym> <code>libiconv</code> (as used on macOS: see -<a href="https://www.gnu.org/software/libiconv/">https://www.gnu.org/software/libiconv/</a>). +<p>A suitably comprehensive <code class="code">iconv</code> function is essential. The R +usage requires <code class="code">iconv</code> to be able to translate between +<code class="code">"latin1"</code> and <code class="code">"UTF-8"</code>, to recognize <code class="code">""</code> (as the +current encoding) and <code class="code">"ASCII"</code>, and to translate to and from the +Unicode wide-character formats <code class="code">"UCS-[24][BL]E"</code> — this is true +by default for <code class="code">glibc</code><a class="footnote" id="DOCF43" href="#FOOT43"><sup>43</sup></a> but not of most commercial Unixes. However, you +can make use of <abbr class="acronym">GNU</abbr> <code class="code">libiconv</code> (as used on macOS: see +<a class="uref" href="https://www.gnu.org/software/libiconv/">https://www.gnu.org/software/libiconv/</a>). </p> -<p>The OS needs to have enough support<a id="DOCF44" href="#FOOT44"><sup>44</sup></a> for wide-character +<p>The OS needs to have enough support<a class="footnote" id="DOCF44" href="#FOOT44"><sup>44</sup></a> for wide-character types: this is checked at configuration. Some C99 -functions<a id="DOCF45" href="#FOOT45"><sup>45</sup></a> are required and checked for at -configuration. A small number of POSIX functions<a id="DOCF46" href="#FOOT46"><sup>46</sup></a> are essential, and others<a id="DOCF47" href="#FOOT47"><sup>47</sup></a> will be used if available. +functions<a class="footnote" id="DOCF45" href="#FOOT45"><sup>45</sup></a> are required and checked for at +configuration. A small number of POSIX functions<a class="footnote" id="DOCF46" href="#FOOT46"><sup>46</sup></a> are essential, and others<a class="footnote" id="DOCF47" href="#FOOT47"><sup>47</sup></a> will be used if available. </p> -<p>Installations of <code>zlib</code> (version 1.2.5 or later), <code>libbz2</code> -(version 1.0.6 or later: called <strong>bzip2-libs</strong>/<strong>bzip2-devel</strong> or -<strong>libbz2-1.0</strong>/<strong>libbz2-dev</strong> by some Linux distributions) and -<code>liblzma</code><a id="DOCF48" href="#FOOT48"><sup>48</sup></a> version 5.0.3 or +<p>Installations of <code class="code">zlib</code> (version 1.2.5 or later), <code class="code">libbz2</code> +(version 1.0.6 or later: called <strong class="strong">bzip2-libs</strong>/<strong class="strong">bzip2-devel</strong> or +<strong class="strong">libbz2-1.0</strong>/<strong class="strong">libbz2-dev</strong> by some Linux distributions) and +<code class="code">liblzma</code><a class="footnote" id="DOCF48" href="#FOOT48"><sup>48</sup></a> version 5.0.3 or later are required. </p> <p>Either PCRE1 (version 8.32 or later, formerly known as just PCRE) or PCRE2 is required: PCRE2 is preferred and using PCRE1 requires -<code>configure</code> option <samp>--with-pcre1</samp>. Only the 8-bit -library and headers are needed if these are packaged separately. <abbr>JIT</abbr> +<code class="command">configure</code> option <samp class="option">--with-pcre1</samp>. Only the 8-bit +library and headers are needed if these are packaged separately. <abbr class="abbr">JIT</abbr> support (optional) is desirable for the best performance. For PCRE2 >= 10.30 (which is desirable as matching has been re-written not to use recursion and the Unicode tables were updated to version 10) </p><div class="example"> -<pre class="example">./configure --enable-jit +<pre class="example-preformatted">./configure --enable-jit </pre></div> <p>suffices. If building PCRE1 for use with R a suitable -<code>configure</code> command might be +<code class="command">configure</code> command might be </p><div class="example"> -<pre class="example">./configure --enable-utf --enable-unicode-properties --enable-jit --disable-cpp +<pre class="example-preformatted">./configure --enable-utf --enable-unicode-properties --enable-jit --disable-cpp </pre></div> -<p>The <samp>--enable-jit</samp> flag is supported for most common CPUs but -does not work (well or at all) for ‘<samp>arm64</samp>’ macOS. +<p>The <samp class="option">--enable-jit</samp> flag is supported for most common CPUs but +does not work (well or at all) for ‘<samp class="samp">arm64</samp>’ macOS. </p> <p>Some packages require the ‘Unicode properties’ which are -optional for PCRE1: support for this and <abbr>JIT</abbr> can be checked at run-time -by calling <code>pcre_config()</code>. +optional for PCRE1: support for this and <abbr class="abbr">JIT</abbr> can be checked at run-time +by calling <code class="code">pcre_config()</code>. </p> -<p>Library <code>libcurl</code> (version 7.28.0 or later) is required. -Information on <code>libcurl</code> is found from the <code>curl-config</code> -script: if that is missing or needs to be overridden<a id="DOCF49" href="#FOOT49"><sup>49</sup></a> there are macros to do so described in file -<samp>config.site</samp>. +<p>Library <code class="code">libcurl</code> (version 7.28.0 or later) is required. +Information on <code class="code">libcurl</code> is found from the <code class="command">curl-config</code> +script: if that is missing or needs to be overridden<a class="footnote" id="DOCF49" href="#FOOT49"><sup>49</sup></a> there are macros to do so described in file +<samp class="file">config.site</samp>. </p> -<p>A <code>tar</code> program is needed to unpack the sources and packages -(including the recommended packages). A version<a id="DOCF50" href="#FOOT50"><sup>50</sup></a> that can +<p>A <code class="command">tar</code> program is needed to unpack the sources and packages +(including the recommended packages). A version<a class="footnote" id="DOCF50" href="#FOOT50"><sup>50</sup></a> that can automagically detect compressed archives is preferred for use with -<code>untar()</code>: the configure script looks for <code>gtar</code> and -<code>gnutar</code> before -<span id="index-TAR"></span> -<code>tar</code> – use environment variable <code>TAR</code> to override this. -(On NetBSD/OpenBSD systems set this to <code>bsdtar</code> if that is +<code class="code">untar()</code>: the configure script looks for <code class="command">gtar</code> and +<code class="command">gnutar</code> before +<a class="index-entry-id" id="index-TAR"></a> +<code class="command">tar</code> – use environment variable <code class="env">TAR</code> to override this. +(On NetBSD/OpenBSD systems set this to <code class="command">bsdtar</code> if that is installed.) </p> -<p>There need to be suitable versions of the tools <code>grep</code> and -<code>sed</code>: the problems are usually with old AT&T and BSD variants. -<code>configure</code> will try to find suitable versions (including -looking in <samp>/usr/xpg4/bin</samp> which is used on some commercial +<p>There need to be suitable versions of the tools <code class="command">grep</code> and +<code class="command">sed</code>: the problems are usually with old AT&T and BSD variants. +<code class="command">configure</code> will try to find suitable versions (including +looking in <samp class="file">/usr/xpg4/bin</samp> which is used on some commercial Unixes). </p> <p>You will not be able to build most of the manuals unless you have -<code>texi2any</code> version 5.1 or later installed (which requires -<code>perl</code>), and if not most of the <acronym>HTML</acronym> manuals will be linked -to a version on <acronym>CRAN</acronym>. To make PDF versions of the manuals you -will also need file <samp>texinfo.tex</samp> installed (which is part of the -<acronym>GNU</acronym> <strong>texinfo</strong> distribution but is often made part of the +<code class="command">texi2any</code> version 5.1 or later installed (which requires +<code class="command">perl</code>), and if not most of the <abbr class="acronym">HTML</abbr> manuals will be linked +to a version on <abbr class="acronym">CRAN</abbr>. To make PDF versions of the manuals you +will also need file <samp class="file">texinfo.tex</samp> installed (which is part of the +<abbr class="acronym">GNU</abbr> <strong class="strong">texinfo</strong> distribution but is often made part of the TeX package in re-distributions) as well as -<code>texi2dvi</code>.<a id="DOCF51" href="#FOOT51"><sup>51</sup></a> -Further, the versions of <code>texi2dvi</code> and <samp>texinfo.tex</samp> need +<code class="command">texi2dvi</code>.<a class="footnote" id="DOCF51" href="#FOOT51"><sup>51</sup></a> +Further, the versions of <code class="command">texi2dvi</code> and <samp class="file">texinfo.tex</samp> need to be compatible: we have seen problems with older TeX distributions. </p> -<span id="index-Subversion-1"></span> +<a class="index-entry-id" id="index-Subversion-1"></a> <p>If you want to build from the R Subversion repository then -<code>texi2any</code> is highly recommended as it is used to create files +<code class="command">texi2any</code> is highly recommended as it is used to create files which are in the tarball but not stored in the Subversion repository. </p> -<span id="index-Vignettes"></span> -<p>The PDF documentation (including <samp>doc/NEWS.pdf</samp>) and building -vignettes needs <code>pdftex</code> and <code>pdflatex</code>. We require -LaTeX version <code>2005/12/01</code> or later (for UTF-8 support). +<a class="index-entry-id" id="index-Vignettes"></a> +<p>The PDF documentation (including <samp class="file">doc/NEWS.pdf</samp>) and building +vignettes needs <code class="command">pdftex</code> and <code class="command">pdflatex</code>. We require +LaTeX version <code class="code">2005/12/01</code> or later (for UTF-8 support). Building PDF package manuals (including the R reference manual) and vignettes is sensitive to the version of the LaTeX package -<strong>hyperref</strong> and we recommend that the TeX distribution used is +<strong class="strong">hyperref</strong> and we recommend that the TeX distribution used is kept up-to-date. A number of standard LaTeX packages are required for the PDF manuals -(including <strong>url</strong> and some of the font packages such as <strong>times</strong> -and <strong>helvetic</strong> and also <strong>amsfonts</strong>) and others such -as <strong>hyperref</strong> and <strong>inconsolata</strong> are desirable (and without them -you may need to change R’s defaults: see <a href="#Making-the-manuals">Making the manuals</a>). -Note that package <strong>hyperref</strong> (currently) requires packages -<strong>kvoptions</strong>, <strong>ltxcmds</strong> and <strong>refcount</strong>, -and <strong>inconsolata</strong> requires <strong>xkeyval</strong>. -Building the base vignettes requires <strong>fancyvrb</strong>, -<strong>natbib</strong>, <strong>parskip</strong> (which currently requires <strong>etoolbox</strong>) -and <strong>listings</strong>. +(including <strong class="strong">url</strong> and some of the font packages such as <strong class="strong">times</strong> +and <strong class="strong">helvetic</strong> and also <strong class="strong">amsfonts</strong>) and others such +as <strong class="strong">hyperref</strong> and <strong class="strong">inconsolata</strong> are desirable (and without them +you may need to change R’s defaults: see <a class="pxref" href="#Making-the-manuals">Making the manuals</a>). +Note that package <strong class="strong">hyperref</strong> (currently) requires packages +<strong class="strong">kvoptions</strong>, <strong class="strong">ltxcmds</strong> and <strong class="strong">refcount</strong>, +and <strong class="strong">inconsolata</strong> requires <strong class="strong">xkeyval</strong>. +Building the base vignettes requires <strong class="strong">fancyvrb</strong>, +<strong class="strong">natbib</strong>, <strong class="strong">parskip</strong> (which currently requires <strong class="strong">etoolbox</strong>) +and <strong class="strong">listings</strong>. For distributions based on TeX Live the simplest approach may be to install collections -<strong>collection-latex</strong>, <strong>collection-fontsrecommended</strong>, -<strong>collection-latexrecommended</strong>, <strong>collection-fontsextra</strong> and -<strong>collection-latexextra</strong> (assuming they are not installed by -default): Fedora uses names like <strong>texlive-collection-fontsextra</strong> and -Debian/Ubuntu like <strong>texlive-fonts-extra</strong>. +<strong class="strong">collection-latex</strong>, <strong class="strong">collection-fontsrecommended</strong>, +<strong class="strong">collection-latexrecommended</strong>, <strong class="strong">collection-fontsextra</strong> and +<strong class="strong">collection-latexextra</strong> (assuming they are not installed by +default): Fedora uses names like <strong class="strong">texlive-collection-fontsextra</strong> and +Debian/Ubuntu like <strong class="strong">texlive-fonts-extra</strong>. </p> -<p>Programs <code>qpdf</code> and Ghostscript (<code>gs</code>) are desirable as +<p>Programs <code class="command">qpdf</code> and Ghostscript (<code class="command">gs</code>) are desirable as these will be used to compact the installed PDF vignettes and any PDF manuals. </p> -<span id="index-PATH"></span> -<p>The essential programs should be in your <code>PATH</code> at the time -<code>configure</code> is run: this will capture the full paths. +<a class="index-entry-id" id="index-PATH"></a> +<p>The essential programs should be in your <code class="env">PATH</code> at the time +<code class="command">configure</code> is run: this will capture the full paths. </p> <p>For date-times to work correctly it is essential that the tables defining time zones are installed: these are usually in an OS component -named something like <code>tzdata</code>. On most OSes they are required +named something like <code class="code">tzdata</code>. On most OSes they are required but installations of Alpine Linux have been seen without them. There is -a <code>configure</code> check that recent date-times to work correctly in +a <code class="command">configure</code> check that recent date-times to work correctly in different time zones which catches this when installing from source (but not for binary distributions). </p> <p>Those distributing binary versions of R may need to be aware of the licences of the external libraries it is linked to (including ‘useful’ -libraries from the next section). The <code>liblzma</code> library is in the -public domain and X11, <code>libbzip2</code>, <code>libcurl</code> and <code>zlib</code> +libraries from the next section). The <code class="code">liblzma</code> library is in the +public domain and X11, <code class="code">libbzip2</code>, <code class="code">libcurl</code> and <code class="code">zlib</code> have MIT-style licences. PCRE and PCRE2 have a BSD-style licence which requires distribution of the licence (included in R’s -<samp>COPYRIGHTS</samp> file) in binary distributions. GNU <code>readline</code> is +<samp class="file">COPYRIGHTS</samp> file) in binary distributions. GNU <code class="code">readline</code> is licensed under GPL (which version(s) of GPL depends on the -<code>readline</code> version). +<code class="code">readline</code> version). </p> <hr> </div> -<div class="section" id="Useful-libraries-and-programs"> -<span id="Useful-libraries-and-programs-1"></span><h3 class="section">A.2 Useful libraries and programs</h3> +<div class="section-level-extent" id="Useful-libraries-and-programs"> +<h3 class="section" id="Useful-libraries-and-programs-1"><span>A.2 Useful libraries and programs<a class="copiable-link" href="#Useful-libraries-and-programs-1"> ¶</a></span></h3> -<p>The ability to use translated messages makes use of <code>gettext</code> and -most likely needs <acronym>GNU</acronym> <code>gettext</code>: you do need this to work -with new translations, but otherwise the version of the <code>gettext</code> +<p>The ability to use translated messages makes use of <code class="code">gettext</code> and +most likely needs <abbr class="acronym">GNU</abbr> <code class="code">gettext</code>: you do need this to work +with new translations, but otherwise the version of the <code class="code">gettext</code> runtime contained in the R sources will be used if no suitable external -<code>gettext</code> is found. +<code class="code">gettext</code> is found. </p> -<span id="index-Cairo-1"></span> -<span id="index-Pango"></span> -<p>The ‘modern’ version of the <code>X11()</code>, <code>jpeg()</code>, <code>png()</code> -and <code>tiff()</code> graphics devices uses the Cairo and Pango libraries. +<a class="index-entry-id" id="index-Cairo-1"></a> +<a class="index-entry-id" id="index-Pango"></a> +<p>The ‘modern’ version of the <code class="code">X11()</code>, <code class="code">jpeg()</code>, <code class="code">png()</code> +and <code class="code">tiff()</code> graphics devices uses the Cairo and Pango libraries. Cairo version 1.2.0 or later and Pango version 1.10 or later are required (but much later versions are current). R checks for -<code>pkg-config</code>, and uses that to check first that the -‘<samp>pangocairo</samp>’ package is installed (and if not, ‘<samp>cairo</samp>’) then +<code class="command">pkg-config</code>, and uses that to check first that the +‘<samp class="samp">pangocairo</samp>’ package is installed (and if not, ‘<samp class="samp">cairo</samp>’) then if suitable code can be compiled. These tests will fail if -<code>pkg-config</code> is not installed<a id="DOCF52" href="#FOOT52"><sup>52</sup></a>, and might fail if <code>cairo</code> was built -statically unless <code>configure</code> option -<samp>--with-static-cairo</samp> is used. Most systems with <code>Gtk+</code> 2.8 +<code class="command">pkg-config</code> is not installed<a class="footnote" id="DOCF52" href="#FOOT52"><sup>52</sup></a>, and might fail if <code class="code">cairo</code> was built +statically unless <code class="command">configure</code> option +<samp class="option">--with-static-cairo</samp> is used. Most systems with <code class="code">Gtk+</code> 2.8 or later installed will have suitable libraries: for Fedora users the -<code>pango-devel</code> <abbr>RPM</abbr> and its dependencies suffice. +<code class="code">pango-devel</code> <abbr class="abbr">RPM</abbr> and its dependencies suffice. It is possible (but very unusual on a platform with X11) to build Cairo -without its <code>cairo-xlib</code> module in which case <code>X11(type = +without its <code class="code">cairo-xlib</code> module in which case <code class="code">X11(type = "cairo")</code> will not be available. Pango is optional but highly desirable as it is likely to give much better text rendering, including kerning. </p> <p>For the best font experience with these devices you need suitable fonts -installed: Linux users will want the <code>urw-fonts</code> package. On -platforms which have it available, the <code>msttcorefonts</code> -package<a id="DOCF53" href="#FOOT53"><sup>53</sup></a> provides +installed: Linux users will want the <code class="code">urw-fonts</code> package. On +platforms which have it available, the <code class="code">msttcorefonts</code> +package<a class="footnote" id="DOCF53" href="#FOOT53"><sup>53</sup></a> provides TrueType versions of Monotype fonts such as Arial and Times New Roman. Another useful set of fonts is the ‘liberation’ TrueType fonts available at -<a href="https://pagure.io/liberation-fonts">https://pagure.io/liberation-fonts</a>,<a id="DOCF54" href="#FOOT54"><sup>54</sup></a> which cover the Latin, Greek and Cyrillic alphabets +<a class="uref" href="https://pagure.io/liberation-fonts">https://pagure.io/liberation-fonts</a>,<a class="footnote" id="DOCF54" href="#FOOT54"><sup>54</sup></a> which cover the Latin, Greek and Cyrillic alphabets plus a fair range of signs. These share metrics with Arial, Times New Roman and Courier New, and contain fonts rather similar to the first two -(<a href="https://en.wikipedia.org/wiki/Liberation_fonts">https://en.wikipedia.org/wiki/Liberation_fonts</a>). Then there +(<a class="uref" href="https://en.wikipedia.org/wiki/Liberation_fonts">https://en.wikipedia.org/wiki/Liberation_fonts</a>). Then there is the ‘Free UCS Outline Fonts’ project -(<a href="https://www.gnu.org/software/freefont/">https://www.gnu.org/software/freefont/</a>) which are +(<a class="uref" href="https://www.gnu.org/software/freefont/">https://www.gnu.org/software/freefont/</a>) which are OpenType/TrueType fonts based on the URW fonts but with extended Unicode -coverage. See the R help on <code>X11</code> on selecting such fonts. +coverage. See the R help on <code class="code">X11</code> on selecting such fonts. </p> -<p>The bitmapped graphics devices <code>jpeg()</code>, <code>png()</code> and -<code>tiff()</code> need the appropriate headers and libraries installed: -<code>jpeg</code> (version 6b or later, or <code>libjpeg-turbo</code>) or -<code>libpng</code> (version 1.2.7 or later) and <code>zlib</code> or <code>libtiff</code> +<p>The bitmapped graphics devices <code class="code">jpeg()</code>, <code class="code">png()</code> and +<code class="code">tiff()</code> need the appropriate headers and libraries installed: +<code class="code">jpeg</code> (version 6b or later, or <code class="code">libjpeg-turbo</code>) or +<code class="code">libpng</code> (version 1.2.7 or later) and <code class="code">zlib</code> or <code class="code">libtiff</code> respectively. -<code>pkg-config</code> is used if available and so needs the appropriate -<samp>.pc</samp> file (which requires <code>libtiff</code> version 4.x and is not -available on all platforms for <code>jpeg</code> before version 9c). They -also need support for either <code>X11</code> or <code>cairo</code> (see above). -Should support for these devices <strong>not</strong> be required or broken -system libraries need to be avoided there are <code>configure</code> -options <samp>--without-libpng</samp>, <samp>--without-jpeglib</samp> and -<samp>--without-libtiff</samp>. The TIFF library has many optional features -such as <code>jpeg</code>, <code>libz</code>, <code>zstd</code>, <code>lzma</code>, <code>webp</code>, -<code>jbig</code> and <code>jpeg12</code>, none of which is required for the -<code>tiff()</code> devices but may need to be present to link the library -(usually only an issue for static linking). <code>pkg-config</code> can +<code class="command">pkg-config</code> is used if available and so needs the appropriate +<samp class="file">.pc</samp> file (which requires <code class="code">libtiff</code> version 4.x and is not +available on all platforms for <code class="code">jpeg</code> before version 9c). They +also need support for either <code class="code">X11</code> or <code class="code">cairo</code> (see above). +Should support for these devices <strong class="strong">not</strong> be required or broken +system libraries need to be avoided there are <code class="command">configure</code> +options <samp class="option">--without-libpng</samp>, <samp class="option">--without-jpeglib</samp> and +<samp class="option">--without-libtiff</samp>. The TIFF library has many optional features +such as <code class="code">jpeg</code>, <code class="code">libz</code>, <code class="code">zstd</code>, <code class="code">lzma</code>, <code class="code">webp</code>, +<code class="code">jbig</code> and <code class="code">jpeg12</code>, none of which is required for the +<code class="code">tiff()</code> devices but may need to be present to link the library +(usually only an issue for static linking). <code class="command">pkg-config</code> can tell you what other libraries are required for linking, for example by -<code>pkg-config libtiff-4 --static --libs</code>. +<code class="code">pkg-config libtiff-4 --static --libs</code>. </p> -<p>Option <samp>--with-system-tre</samp> is also available: it needs a recent -version of TRE. (The latest sources are in the <code>git</code> repository -at <a href="https://github.com/laurikari/tre/">https://github.com/laurikari/tre/</a>, but at the time of writing +<p>Option <samp class="option">--with-system-tre</samp> is also available: it needs a recent +version of TRE. (The latest sources are in the <code class="command">git</code> repository +at <a class="url" href="https://github.com/laurikari/tre/">https://github.com/laurikari/tre/</a>, but at the time of writing the resulting build did not complete its checks, nor did R built against the version supplied by Fedora.) </p> -<p>An implementation of <acronym>XDR</acronym> is required, and the R sources +<p>An implementation of <abbr class="acronym">XDR</abbr> is required, and the R sources contain one which is likely to suffice (although a system version may -have higher performance). <acronym>XDR</acronym> is part of <acronym>RPC</acronym> and -historically has been part of <samp>libc</samp> on a Unix-alike. (In -principle <code>man xdr_string</code> should tell you which library is +have higher performance). <abbr class="acronym">XDR</abbr> is part of <abbr class="acronym">RPC</abbr> and +historically has been part of <samp class="file">libc</samp> on a Unix-alike. (In +principle <code class="command">man xdr_string</code> should tell you which library is needed, but it often does not: on some OSes it is provided by -<code>libnsl</code>.) However some builds<a id="DOCF55" href="#FOOT55"><sup>55</sup></a> of <code>glibc</code> omit or hide it with the intention -that the <acronym>TI-RPC</acronym> library be used, in which case <code>libtirpc</code> +<code class="code">libnsl</code>.) However some builds<a class="footnote" id="DOCF55" href="#FOOT55"><sup>55</sup></a> of <code class="code">glibc</code> omit or hide it with the intention +that the <abbr class="acronym">TI-RPC</abbr> library be used, in which case <code class="code">libtirpc</code> (and its development version) should be installed, and its -headers<a id="DOCF56" href="#FOOT56"><sup>56</sup></a> need to be on -the C include path or under <samp>/usr/include/tirpc</samp>. +headers<a class="footnote" id="DOCF56" href="#FOOT56"><sup>56</sup></a> need to be on +the C include path or under <samp class="file">/usr/include/tirpc</samp>. </p> -<p>Library <code>libdeflate</code> (<a href="https://github.com/ebiggers/libdeflate">https://github.com/ebiggers/libdeflate</a>) -is used by <code>memCompress()</code> and <code>memDecompress()</code> if available. +<p>Library <code class="code">libdeflate</code> (<a class="url" href="https://github.com/ebiggers/libdeflate">https://github.com/ebiggers/libdeflate</a>) +is used by <code class="code">memCompress()</code> and <code class="code">memDecompress()</code> if available. </p> -<p>Use of the X11 clipboard selection requires the <code>Xmu</code> headers and +<p>Use of the X11 clipboard selection requires the <code class="code">Xmu</code> headers and libraries. These are normally part of an X11 installation (e.g. the -Debian meta-package ‘<samp>xorg-dev</samp>’), but some distributions have split +Debian meta-package ‘<samp class="samp">xorg-dev</samp>’), but some distributions have split this into smaller parts, so for example recent versions of Fedora -require the ‘<samp>libXmu</samp>’ and ‘<samp>libXmu-devel</samp>’ <abbr>RPM</abbr>s. +require the ‘<samp class="samp">libXmu</samp>’ and ‘<samp class="samp">libXmu-devel</samp>’ <abbr class="abbr">RPM</abbr>s. </p> <p>Some systems (notably macOS and at least some FreeBSD systems) have inadequate support for collation in multibyte locales. It is possible to replace the OS’s collation support by that from ICU (International -Components for Unicode, <a href="https://icu.unicode.org/">https://icu.unicode.org/</a>), and this +Components for Unicode, <a class="uref" href="https://icu.unicode.org/">https://icu.unicode.org/</a>), and this provides much more precise control over collation on all systems. ICU is available as sources and as binary distributions for (at least) most -Linux distributions, FreeBSD, macOS and <abbr>AIX</abbr>, usually as <code>libicu</code> or -<code>icu4c</code>. It will be used by default where available: should a very +Linux distributions, FreeBSD, macOS and <abbr class="abbr">AIX</abbr>, usually as <code class="code">libicu</code> or +<code class="code">icu4c</code>. It will be used by default where available: should a very old or broken version of ICU be found this can be suppressed by -<samp>--without-ICU</samp>. +<samp class="option">--without-ICU</samp>. </p> -<p>The <code>bitmap</code> and <code>dev2bitmap</code> devices and function -<code>embedFonts()</code> use Ghostscript -(<a href="https://www.ghostscript.com/">https://www.ghostscript.com/</a>). This should either be in your +<p>The <code class="code">bitmap</code> and <code class="code">dev2bitmap</code> devices and function +<code class="code">embedFonts()</code> use Ghostscript +(<a class="uref" href="https://www.ghostscript.com/">https://www.ghostscript.com/</a>). This should either be in your path when the command is run, or its full path specified by the -environment variable <code>R_GSCMD</code> at that time. -<span id="index-R_005fGSCMD"></span> +environment variable <code class="env">R_GSCMD</code> at that time. +<a class="index-entry-id" id="index-R_005fGSCMD"></a> </p> <p>At the time of writing a full installation on Fedora Linux used the following packages and their development versions, and this may provide a useful checklist for other systems: </p><div class="example"> -<pre class="example">bzip2 cairo fontconfig freetype fribidi gcc gcc-gfortran gcc-c++ glib2 +<pre class="example-preformatted">bzip2 cairo fontconfig freetype fribidi gcc gcc-gfortran gcc-c++ glib2 glibc harfbuzz lapack libX11 libXext libXt libcurl libdeflate libicu libjpeg libpng libtiff libtirpc libxcrypt ncurses pango pkgconf-pkg-config pcre2 readline tcl tk xz zlib @@ -3484,100 +3478,100 @@ </p> <hr> -<div class="subsection" id="Tcl_002fTk"> -<span id="Tcl_002fTk-1"></span><h4 class="subsection">A.2.1 Tcl/Tk</h4> +<div class="subsection-level-extent" id="Tcl_002fTk"> +<h4 class="subsection" id="Tcl_002fTk-1"><span>A.2.1 Tcl/Tk<a class="copiable-link" href="#Tcl_002fTk-1"> ¶</a></span></h4> -<p>The <strong>tcltk</strong> package needs Tcl/Tk ≥ 8.4 installed: the sources are -available at <a href="https://www.tcl.tk/">https://www.tcl.tk/</a>. To specify the locations of the +<p>The <strong class="strong">tcltk</strong> package needs Tcl/Tk ≥ 8.4 installed: the sources are +available at <a class="uref" href="https://www.tcl.tk/">https://www.tcl.tk/</a>. To specify the locations of the Tcl/Tk files you may need the configuration options </p> -<dl compact="compact"> -<dt><span><samp>--with-tcltk</samp></span></dt> +<dl class="table"> +<dt><samp class="option">--with-tcltk</samp></dt> <dd><p>use Tcl/Tk, or specify its library directory </p></dd> -<dt><span><samp>--with-tcl-config=<var>TCL_CONFIG</var></samp></span></dt> -<dd><p>specify location of <samp>tclConfig.sh</samp> +<dt><samp class="option">--with-tcl-config=<var class="var">TCL_CONFIG</var></samp></dt> +<dd><p>specify location of <samp class="file">tclConfig.sh</samp> </p></dd> -<dt><span><samp>--with-tk-config=<var>TK_CONFIG</var></samp></span></dt> -<dd><p>specify location of <samp>tkConfig.sh</samp> +<dt><samp class="option">--with-tk-config=<var class="var">TK_CONFIG</var></samp></dt> +<dd><p>specify location of <samp class="file">tkConfig.sh</samp> </p></dd> </dl> -<p>or use the configure variables <code>TCLTK_LIBS</code> and -<code>TCLTK_CPPFLAGS</code> to specify the flags needed for linking against -the Tcl and Tk libraries and for finding the <samp>tcl.h</samp> and -<samp>tk.h</samp> headers, respectively. If you have both 32- and 64-bit +<p>or use the configure variables <code class="code">TCLTK_LIBS</code> and +<code class="code">TCLTK_CPPFLAGS</code> to specify the flags needed for linking against +the Tcl and Tk libraries and for finding the <samp class="file">tcl.h</samp> and +<samp class="file">tk.h</samp> headers, respectively. If you have both 32- and 64-bit versions of Tcl/Tk installed, specifying the paths to the correct config files may be necessary to avoid confusion between them. </p> <p>Versions of Tcl/Tk up to 8.5.19 and 8.6.12 have been tested (including most versions of 8.4.x, but not recently). </p> -<p>Note that the <samp>tk.h</samp> header includes<a id="DOCF57" href="#FOOT57"><sup>57</sup></a> X11 headers, so you will need X11 and its +<p>Note that the <samp class="file">tk.h</samp> header includes<a class="footnote" id="DOCF57" href="#FOOT57"><sup>57</sup></a> X11 headers, so you will need X11 and its development files installed. </p> <hr> </div> -<div class="subsection" id="Java-support"> -<span id="Java-support-1"></span><h4 class="subsection">A.2.2 Java support</h4> +<div class="subsection-level-extent" id="Java-support"> +<h4 class="subsection" id="Java-support-1"><span>A.2.2 Java support<a class="copiable-link" href="#Java-support-1"> ¶</a></span></h4> <p>The build process looks for Java support on the host system, and if it finds it sets some settings which are useful for Java-using packages -(such as <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and <a href="https://CRAN.R-project.org/package=JavaGD"><strong>JavaGD</strong></a>: installing these from -source requires a full <abbr>JDK</abbr>). This check can be suppressed by -configure option <samp>--disable-java</samp>. -<span id="index-JAVA_005fHOME"></span> -Configure variable <code>JAVA_HOME</code> can be set to point to a specific -<abbr>JRE</abbr>/<abbr>JDK</abbr>, on the <code>configure</code> command line or in the environment. +(such as <a class="url" href="https://CRAN.R-project.org/package=rJava"><strong class="strong">rJava</strong></a> and <a class="url" href="https://CRAN.R-project.org/package=JavaGD"><strong class="strong">JavaGD</strong></a>: installing these from +source requires a full <abbr class="abbr">JDK</abbr>). This check can be suppressed by +configure option <samp class="option">--disable-java</samp>. +<a class="index-entry-id" id="index-JAVA_005fHOME"></a> +Configure variable <code class="env">JAVA_HOME</code> can be set to point to a specific +<abbr class="abbr">JRE</abbr>/<abbr class="abbr">JDK</abbr>, on the <code class="command">configure</code> command line or in the environment. </p> <p>Principal amongst these settings are some paths to the Java libraries and JVM, which are stored in environment variable -<span id="index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH"></span> -<code>R_JAVA_LD_LIBRARY_PATH</code> in file <samp><var>R_HOME</var>/etc/ldpaths</samp> (or +<a class="index-entry-id" id="index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH"></a> +<code class="env">R_JAVA_LD_LIBRARY_PATH</code> in file <samp class="file"><var class="var">R_HOME</var>/etc/ldpaths</samp> (or a sub-architecture-specific version). A typical setting for -‘<samp>x86_64</samp>’ Linux is +‘<samp class="samp">x86_64</samp>’ Linux is </p> <div class="example"> -<pre class="example">JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc34.x86_64/jre +<pre class="example-preformatted">JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc34.x86_64/jre R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server </pre></div> -<p>Unfortunately this depends on the exact version of the <abbr>JRE</abbr>/<abbr>JDK</abbr> +<p>Unfortunately this depends on the exact version of the <abbr class="abbr">JRE</abbr>/<abbr class="abbr">JDK</abbr> installed, and so may need updating if the Java installation is updated. -This can be done by running <code>R CMD javareconf</code> which updates -settings in both <samp><var>R_HOME</var>/etc/Makeconf</samp> and -<samp><var>R_HOME</var>/etc/ldpaths</samp>. See <code>R CMD javareconf --help</code> for +This can be done by running <code class="code">R CMD javareconf</code> which updates +settings in both <samp class="file"><var class="var">R_HOME</var>/etc/Makeconf</samp> and +<samp class="file"><var class="var">R_HOME</var>/etc/ldpaths</samp>. See <code class="code">R CMD javareconf --help</code> for details: note that this needs to be done by the account owning the R installation. </p> <p>Another way of overriding those settings is to set the environment variable -<span id="index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH-1"></span> -<code>R_JAVA_LD_LIBRARY_PATH</code> (before R is started, hence not in -<samp>~/.Renviron</samp>), which suffices to run already-installed +<a class="index-entry-id" id="index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH-1"></a> +<code class="env">R_JAVA_LD_LIBRARY_PATH</code> (before R is started, hence not in +<samp class="file">~/.Renviron</samp>), which suffices to run already-installed Java-using packages. For example </p> <div class="example"> -<pre class="example">R_JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server +<pre class="example-preformatted">R_JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server </pre></div> <p>It may be possible to avoid this by specifying an invariant link as the path when configuring. For example, on that system any of </p> <div class="example"> -<pre class="example">JAVA_HOME=/usr/lib/jvm/java +<pre class="example-preformatted">JAVA_HOME=/usr/lib/jvm/java JAVA_HOME=/usr/lib/jvm/java-1.8.0 JAVA_HOME=/usr/lib/jvm/java-1.8.0/jre JAVA_HOME=/usr/lib/jvm/jre-1.8.0 </pre></div> -<p>worked (since the ‘auto’ setting of <code>/etc/alternatives</code> chose +<p>worked (since the ‘auto’ setting of <code class="command">/etc/alternatives</code> chose Java 8 aka 1.8.0). </p> <p>‘Non-server’ Oracle distributions of Java as from version 11 are of a -full <abbr>JDK</abbr>. However, Linux distributions can be confusing: for example +full <abbr class="abbr">JDK</abbr>. However, Linux distributions can be confusing: for example Fedora 38 had </p><div class="example"> -<pre class="example">java-1.8.0-openjdk +<pre class="example-preformatted">java-1.8.0-openjdk java-1.8.0-openjdk-devel java-11-openjdk java-11-openjdk-devel @@ -3586,51 +3580,51 @@ java-latest-openjdk java-latest-openjdk-devel </pre></div> -<p>where the <code>-devel</code> <abbr>RPM</abbr>s are needed to complete the <abbr>JDK</abbr>. Debian/Ubuntu use -‘<samp>-jre</samp>’ and ‘<samp>-jdk</samp>’, e.g. +<p>where the <code class="code">-devel</code> <abbr class="abbr">RPM</abbr>s are needed to complete the <abbr class="abbr">JDK</abbr>. Debian/Ubuntu use +‘<samp class="samp">-jre</samp>’ and ‘<samp class="samp">-jdk</samp>’, e.g. </p><div class="example"> -<pre class="example">sudo apt install default-jdk +<pre class="example-preformatted">sudo apt install default-jdk </pre></div> <hr> </div> -<div class="subsection" id="Other-compiled-languages"> -<span id="Other-compiled-languages-1"></span><h4 class="subsection">A.2.3 Other compiled languages</h4> +<div class="subsection-level-extent" id="Other-compiled-languages"> +<h4 class="subsection" id="Other-compiled-languages-1"><span>A.2.3 Other compiled languages<a class="copiable-link" href="#Other-compiled-languages-1"> ¶</a></span></h4> <p>Some add-on packages need a C++ compiler. This is specified by the -configure variables <code>CXX</code>, <code>CXXFLAGS</code> and similar. -<code>configure</code> will normally find a suitable compiler. It is +configure variables <code class="code">CXX</code>, <code class="code">CXXFLAGS</code> and similar. +<code class="command">configure</code> will normally find a suitable compiler. It is possible to specify an alternative C++17 compiler by the configure -variables <code>CXX17</code>, <code>CXX17STD</code>, <code>CXX17FLAGS</code> and similar -(see <a href="#C_002b_002b-Support">C++ Support</a>). Again, <code>configure</code> will normally find a -suitable value for <code>CXX17STD</code> if the compiler given by <code>CXX</code> +variables <code class="code">CXX17</code>, <code class="code">CXX17STD</code>, <code class="code">CXX17FLAGS</code> and similar +(see <a class="pxref" href="#C_002b_002b-Support">C++ Support</a>). Again, <code class="command">configure</code> will normally find a +suitable value for <code class="code">CXX17STD</code> if the compiler given by <code class="code">CXX</code> is capable of compiling C++17 code, but it is possible that a completely different compiler will be needed. (Similar macros are provided for C++20.) </p> -<p>For source files with extension <samp>.f90</samp> or <samp>.f95</samp> containing -free-form Fortran, the compiler defined by the macro <code>FC</code> is used -by <code>R CMD INSTALL</code>. Note that it is detected by the name of the +<p>For source files with extension <samp class="file">.f90</samp> or <samp class="file">.f95</samp> containing +free-form Fortran, the compiler defined by the macro <code class="code">FC</code> is used +by <code class="command">R CMD INSTALL</code>. Note that it is detected by the name of the command without a test that it can actually compile Fortran 90 code. -Set the configure variable <code>FC</code> to override this if necessary: -variables <code>FCFLAGS</code> and <code>FCLIBS_XTRA</code> might also need to be +Set the configure variable <code class="code">FC</code> to override this if necessary: +variables <code class="code">FCFLAGS</code> and <code class="code">FCLIBS_XTRA</code> might also need to be set. </p> -<p>See file <samp>config.site</samp> in the R source for more details about +<p>See file <samp class="file">config.site</samp> in the R source for more details about these variables. </p> <hr> </div> </div> -<div class="section" id="Linear-algebra"> -<span id="Linear-algebra-1"></span><h3 class="section">A.3 Linear algebra</h3> -<span id="index-BLAS-library"></span> +<div class="section-level-extent" id="Linear-algebra"> +<h3 class="section" id="Linear-algebra-1"><span>A.3 Linear algebra<a class="copiable-link" href="#Linear-algebra-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-BLAS-library"></a> -<p>The linear algebra routines in R make use of <acronym>BLAS</acronym> (Basic -Linear Algebra Subprograms, <a href="https://netlib.org/blas/faq.html">https://netlib.org/blas/faq.html</a>) -routines, and most make use of routines from <acronym>LAPACK</acronym> (Linear -Algebra PACKage, <a href="https://netlib.org/lapack/">https://netlib.org/lapack/</a>). The R +<p>The linear algebra routines in R make use of <abbr class="acronym">BLAS</abbr> (Basic +Linear Algebra Subprograms, <a class="uref" href="https://netlib.org/blas/faq.html">https://netlib.org/blas/faq.html</a>) +routines, and most make use of routines from <abbr class="acronym">LAPACK</abbr> (Linear +Algebra PACKage, <a class="uref" href="https://netlib.org/lapack/">https://netlib.org/lapack/</a>). The R sources contain reference (Fortran) implementations of these, but they can be replaced by external libraries, usually those tuned for speed on specific CPUs. These libraries normally contain all of the BLAS @@ -3640,34 +3634,34 @@ LAPACK it contains. </p> <p>Note that the alternative implementations will not give identical -numeric results. Some differences may be benign (such the signs of <abbr>SVD</abbr>s +numeric results. Some differences may be benign (such the signs of <abbr class="abbr">SVD</abbr>s and eigenvectors), but the optimized routines can be less accurate and (particularly for LAPACK) can be from older versions with fewer corrections. However, R relies on -<acronym>ISO</acronym>/<acronym>IEC</acronym> 60559 compliance. This can be broken +<abbr class="acronym">ISO</abbr>/<abbr class="acronym">IEC</abbr> 60559 compliance. This can be broken if for example the code assumes that terms with a zero factor are always -zero and do not need to be computed—whereas <code>x*0</code> can be -<code>NaN</code>. The internal BLAS has been extensively patched to avoid +zero and do not need to be computed—whereas <code class="code">x*0</code> can be +<code class="code">NaN</code>. The internal BLAS has been extensively patched to avoid this whereas MKL’s documentation has warned -</p><blockquote> +</p><blockquote class="quotation"> <p>LAPACK routines assume that input matrices do not contain IEEE 754 special values such as INF or NaN values. Using these special values may cause LAPACK to return unexpected results or become unstable. </p></blockquote> <p>Some of the external libraries are multi-threaded. One issue is -that R profiling (which uses the <code>SIGPROF</code> signal) may cause +that R profiling (which uses the <code class="code">SIGPROF</code> signal) may cause problems, and you may want to disable profiling if you use a -multi-threaded <acronym>BLAS</acronym>. Note that using a multi-threaded -<acronym>BLAS</acronym> can result in taking more <acronym>CPU</acronym> time and even +multi-threaded <abbr class="acronym">BLAS</abbr>. Note that using a multi-threaded +<abbr class="acronym">BLAS</abbr> can result in taking more <abbr class="acronym">CPU</abbr> time and even more elapsed time (occasionally dramatically so) than using a similar -single-threaded <acronym>BLAS</acronym>. On a machine running other tasks, there +single-threaded <abbr class="acronym">BLAS</abbr>. On a machine running other tasks, there can be contention for CPU caches that reduces the effectiveness of the -optimization of cache use by a <acronym>BLAS</acronym> implementation: some +optimization of cache use by a <abbr class="acronym">BLAS</abbr> implementation: some people warn that this is especially problematic for hyper-threaded CPUs. </p> <p>BLAS and LAPACK routines may be used inside threaded code, for example -in <abbr>OpenMP</abbr> sections in packages such as <a href="https://CRAN.R-project.org/package=mgcv"><strong>mgcv</strong></a>. The reference +in <abbr class="abbr">OpenMP</abbr> sections in packages such as <a class="url" href="https://CRAN.R-project.org/package=mgcv"><strong class="strong">mgcv</strong></a>. The reference implementations are thread-safe but external ones may not be (even single-threaded ones): this can lead to hard-to-track-down incorrect results or segfaults. @@ -3677,121 +3671,121 @@ </p> <hr> -<div class="subsection" id="BLAS"> -<span id="BLAS-1"></span><h4 class="subsection">A.3.1 BLAS</h4> +<div class="subsection-level-extent" id="BLAS"> +<h4 class="subsection" id="BLAS-1"><span>A.3.1 BLAS<a class="copiable-link" href="#BLAS-1"> ¶</a></span></h4> <p>An external BLAS library has to be explicitly requested at configure time. </p> -<p>You can specify a particular <acronym>BLAS</acronym> library <em>via</em> a value -for the configuration option <samp>--with-blas</samp>. If this is given -with no <code>=</code>, its value is taken from the -<span id="index-BLAS_005fLIBS"></span> -environment variable <code>BLAS_LIBS</code>, set for example in -<samp>config.site</samp>. If neither the option nor the environment variable -supply a value, a search is made for a suitable<a id="DOCF58" href="#FOOT58"><sup>58</sup></a> <acronym>BLAS</acronym>. If the +<p>You can specify a particular <abbr class="acronym">BLAS</abbr> library <em class="emph">via</em> a value +for the configuration option <samp class="option">--with-blas</samp>. If this is given +with no <code class="code">=</code>, its value is taken from the +<a class="index-entry-id" id="index-BLAS_005fLIBS"></a> +environment variable <code class="env">BLAS_LIBS</code>, set for example in +<samp class="file">config.site</samp>. If neither the option nor the environment variable +supply a value, a search is made for a suitable<a class="footnote" id="DOCF58" href="#FOOT58"><sup>58</sup></a> <abbr class="acronym">BLAS</abbr>. If the value is not obviously a linker command (starting with a dash or giving -the path to a library), it is prefixed by ‘<samp>-l</samp>’, so +the path to a library), it is prefixed by ‘<samp class="samp">-l</samp>’, so </p> <div class="example"> -<pre class="example">--with-blas="foo" +<pre class="example-preformatted">--with-blas="foo" </pre></div> -<p>is an instruction to link against ‘<samp>-lfoo</samp>’ to find an external -<acronym>BLAS</acronym> (which needs to be found both at link time and run time). +<p>is an instruction to link against ‘<samp class="samp">-lfoo</samp>’ to find an external +<abbr class="acronym">BLAS</abbr> (which needs to be found both at link time and run time). </p> -<p>The configure code checks that the external <acronym>BLAS</acronym> is complete +<p>The configure code checks that the external <abbr class="acronym">BLAS</abbr> is complete (as of LAPACK 3.9.1: it must include all double precision and double -complex routines, as well as <code>LSAME</code>), and appears to be usable. -However, an external <acronym>BLAS</acronym> has to be usable from a shared +complex routines, as well as <code class="code">LSAME</code>), and appears to be usable. +However, an external <abbr class="acronym">BLAS</abbr> has to be usable from a shared object (so must contain position-independent code), and that is not checked. Also, the BLAS can be switched after configure is run, either as a symbolic link or by the mechanisms mentioned below, and this can defeat the completeness check. </p> -<p>Some enhanced <acronym>BLAS</acronym>es are compiler-system-specific -(<code>Accelerate</code> on macOS, <code>sunperf</code> on Solaris<a id="DOCF59" href="#FOOT59"><sup>59</sup></a>, -<code>libessl</code> on IBM). The correct incantation for these is often -found <em>via</em> <samp>--with-blas</samp> with no value on the appropriate +<p>Some enhanced <abbr class="acronym">BLAS</abbr>es are compiler-system-specific +(<code class="code">Accelerate</code> on macOS, <code class="code">sunperf</code> on Solaris<a class="footnote" id="DOCF59" href="#FOOT59"><sup>59</sup></a>, +<code class="code">libessl</code> on IBM). The correct incantation for these is often +found <em class="emph">via</em> <samp class="option">--with-blas</samp> with no value on the appropriate platforms. </p> <p>Note that under Unix (but not under Windows) if R is compiled against -a non-default <acronym>BLAS</acronym> and <samp>--enable-BLAS-shlib</samp> is -<strong>not</strong> used (it is the default on all platforms except <abbr>AIX</abbr>), then -all <acronym>BLAS</acronym>-using packages must also be. So if R is re-built -to use an enhanced <acronym>BLAS</acronym> then packages such as -<a href="https://CRAN.R-project.org/package=quantreg"><strong>quantreg</strong></a> will need to be re-installed. +a non-default <abbr class="acronym">BLAS</abbr> and <samp class="option">--enable-BLAS-shlib</samp> is +<strong class="strong">not</strong> used (it is the default on all platforms except <abbr class="abbr">AIX</abbr>), then +all <abbr class="acronym">BLAS</abbr>-using packages must also be. So if R is re-built +to use an enhanced <abbr class="acronym">BLAS</abbr> then packages such as +<a class="url" href="https://CRAN.R-project.org/package=quantreg"><strong class="strong">quantreg</strong></a> will need to be re-installed. </p> <p>Debian/Ubuntu systems provide a system-specific way to switch the BLAS -in use: Build R with <samp>--with-blas</samp> to select the OS version of -the reference BLAS, and then use <code>update-alternatives</code> to switch +in use: Build R with <samp class="option">--with-blas</samp> to select the OS version of +the reference BLAS, and then use <code class="command">update-alternatives</code> to switch between the available BLAS libraries. See -<a href="https://wiki.debian.org/DebianScience/LinearAlgebraLibraries">https://wiki.debian.org/DebianScience/LinearAlgebraLibraries</a>. +<a class="uref" href="https://wiki.debian.org/DebianScience/LinearAlgebraLibraries">https://wiki.debian.org/DebianScience/LinearAlgebraLibraries</a>. </p> <p>Fedora 33 and later offer ‘FlexiBLAS’, a similar mechanism for switching the BLAS in use -(<a href="https://www.mpi-magdeburg.mpg.de/projects/flexiblas">https://www.mpi-magdeburg.mpg.de/projects/flexiblas</a>). However, -rather than overriding <code>libblas</code>, this requires configuring R -with option <samp>--with-blas=flexiblas</samp>. ‘Backend’ wrappers are -available for the reference BLAS, ATLAS and serial, threaded and <abbr>OpenMP</abbr> -builds of OpenBLAS and BLIS, and perhaps others<a id="DOCF60" href="#FOOT60"><sup>60</sup></a>. This can be controlled from a -running R session by package <a href="https://CRAN.R-project.org/package=flexiblas"><strong>flexiblas</strong></a>. +(<a class="uref" href="https://www.mpi-magdeburg.mpg.de/projects/flexiblas">https://www.mpi-magdeburg.mpg.de/projects/flexiblas</a>). However, +rather than overriding <code class="code">libblas</code>, this requires configuring R +with option <samp class="option">--with-blas=flexiblas</samp>. ‘Backend’ wrappers are +available for the reference BLAS, ATLAS and serial, threaded and <abbr class="abbr">OpenMP</abbr> +builds of OpenBLAS and BLIS, and perhaps others<a class="footnote" id="DOCF60" href="#FOOT60"><sup>60</sup></a>. This can be controlled from a +running R session by package <a class="url" href="https://CRAN.R-project.org/package=flexiblas"><strong class="strong">flexiblas</strong></a>. </p> <p>BLAS implementations which use parallel computations can be non-deterministic: this is known for ATLAS. </p> <hr> -<div class="subsubsection" id="ATLAS"> -<span id="ATLAS-1"></span><h4 class="subsubsection">A.3.1.1 ATLAS</h4> +<div class="subsubsection-level-extent" id="ATLAS"> +<h4 class="subsubsection" id="ATLAS-1"><span>A.3.1.1 ATLAS<a class="copiable-link" href="#ATLAS-1"> ¶</a></span></h4> -<p>ATLAS (<a href="https://math-atlas.sourceforge.net/">https://math-atlas.sourceforge.net/</a>) is a “tuned” -<acronym>BLAS</acronym> that runs on a wide range of Unix-alike platforms. +<p>ATLAS (<a class="uref" href="https://math-atlas.sourceforge.net/">https://math-atlas.sourceforge.net/</a>) is a “tuned” +<abbr class="acronym">BLAS</abbr> that runs on a wide range of Unix-alike platforms. Unfortunately it is built by default as a static library that on some platforms may not be able to be used with shared objects such as are used in R packages. Be careful when using pre-built versions of -ATLAS static libraries (they seem to work on ‘<samp>ix86</samp>’ platforms, -but not always on ‘<samp>x86_64</samp>’ ones). +ATLAS static libraries (they seem to work on ‘<samp class="samp">ix86</samp>’ platforms, +but not always on ‘<samp class="samp">x86_64</samp>’ ones). </p> <p>ATLAS contains replacements for a small number of LAPACK routines, but can be built to merge these with the reference LAPACK sources to include a full LAPACK library. </p> <p>Recent versions of ATLAS can be built as a single shared library, either -<code>libsatlas</code> or <code>libtatlas</code> (serial or threaded respectively): +<code class="code">libsatlas</code> or <code class="code">libtatlas</code> (serial or threaded respectively): these may even contain a full LAPACK. Such builds can be used by one of </p><div class="example"> -<pre class="example">--with-blas=satlas +<pre class="example-preformatted">--with-blas=satlas --with-blas=tatlas </pre></div> -<p>or, as on ‘<samp>x86_64</samp>’ Fedora where a path needs to be specified, +<p>or, as on ‘<samp class="samp">x86_64</samp>’ Fedora where a path needs to be specified, </p><div class="example"> -<pre class="example">--with-blas="-L/usr/lib64/atlas -lsatlas" +<pre class="example-preformatted">--with-blas="-L/usr/lib64/atlas -lsatlas" --with-blas="-L/usr/lib64/atlas -ltatlas" </pre></div> <p>Distributed ATLAS libraries cannot be tuned to your machine and so are a -compromise: for example Fedora tunes<a id="DOCF61" href="#FOOT61"><sup>61</sup></a> ‘<samp>x86_64</samp>’ <abbr>RPM</abbr>s for CPUs with -SSE3 extensions, and separate <abbr>RPM</abbr>s may be available for specific CPU +compromise: for example Fedora tunes<a class="footnote" id="DOCF61" href="#FOOT61"><sup>61</sup></a> ‘<samp class="samp">x86_64</samp>’ <abbr class="abbr">RPM</abbr>s for CPUs with +SSE3 extensions, and separate <abbr class="abbr">RPM</abbr>s may be available for specific CPU families. </p> <p>Note that building R on Linux against distributed shared libraries -may need ‘<samp>-devel</samp>’ or ‘<samp>-dev</samp>’ packages installed. +may need ‘<samp class="samp">-devel</samp>’ or ‘<samp class="samp">-dev</samp>’ packages installed. </p> <p>Linking against multiple static libraries requires one of </p><div class="example"> -<pre class="example">--with-blas="-lf77blas -latlas" +<pre class="example-preformatted">--with-blas="-lf77blas -latlas" --with-blas="-lptf77blas -lpthread -latlas" --with-blas="-L/path/to/ATLAS/libs -lf77blas -latlas" --with-blas="-L/path/to/ATLAS/libs -lptf77blas -lpthread -latlas" </pre></div> <p>Consult its installation -guide<a id="DOCF62" href="#FOOT62"><sup>62</sup></a> +guide<a class="footnote" id="DOCF62" href="#FOOT62"><sup>62</sup></a> for how to build ATLAS as a shared library or as a static library with position-independent code (on platforms where that matters). </p> <p>According to the ATLAS -FAQ<a id="DOCF63" href="#FOOT63"><sup>63</sup></a> the +FAQ<a class="footnote" id="DOCF63" href="#FOOT63"><sup>63</sup></a> the maximum number of threads used by multi-threaded ATLAS is set at compile time. Also, the author advises against using multi-threaded ATLAS on hyper-threaded CPUs without restricting affinities at compile-time to one @@ -3800,135 +3794,135 @@ </p> <hr> </div> -<div class="subsubsection" id="OpenBLAS-and-BLIS"> -<span id="OpenBLAS-and-BLIS-1"></span><h4 class="subsubsection">A.3.1.2 OpenBLAS and BLIS</h4> +<div class="subsubsection-level-extent" id="OpenBLAS-and-BLIS"> +<h4 class="subsubsection" id="OpenBLAS-and-BLIS-1"><span>A.3.1.2 OpenBLAS and BLIS<a class="copiable-link" href="#OpenBLAS-and-BLIS-1"> ¶</a></span></h4> -<p>Dr Kazushige Goto wrote a tuned <acronym>BLAS</acronym> for several processors +<p>Dr Kazushige Goto wrote a tuned <abbr class="acronym">BLAS</abbr> for several processors and OSes, which was frozen in 2010. OpenBLAS -(<a href="https://www.openblas.net/">https://www.openblas.net/</a>) is a descendant project with support +(<a class="uref" href="https://www.openblas.net/">https://www.openblas.net/</a>) is a descendant project with support for some later CPUs. </p> <p>This can be used by configuring R with something like </p> <div class="example"> -<pre class="example">--with-blas="openblas" +<pre class="example-preformatted">--with-blas="openblas" </pre></div> -<p>See see <a href="#Shared-BLAS">Shared BLAS</a> for an alternative (and in many ways preferable) +<p>See see <a class="pxref" href="#Shared-BLAS">Shared BLAS</a> for an alternative (and in many ways preferable) way to use them. </p> <p>Some platforms provide multiple builds of OpenBLAS: for example Fedora -has <abbr>RPM</abbr>s<a id="DOCF64" href="#FOOT64"><sup>64</sup></a> +has <abbr class="abbr">RPM</abbr>s<a class="footnote" id="DOCF64" href="#FOOT64"><sup>64</sup></a> </p><div class="example"> -<pre class="example">openblas +<pre class="example-preformatted">openblas openblas-threads openblas-openmp </pre></div> <p>providing shared libraries </p><div class="example"> -<pre class="example">libopenblas.so +<pre class="example-preformatted">libopenblas.so libopenblasp.so libopenblaso.so </pre></div> <p>respectively, each of which can be used as a shared BLAS. For the second and third the number of threads is controlled by -<code>OPENBLAS_NUM_THREADS</code> and <code>OMP_NUM_THREADS</code> (as usual for -<abbr>OpenMP</abbr>) respectively. +<code class="env">OPENBLAS_NUM_THREADS</code> and <code class="env">OMP_NUM_THREADS</code> (as usual for +<abbr class="abbr">OpenMP</abbr>) respectively. </p> <p>These and their Debian equivalents contain a complete LAPACK implementation. </p> <p>Note that building R on Linux against distributed libraries may need -‘<samp>-devel</samp>’ or ‘<samp>-dev</samp>’ packages installed. +‘<samp class="samp">-devel</samp>’ or ‘<samp class="samp">-dev</samp>’ packages installed. </p> -<p>For ‘<samp>ix86</samp>’ and ‘<samp>x86_64</samp>’ CPUs most distributed libraries +<p>For ‘<samp class="samp">ix86</samp>’ and ‘<samp class="samp">x86_64</samp>’ CPUs most distributed libraries contain several alternatives for different CPU microarchitectures with the choice being made at run time. </p> <p>Another descendant project is BLIS -(<a href="https://github.com/flame/blis">https://github.com/flame/blis</a>). This has (in Fedora) shared +(<a class="uref" href="https://github.com/flame/blis">https://github.com/flame/blis</a>). This has (in Fedora) shared libraries </p><div class="example"> -<pre class="example">libblis.so +<pre class="example-preformatted">libblis.so libblisp.so libbliso.so </pre></div> -<p>(<code>p</code> for ‘threads’, <code>o</code> for <abbr>OpenMP</abbr> as for OpenBLAS) which can +<p>(<code class="code">p</code> for ‘threads’, <code class="code">o</code> for <abbr class="abbr">OpenMP</abbr> as for OpenBLAS) which can also be used as a shared BLAS. The Fedora builds do not include LAPACK in the BLIS libraries. </p> <hr> </div> -<div class="subsubsection" id="MKL"> -<span id="Intel-MKL"></span><h4 class="subsubsection">A.3.1.3 Intel MKL</h4> +<div class="subsubsection-level-extent" id="MKL"> +<h4 class="subsubsection" id="Intel-MKL"><span>A.3.1.3 Intel MKL<a class="copiable-link" href="#Intel-MKL"> ¶</a></span></h4> <p>For Intel processors (and perhaps others) and some distributions of -Linux, there is Intel’s Math Kernel Library<a id="DOCF65" href="#FOOT65"><sup>65</sup></a>. You are +Linux, there is Intel’s Math Kernel Library<a class="footnote" id="DOCF65" href="#FOOT65"><sup>65</sup></a>. You are encouraged to read the documentation which is installed with the library before attempting to link to MKL. This includes a ‘link line advisor’ which will suggest appropriate incantations: its use is recommended. Or see -<a href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.vpt6qp">https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.vpt6qp</a> +<a class="uref" href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.vpt6qp">https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.vpt6qp</a> (which at the time of writing selected the Intel library for linking with GCC). </p> -<p>There are also versions of MKL for macOS<a id="DOCF66" href="#FOOT66"><sup>66</sup></a> and Windows, but when +<p>There are also versions of MKL for macOS<a class="footnote" id="DOCF66" href="#FOOT66"><sup>66</sup></a> and Windows, but when these have been tried they did not work with the default compilers used for R on those platforms. </p> <p>The following examples have been used with MKL versions 10.3 to -2023.2.0, for GCC compilers on ‘<samp>x86_64</samp>’ CPUs. (See also -<a href="#Intel-compilers">Intel compilers</a>.) +2023.2.0, for GCC compilers on ‘<samp class="samp">x86_64</samp>’ CPUs. (See also +<a class="ref" href="#Intel-compilers">Intel compilers</a>.) </p> <p>To use a sequential version of MKL we used </p> <div class="example"> -<pre class="example">MKL_LIB_PATH=/path/to/intel_mkl/mkl/lib/intel64 +<pre class="example-preformatted">MKL_LIB_PATH=/path/to/intel_mkl/mkl/lib/intel64 export LD_LIBRARY_PATH=$MKL_LIB_PATH MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_core -lmkl_sequential" ./configure --with-blas="$MKL" --with-lapack </pre></div> -<p>The option <samp>--with-lapack</samp> is used since MKL contains a tuned +<p>The option <samp class="option">--with-lapack</samp> is used since MKL contains a tuned copy of LAPACK (often older than the current version) as well as the -<acronym>BLAS</acronym> (see <a href="#LAPACK">LAPACK</a>), although this can be omitted. +<abbr class="acronym">BLAS</abbr> (see <a class="pxref" href="#LAPACK">LAPACK</a>), although this can be omitted. </p> <p>Threaded MKL may be used by replacing the line defining the variable -<code>MKL</code> by +<code class="code">MKL</code> by </p> <div class="example"> -<pre class="example">MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_core \ +<pre class="example-preformatted">MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_core \ -lmkl_gnu_thread -dl -fopenmp" </pre></div> <p>R can also be linked against a single shared library, -<code>libmkl_rt.so</code>, for both BLAS and LAPACK, but the correct <abbr>OpenMP</abbr> and +<code class="code">libmkl_rt.so</code>, for both BLAS and LAPACK, but the correct <abbr class="abbr">OpenMP</abbr> and MKL interface layer then has to be selected via environment variables. With 64-bit builds and the GCC compilers, we used </p> <div class="example"> -<pre class="example">export MKL_INTERFACE_LAYER=GNU,LP64 +<pre class="example-preformatted">export MKL_INTERFACE_LAYER=GNU,LP64 export MKL_THREADING_LAYER=GNU </pre></div> -<p>On Debian/Ubuntu, MKL is provided by package <code>intel-mkl-full</code> and one -can set <code>libmkl_rt.so</code> as the system-wide implementation of both BLAS +<p>On Debian/Ubuntu, MKL is provided by package <code class="code">intel-mkl-full</code> and one +can set <code class="code">libmkl_rt.so</code> as the system-wide implementation of both BLAS and LAPACK during installation of the package, so that also R installed -from Debian/Ubuntu package <code>r-base</code> would use it. It is, however, -still essential to set <code>MKL_INTERFACE_LAYER</code> and -<code>MKL_THREADING_LAYER</code> before running R, otherwise MKL computations +from Debian/Ubuntu package <code class="code">r-base</code> would use it. It is, however, +still essential to set <code class="code">MKL_INTERFACE_LAYER</code> and +<code class="code">MKL_THREADING_LAYER</code> before running R, otherwise MKL computations will produce incorrect results. R does not have to be rebuilt to use MKL, -but <code>configure</code> includes tests which may discover some errors such as a -failure to set the correct <abbr>OpenMP</abbr> and MKL interface layer. +but <code class="code">configure</code> includes tests which may discover some errors such as a +failure to set the correct <abbr class="abbr">OpenMP</abbr> and MKL interface layer. </p> <p>Note that the Debian/Ubuntu distribution can be quite old (for example -<code>2020.4</code> in mid-2023 when <code>2023.1</code> was current): this can be +<code class="code">2020.4</code> in mid-2023 when <code class="code">2023.1</code> was current): this can be important for the LAPACK version included. </p> -<p>The default number of threads will be chosen by the <abbr>OpenMP</abbr> software, but -can be controlled by setting <code>OMP_NUM_THREADS</code> or -<code>MKL_NUM_THREADS</code>, and in recent versions seems to default to a +<p>The default number of threads will be chosen by the <abbr class="abbr">OpenMP</abbr> software, but +can be controlled by setting <code class="code">OMP_NUM_THREADS</code> or +<code class="code">MKL_NUM_THREADS</code>, and in recent versions seems to default to a sensible value for sole use of the machine. (Parallel MKL has not -always passed <code>make check-all</code>, but did with MKL 2019.4 and later.) +always passed <code class="command">make check-all</code>, but did with MKL 2019.4 and later.) </p> <p>MKL includes a partial implementation of FFTW3, which causes trouble for applications that require some of the FFTW3 functionality @@ -3937,10 +3931,10 @@ MKL which excludes the FFTW3 wrappers. </p> <p>There is Intel documentation for building R with MKL at -<a href="https://www.intel.com/content/www/us/en/developer/articles/technical/using-onemkl-with-r.html">https://www.intel.com/content/www/us/en/developer/articles/technical/using-onemkl-with-r.html</a>: +<a class="uref" href="https://www.intel.com/content/www/us/en/developer/articles/technical/using-onemkl-with-r.html">https://www.intel.com/content/www/us/en/developer/articles/technical/using-onemkl-with-r.html</a>: that includes </p><div class="example"> -<pre class="example">-Wl,--no-as-needed +<pre class="example-preformatted">-Wl,--no-as-needed </pre></div> <p>which we have not found necessary. </p> @@ -3949,71 +3943,71 @@ <hr> </div> -<div class="subsubsection" id="Shared-BLAS"> -<span id="Shared-BLAS-1"></span><h4 class="subsubsection">A.3.1.4 Shared BLAS</h4> +<div class="subsubsection-level-extent" id="Shared-BLAS"> +<h4 class="subsubsection" id="Shared-BLAS-1"><span>A.3.1.4 Shared BLAS<a class="copiable-link" href="#Shared-BLAS-1"> ¶</a></span></h4> -<p>The <acronym>BLAS</acronym> library will be used for many of the add-on packages +<p>The <abbr class="acronym">BLAS</abbr> library will be used for many of the add-on packages as well as for R itself. This means that it is better to use a -shared/dynamic <acronym>BLAS</acronym> library, as most of a static library will -be compiled into the R executable and each <acronym>BLAS</acronym>-using +shared/dynamic <abbr class="acronym">BLAS</abbr> library, as most of a static library will +be compiled into the R executable and each <abbr class="acronym">BLAS</abbr>-using package. </p> -<p>R offers the option of compiling the <acronym>BLAS</acronym> into a dynamic -library <code>libRblas</code> stored in <samp><var>R_HOME</var>/lib</samp> and linking +<p>R offers the option of compiling the <abbr class="acronym">BLAS</abbr> into a dynamic +library <code class="code">libRblas</code> stored in <samp class="file"><var class="var">R_HOME</var>/lib</samp> and linking both R itself and all the add-on packages against that library. </p> -<p>This is the default on all platforms except <abbr>AIX</abbr> unless an external -<acronym>BLAS</acronym> is specified and found: for the latter it can be used by -specifying the option <samp>--enable-BLAS-shlib</samp>, and it can always be -disabled via <samp>--disable-BLAS-shlib</samp>. +<p>This is the default on all platforms except <abbr class="abbr">AIX</abbr> unless an external +<abbr class="acronym">BLAS</abbr> is specified and found: for the latter it can be used by +specifying the option <samp class="option">--enable-BLAS-shlib</samp>, and it can always be +disabled via <samp class="option">--disable-BLAS-shlib</samp>. </p> <p>This has both advantages and disadvantages. </p> -<ul> -<li> It saves space by having only a single copy of the <acronym>BLAS</acronym> -routines, which is helpful if there is an external static <acronym>BLAS</acronym> +<ul class="itemize mark-bullet"> +<li>It saves space by having only a single copy of the <abbr class="acronym">BLAS</abbr> +routines, which is helpful if there is an external static <abbr class="acronym">BLAS</abbr> (as used to be standard for ATLAS). -</li><li> There may be performance disadvantages in using a shared <acronym>BLAS</acronym>. -Probably the most likely is when R’s internal <acronym>BLAS</acronym> is used -and R is <em>not</em> built as a shared library, when it is possible to -build the <acronym>BLAS</acronym> into <samp>R.bin</samp> (and <samp>libR.a</samp>) without +</li><li>There may be performance disadvantages in using a shared <abbr class="acronym">BLAS</abbr>. +Probably the most likely is when R’s internal <abbr class="acronym">BLAS</abbr> is used +and R is <em class="emph">not</em> built as a shared library, when it is possible to +build the <abbr class="acronym">BLAS</abbr> into <samp class="file">R.bin</samp> (and <samp class="file">libR.a</samp>) without using position-independent code. However, experiments showed that in -many cases using a shared <acronym>BLAS</acronym> was as fast, provided high +many cases using a shared <abbr class="acronym">BLAS</abbr> was as fast, provided high levels of compiler optimization are used. -</li><li> It is easy to change the <acronym>BLAS</acronym> without needing to re-install +</li><li>It is easy to change the <abbr class="acronym">BLAS</abbr> without needing to re-install R and all the add-on packages, since all references to the -<acronym>BLAS</acronym> go through <code>libRblas</code>, and that can be replaced. +<abbr class="acronym">BLAS</abbr> go through <code class="code">libRblas</code>, and that can be replaced. Note though that any dynamic libraries the replacement links to will need to be found by the linker: this may need the library path to be -changed in <samp><var>R_HOME</var>/etc/ldpaths</samp>. +changed in <samp class="file"><var class="var">R_HOME</var>/etc/ldpaths</samp>. </li></ul> -<p>Another option to change the <acronym>BLAS</acronym> in use is to symlink a -single dynamic <acronym>BLAS</acronym> library to -<samp><var>R_HOME</var>/lib/libRblas.so</samp>. For example, just +<p>Another option to change the <abbr class="acronym">BLAS</abbr> in use is to symlink a +single dynamic <abbr class="acronym">BLAS</abbr> library to +<samp class="file"><var class="var">R_HOME</var>/lib/libRblas.so</samp>. For example, just </p> <div class="example"> -<pre class="example">mv <var>R_HOME</var>/lib/libRblas.so <var>R_HOME</var>/lib/libRblas.so.keep -ln -s /usr/lib64/libopenblasp.so.0 <var>R_HOME</var>/lib/libRblas.so +<pre class="example-preformatted">mv <var class="var">R_HOME</var>/lib/libRblas.so <var class="var">R_HOME</var>/lib/libRblas.so.keep +ln -s /usr/lib64/libopenblasp.so.0 <var class="var">R_HOME</var>/lib/libRblas.so </pre></div> -<p>on ‘<samp>x86_64</samp>’ Fedora will change the <acronym>BLAS</acronym> used to +<p>on ‘<samp class="samp">x86_64</samp>’ Fedora will change the <abbr class="acronym">BLAS</abbr> used to multithreaded OpenBLAS. A similar link works for most versions of the -OpenBLAS (provided the appropriate <samp>lib</samp> directory is in the -run-time library path or <code>ld.so</code> cache). It can also be used -for a single-library ATLAS, so on ‘<samp>x86_64</samp>’ Fedora either of +OpenBLAS (provided the appropriate <samp class="file">lib</samp> directory is in the +run-time library path or <code class="command">ld.so</code> cache). It can also be used +for a single-library ATLAS, so on ‘<samp class="samp">x86_64</samp>’ Fedora either of </p> <div class="example"> -<pre class="example">ln -s /usr/lib64/atlas/libsatlas.so.3 <var>R_HOME</var>/lib/libRblas.so -ln -s /usr/lib64/atlas/libtatlas.so.3 <var>R_HOME</var>/lib/libRblas.so +<pre class="example-preformatted">ln -s /usr/lib64/atlas/libsatlas.so.3 <var class="var">R_HOME</var>/lib/libRblas.so +ln -s /usr/lib64/atlas/libtatlas.so.3 <var class="var">R_HOME</var>/lib/libRblas.so </pre></div> <p>can be used with its distributed ATLAS libraries. (If you have the -‘<samp>-devel</samp>’ <abbr>RPM</abbr>s installed you can omit the <code>.0</code>/<code>.3</code>.) +‘<samp class="samp">-devel</samp>’ <abbr class="abbr">RPM</abbr>s installed you can omit the <code class="code">.0</code>/<code class="code">.3</code>.) </p> -<p>Note that rebuilding or symlinking <samp>libRblas.so</samp> may not suffice +<p>Note that rebuilding or symlinking <samp class="file">libRblas.so</samp> may not suffice if the intention is to use a modified LAPACK contained in an external BLAS: the latter could even cause conflicts. However, on Fedora where the OpenBLAS distribution contains a copy of LAPACK, it is the latter @@ -4023,72 +4017,72 @@ <hr> </div> </div> -<div class="subsection" id="LAPACK"> -<span id="LAPACK-1"></span><h4 class="subsection">A.3.2 LAPACK</h4> +<div class="subsection-level-extent" id="LAPACK"> +<h4 class="subsection" id="LAPACK-1"><span>A.3.2 LAPACK<a class="copiable-link" href="#LAPACK-1"> ¶</a></span></h4> -<span id="index-LAPACK-library"></span> +<a class="index-entry-id" id="index-LAPACK-library"></a> <p>If when configuring R a system LAPACK library is found of version 3.9.0 or later (and does not contain BLAS routines) it will be used instead of compiling the LAPACK code in the package sources. This can -be prevented by configuring R with <samp>--without-lapack</samp>. -Using a static <samp>liblapack.a</samp> is not supported. +be prevented by configuring R with <samp class="option">--without-lapack</samp>. +Using a static <samp class="file">liblapack.a</samp> is not supported. </p> -<p>It is assumed that <code>-llapack</code> is the reference LAPACK library but +<p>It is assumed that <code class="code">-llapack</code> is the reference LAPACK library but on Debian/Ubuntu it can be switched, including after R is installed. -On such a platform it is better to use <samp>--without-lapack</samp> or -<samp>--with-blas --with-lapack</samp> (see below) explicitly. The known -examples<a id="DOCF67" href="#FOOT67"><sup>67</sup></a> of a +On such a platform it is better to use <samp class="option">--without-lapack</samp> or +<samp class="option">--with-blas --with-lapack</samp> (see below) explicitly. The known +examples<a class="footnote" id="DOCF67" href="#FOOT67"><sup>67</sup></a> of a non-reference LAPACK library found at installation all contain BLAS -routines so are not used by a default <code>configure</code> run. +routines so are not used by a default <code class="command">configure</code> run. </p> <p>Provision is made for specifying an external LAPACK library with option -<samp>--with-lapack</samp>, principally to cope with <acronym>BLAS</acronym> -libraries which contain a copy of LAPACK (such as <code>Accelerate</code> on +<samp class="option">--with-lapack</samp>, principally to cope with <abbr class="acronym">BLAS</abbr> +libraries which contain a copy of LAPACK (such as <code class="code">Accelerate</code> on macOS and some builds of ATLAS, FlexiBLAS, MKL and OpenBLAS on -‘<samp>ix86</samp>’/‘<samp>x86_64</samp>’ Linux). At least LAPACK version 3.2 is -required. This can only be done if <samp>--with-blas</samp> has been used. +‘<samp class="samp">ix86</samp>’/‘<samp class="samp">x86_64</samp>’ Linux). At least LAPACK version 3.2 is +required. This can only be done if <samp class="option">--with-blas</samp> has been used. </p> <p>However, the likely performance gains are thought to be small (and may be negative). The default is not to search for a suitable LAPACK -library, and this is definitely <strong>not</strong> recommended. You can +library, and this is definitely <strong class="strong">not</strong> recommended. You can specify a specific LAPACK library or a search for a generic library by -the configuration option <samp>--with-lapack</samp> without a value. The -default for <samp>--with-lapack</samp> is to check the <acronym>BLAS</acronym> -library (for function <code>DPSTRF</code>) and then look for an external -library ‘<samp>-llapack</samp>’. Sites searching for the fastest possible +the configuration option <samp class="option">--with-lapack</samp> without a value. The +default for <samp class="option">--with-lapack</samp> is to check the <abbr class="acronym">BLAS</abbr> +library (for function <code class="code">DPSTRF</code>) and then look for an external +library ‘<samp class="samp">-llapack</samp>’. Sites searching for the fastest possible linear algebra may want to build a LAPACK library using the ATLAS-optimized subset of LAPACK. Similarly, OpenBLAS can be built to contain an optimized subset of LAPACK or a full LAPACK (the latter seeming to be the default). </p> -<p>A value for <samp>--with-lapack</samp> can be set <em>via</em> the environment +<p>A value for <samp class="option">--with-lapack</samp> can be set <em class="emph">via</em> the environment variable -<span id="index-LAPACK_005fLIBS"></span> -<code>LAPACK_LIBS</code>, but this will only be used if <samp>--with-lapack</samp> -is specified and the <acronym>BLAS</acronym> library does not contain LAPACK. +<a class="index-entry-id" id="index-LAPACK_005fLIBS"></a> +<code class="env">LAPACK_LIBS</code>, but this will only be used if <samp class="option">--with-lapack</samp> +is specified and the <abbr class="acronym">BLAS</abbr> library does not contain LAPACK. </p> -<p>Please bear in mind that using <samp>--with-lapack</samp> is provided -<strong>only</strong> because it is necessary on some platforms and because some +<p>Please bear in mind that using <samp class="option">--with-lapack</samp> is provided +<strong class="strong">only</strong> because it is necessary on some platforms and because some users want to experiment with claimed performance improvements. In practice its main uses are without a value, </p> -<ul> -<li> with an ‘enhanced’ BLAS such as ATLAS, FlexiBLAS, MKL or OpenBLAS which +<ul class="itemize mark-bullet"> +<li>with an ‘enhanced’ BLAS such as ATLAS, FlexiBLAS, MKL or OpenBLAS which contains a full LAPACK (to avoid possible conflicts), or -</li><li> on Debian/Ubuntu systems to select the system <code>liblapack</code> which can +</li><li>on Debian/Ubuntu systems to select the system <code class="code">liblapack</code> which can be switched by the ‘alternatives’ mechanism. </li></ul> -<p>If building LAPACK from its Netlib sources, be aware that <code>make</code> -with its supplied <samp>Makefile</samp> will make a <em>static</em> library and -R requires a shared/dynamic one. To get one, use <code>cmake</code> as -documented briefly in <samp>README.md</samp>. Something like (to build only +<p>If building LAPACK from its Netlib sources, be aware that <code class="command">make</code> +with its supplied <samp class="file">Makefile</samp> will make a <em class="emph">static</em> library and +R requires a shared/dynamic one. To get one, use <code class="command">cmake</code> as +documented briefly in <samp class="file">README.md</samp>. Something like (to build only the double and double complex subroutines with 32-bit array indices), </p> <div class="example"> -<pre class="example">mkdir build +<pre class="example-preformatted">mkdir build cd build cmake \ -DCMAKE_INSTALL_PREFIX=/where/you/want/to/install \ @@ -4102,48 +4096,48 @@ </pre></div> <p>This builds the reference BLAS and the reference LAPACK linked to it. </p> -<p>Note that <code>cmake</code> files do not provide an <code>uninstall</code> -target, but <samp>build/install_manifest.txt</samp> is a list of the files -installed, so you can remove them <em>via</em> shell commands or from +<p>Note that <code class="command">cmake</code> files do not provide an <code class="code">uninstall</code> +target, but <samp class="file">build/install_manifest.txt</samp> is a list of the files +installed, so you can remove them <em class="emph">via</em> shell commands or from R. </p> -<p>If using <samp>--with-lapack</samp> to get a generic LAPACK (or allowing the -default to select one), consider also using <samp>--with-blas</samp> (with a +<p>If using <samp class="option">--with-lapack</samp> to get a generic LAPACK (or allowing the +default to select one), consider also using <samp class="option">--with-blas</samp> (with a path if an enhanced BLAS is installed). </p> <hr> </div> -<div class="subsection" id="Caveats"> -<span id="Caveats-1"></span><h4 class="subsection">A.3.3 Caveats</h4> +<div class="subsection-level-extent" id="Caveats"> +<h4 class="subsection" id="Caveats-1"><span>A.3.3 Caveats<a class="copiable-link" href="#Caveats-1"> ¶</a></span></h4> <p>As with all libraries, you need to ensure that they and R were compiled with compatible compilers and flags. For example, this has meant that on Sun Sparc using the Oracle compilers the flag -<samp>-dalign</samp> is needed if <code>sunperf</code> is to be used. +<samp class="option">-dalign</samp> is needed if <code class="code">sunperf</code> is to be used. </p> <p>On some systems it has been necessary that an external -<acronym>BLAS</acronym>/LAPACK was built with the same Fortran compiler used to +<abbr class="acronym">BLAS</abbr>/LAPACK was built with the same Fortran compiler used to build R. </p> <p>BLAS and LAPACK libraries built with recent versions of -<code>gfortran</code> require calls from C/C++ to handle ‘hidden’ character +<code class="command">gfortran</code> require calls from C/C++ to handle ‘hidden’ character lengths — R itself does so but many packages used not to and some have segfaulted. This was largely circumvented by using the Fortran -flag <samp>-fno-optimize-sibling-calls</samp> (formerly set by -<code>configure</code> if it detected <code>gfortran</code> 7 or later): +flag <samp class="option">-fno-optimize-sibling-calls</samp> (formerly set by +<code class="command">configure</code> if it detected <code class="command">gfortran</code> 7 or later): however use of the R headers which include those character-length arguments is no longer optional in packages. </p> -<p>LAPACK 3.9.0 (and probably earlier) had a bug in which the <code>DCOMBSSQ</code> +<p>LAPACK 3.9.0 (and probably earlier) had a bug in which the <code class="code">DCOMBSSQ</code> subroutine may cause NA to be interpreted as zero. This is fixed in the R 3.6.3 and later sources, but if you use an external LAPACK, you may need to fix it there. (The bug was corrected in 3.9.1 and the routine removed in 3.10.1.) </p> -<p>The code (in <code>dlapack.f</code>) should read +<p>The code (in <code class="code">dlapack.f</code>) should read </p><div class="example"> -<pre class="example">* .. +<pre class="example-preformatted">* .. * .. Executable Statements .. * IF( V1( 1 ).GE.V2( 1 ) ) THEN @@ -4164,9 +4158,9 @@ other bugs in the LAPACK sources (or in the posted corrections to those sources), seen several times in Linux distributions over the years. We have even seen distributions with missing LAPACK routines from their -<code>liblapack</code>. +<code class="code">liblapack</code>. </p> -<p>We rely on limited support in LAPACK for matrices with <em class='math'>2^{31}</em> or +<p>We rely on limited support in LAPACK for matrices with <em class="math">2^{31}</em> or more elements: it is possible that an external LAPACK will not have that support. </p> @@ -4175,100 +4169,100 @@ </div> </div> </div> -<div class="appendix" id="Configuration-on-a-Unix_002dalike"> -<span id="Configuration-on-a-Unix_002dalike-1"></span><h2 class="appendix">Appendix B Configuration on a Unix-alike</h2> +<div class="appendix-level-extent" id="Configuration-on-a-Unix_002dalike"> +<h2 class="appendix" id="Configuration-on-a-Unix_002dalike-1"><span>Appendix B Configuration on a Unix-alike<a class="copiable-link" href="#Configuration-on-a-Unix_002dalike-1"> ¶</a></span></h2> <hr> -<div class="section" id="Configuration-options"> -<span id="Configuration-options-1"></span><h3 class="section">B.1 Configuration options</h3> +<div class="section-level-extent" id="Configuration-options"> +<h3 class="section" id="Configuration-options-1"><span>B.1 Configuration options<a class="copiable-link" href="#Configuration-options-1"> ¶</a></span></h3> -<p><code>configure</code> has many options: running +<p><code class="command">configure</code> has many options: running </p> <div class="example"> -<pre class="example">./configure --help +<pre class="example-preformatted">./configure --help </pre></div> <p>will give a list. Probably the most important ones not covered elsewhere are (defaults in brackets) </p> -<dl compact="compact"> -<dt><span><samp>--with-x</samp></span></dt> +<dl class="table"> +<dt><samp class="option">--with-x</samp></dt> <dd><p>use the X Window System [yes] </p></dd> -<dt><span><samp>--x-includes=<var>DIR</var></samp></span></dt> -<dd><p>X include files are in <var>DIR</var> +<dt><samp class="option">--x-includes=<var class="var">DIR</var></samp></dt> +<dd><p>X include files are in <var class="var">DIR</var> </p></dd> -<dt><span><samp>--x-libraries=<var>DIR</var></samp></span></dt> -<dd><p>X library files are in <var>DIR</var> +<dt><samp class="option">--x-libraries=<var class="var">DIR</var></samp></dt> +<dd><p>X library files are in <var class="var">DIR</var> </p></dd> -<dt><span><samp>--with-readline</samp></span></dt> +<dt><samp class="option">--with-readline</samp></dt> <dd><p>use readline library (if available) [yes] </p></dd> -<dt><span><samp>--enable-R-profiling</samp></span></dt> -<dd><p>attempt to compile support for <code>Rprof()</code> [yes] +<dt><samp class="option">--enable-R-profiling</samp></dt> +<dd><p>attempt to compile support for <code class="code">Rprof()</code> [yes] </p></dd> -<dt><span><samp>--enable-memory-profiling</samp></span></dt> -<dd><p>attempt to compile support for <code>Rprofmem()</code> and <code>tracemem()</code> [no] +<dt><samp class="option">--enable-memory-profiling</samp></dt> +<dd><p>attempt to compile support for <code class="code">Rprofmem()</code> and <code class="code">tracemem()</code> [no] </p></dd> -<dt><span><samp>--enable-R-shlib</samp></span></dt> +<dt><samp class="option">--enable-R-shlib</samp></dt> <dd><p>build R as a shared/dynamic library [no] </p></dd> -<dt><span><samp>--enable-BLAS-shlib</samp></span></dt> -<dd><p>build the <acronym>BLAS</acronym> as a shared/dynamic library [yes, except on <abbr>AIX</abbr>] +<dt><samp class="option">--enable-BLAS-shlib</samp></dt> +<dd><p>build the <abbr class="acronym">BLAS</abbr> as a shared/dynamic library [yes, except on <abbr class="abbr">AIX</abbr>] </p></dd> </dl> -<p>You can use <samp>--without-foo</samp> or <samp>--disable-foo</samp> for the +<p>You can use <samp class="option">--without-foo</samp> or <samp class="option">--disable-foo</samp> for the negatives. </p> -<p>You will want to use <samp>--disable-R-profiling</samp> if you are building -a profiled executable of R (e.g. with ‘<samp>-pg)</samp>’. Support for R -profiling requires OS support for POSIX threads (<em>aka</em> -‘<samp>pthreads</samp>’), which are available on all mainstream Unix-alike +<p>You will want to use <samp class="option">--disable-R-profiling</samp> if you are building +a profiled executable of R (e.g. with ‘<samp class="samp">-pg)</samp>’. Support for R +profiling requires OS support for POSIX threads (<em class="emph">aka</em> +‘<samp class="samp">pthreads</samp>’), which are available on all mainstream Unix-alike platforms. </p> -<p>Flag <samp>--enable-R-shlib</samp> causes the make process to build R as -a dynamic (shared) library, typically called <samp>libR.so</samp>, and link -the main R executable <samp>R.bin</samp> against that library. This can +<p>Flag <samp class="option">--enable-R-shlib</samp> causes the make process to build R as +a dynamic (shared) library, typically called <samp class="file">libR.so</samp>, and link +the main R executable <samp class="file">R.bin</samp> against that library. This can only be done if all the code (including system libraries) can be compiled into a dynamic library, and there may be a -performance<a id="DOCF68" href="#FOOT68"><sup>68</sup></a> penalty. So you probably +performance<a class="footnote" id="DOCF68" href="#FOOT68"><sup>68</sup></a> penalty. So you probably only want this if you will be using an application which embeds R. Note that C code in packages installed on an R system linked with -<samp>--enable-R-shlib</samp> is linked against the dynamic library and so +<samp class="option">--enable-R-shlib</samp> is linked against the dynamic library and so such packages cannot be used from an R system built in the default way. Also, because packages are linked against R they are on some OSes also linked against the dynamic libraries R itself is linked against, and this can lead to symbol conflicts. </p> -<p>For maximally effective use of <code>valgrind</code>, R should be -compiled with Valgrind instrumentation. The <code>configure</code> option -is <samp>--with-valgrind-instrumentation=<var>level</var></samp>, where -<var>level</var> is 0, 1 or 2. (Level 0 is the default and does not add -anything.) The system headers for <code>valgrind</code> are required: on -Linux they may be in a separate package such as <strong>valgrind-devel</strong>. +<p>For maximally effective use of <code class="command">valgrind</code>, R should be +compiled with Valgrind instrumentation. The <code class="command">configure</code> option +is <samp class="option">--with-valgrind-instrumentation=<var class="var">level</var></samp>, where +<var class="var">level</var> is 0, 1 or 2. (Level 0 is the default and does not add +anything.) The system headers for <code class="command">valgrind</code> are required: on +Linux they may be in a separate package such as <strong class="strong">valgrind-devel</strong>. </p> <p>If you need to re-configure R with different options you may need to run -<code>make clean</code> or even <code>make distclean</code> before doing so. +<code class="code">make clean</code> or even <code class="code">make distclean</code> before doing so. </p> -<p>The <samp>configure</samp> script has other generic options added by -<code>autoconf</code> and which are not supported for R: in particular +<p>The <samp class="file">configure</samp> script has other generic options added by +<code class="command">autoconf</code> and which are not supported for R: in particular building for one architecture on a different host is not possible. </p> <hr> </div> -<div class="section" id="Internationalization-support"> -<span id="Internationalization-support-1"></span><h3 class="section">B.2 Internationalization support</h3> +<div class="section-level-extent" id="Internationalization-support"> +<h3 class="section" id="Internationalization-support-1"><span>B.2 Internationalization support<a class="copiable-link" href="#Internationalization-support-1"> ¶</a></span></h3> -<p>Translation of messages is supported via <acronym>GNU</acronym> <code>gettext</code> -unless disabled by the configure option <samp>--disable-nls</samp>. -The <code>configure</code> report will show <code>NLS</code> as one of the +<p>Translation of messages is supported via <abbr class="acronym">GNU</abbr> <code class="code">gettext</code> +unless disabled by the configure option <samp class="option">--disable-nls</samp>. +The <code class="code">configure</code> report will show <code class="code">NLS</code> as one of the ‘Additional capabilities’ if support has been compiled in, and running -in an English locale (but not the <code>C</code> locale) will include +in an English locale (but not the <code class="code">C</code> locale) will include </p> <div class="example"> -<pre class="example"> Natural language support but running in an English locale +<pre class="example-preformatted"> Natural language support but running in an English locale </pre></div> <p>in the greeting on starting R. @@ -4276,357 +4270,357 @@ <hr> </div> -<div class="section" id="Configuration-variables"> -<span id="Configuration-variables-1"></span><h3 class="section">B.3 Configuration variables</h3> +<div class="section-level-extent" id="Configuration-variables"> +<h3 class="section" id="Configuration-variables-1"><span>B.3 Configuration variables<a class="copiable-link" href="#Configuration-variables-1"> ¶</a></span></h3> -<span id="index-configure-4"></span> +<a class="index-entry-id" id="index-configure-4"></a> <p>If you need or want to set certain configure variables to something other than their default, you can do that by either editing the file -<samp>config.site</samp> (which documents many of the variables you might want -to set: others can be seen in file <samp>etc/Renviron.in</samp>) or on the +<samp class="file">config.site</samp> (which documents many of the variables you might want +to set: others can be seen in file <samp class="file">etc/Renviron.in</samp>) or on the command line as </p> <div class="example"> -<pre class="example">./configure <var>VAR</var>=<var>value</var> +<pre class="example-preformatted">./configure <var class="var">VAR</var>=<var class="var">value</var> </pre></div> <p>If you are building in a directory different from the sources, there can -be copies of <samp>config.site</samp> in the source and the build directories, +be copies of <samp class="file">config.site</samp> in the source and the build directories, and both will be read (in that order). In addition, if there is a file -<samp>~/.R/config</samp>, it is read between the <samp>config.site</samp> files in +<samp class="file">~/.R/config</samp>, it is read between the <samp class="file">config.site</samp> files in the source and the build directories. </p> -<p>There is also a general <code>autoconf</code> mechanism for -<samp>config.site</samp> files, which are read before any of those mentioned +<p>There is also a general <code class="command">autoconf</code> mechanism for +<samp class="file">config.site</samp> files, which are read before any of those mentioned in the previous paragraph. This looks first at a file specified by the -<span id="index-CONFIG_005fSITE"></span> -environment variable <code>CONFIG_SITE</code>, and if not is set at files such -as <samp>/usr/local/share/config.site</samp> and -<samp>/usr/local/etc/config.site</samp> in the area (exemplified by -<samp>/usr/local</samp>) where R would be installed. +<a class="index-entry-id" id="index-CONFIG_005fSITE"></a> +environment variable <code class="env">CONFIG_SITE</code>, and if not is set at files such +as <samp class="file">/usr/local/share/config.site</samp> and +<samp class="file">/usr/local/etc/config.site</samp> in the area (exemplified by +<samp class="file">/usr/local</samp>) where R would be installed. </p> -<p>These variables are <em>precious</em>, implying that they do not have to +<p>These variables are <em class="emph">precious</em>, implying that they do not have to be exported to the environment, are kept in the cache even if not specified on the command line, checked for consistency between two configure runs (provided that caching is used), and are kept during automatic reconfiguration as if having been passed as command line arguments, even if no cache is used. </p> -<p>See the variable output section of <code>configure --help</code> for a list of +<p>See the variable output section of <code class="code">configure --help</code> for a list of all these variables. </p> <p>If you find you need to alter configure variables, it is worth noting -that some settings may be cached in the file <samp>config.cache</samp>, and it +that some settings may be cached in the file <samp class="file">config.cache</samp>, and it is a good idea to remove that file (if it exists) before re-configuring. -Note that caching is turned <em>off</em> by default: use the command line -option <samp>--config-cache</samp> (or <samp>-C</samp>) to enable caching. +Note that caching is turned <em class="emph">off</em> by default: use the command line +option <samp class="option">--config-cache</samp> (or <samp class="option">-C</samp>) to enable caching. </p> <hr> -<div class="subsection" id="Setting-paper-size"> -<span id="Setting-paper-size-1"></span><h4 class="subsection">B.3.1 Setting paper size</h4> -<span id="index-R_005fPAPERSIZE-2"></span> -<p>One common variable to change is <code>R_PAPERSIZE</code>, which defaults to -‘<samp>a4</samp>’, not ‘<samp>letter</samp>’. (Valid values are ‘<samp>a4</samp>’, -‘<samp>letter</samp>’, ‘<samp>legal</samp>’ and ‘<samp>executive</samp>’.) +<div class="subsection-level-extent" id="Setting-paper-size"> +<h4 class="subsection" id="Setting-paper-size-1"><span>B.3.1 Setting paper size<a class="copiable-link" href="#Setting-paper-size-1"> ¶</a></span></h4> +<a class="index-entry-id" id="index-R_005fPAPERSIZE-2"></a> +<p>One common variable to change is <code class="env">R_PAPERSIZE</code>, which defaults to +‘<samp class="samp">a4</samp>’, not ‘<samp class="samp">letter</samp>’. (Valid values are ‘<samp class="samp">a4</samp>’, +‘<samp class="samp">letter</samp>’, ‘<samp class="samp">legal</samp>’ and ‘<samp class="samp">executive</samp>’.) </p> <p>This is used both when configuring R to set the default, and when running R to override the default. It is also used to set the paper size when making PDF manuals. </p> -<p>The configure default will most often be ‘<samp>a4</samp>’ if <code>R_PAPERSIZE</code> -is unset. (If the program <code>paperconf</code> is found, present in many +<p>The configure default will most often be ‘<samp class="samp">a4</samp>’ if <code class="env">R_PAPERSIZE</code> +is unset. (If the program <code class="command">paperconf</code> is found, present in many Linux distributions, -<span id="index-PAPERSIZE"></span> -or the environment variable <code>PAPERSIZE</code> is set, these are used to +<a class="index-entry-id" id="index-PAPERSIZE"></a> +or the environment variable <code class="env">PAPERSIZE</code> is set, these are used to produce the default.) </p> <hr> </div> -<div class="subsection" id="Setting-the-browsers"> -<span id="Setting-the-browsers-1"></span><h4 class="subsection">B.3.2 Setting the browsers</h4> +<div class="subsection-level-extent" id="Setting-the-browsers"> +<h4 class="subsection" id="Setting-the-browsers-1"><span>B.3.2 Setting the browsers<a class="copiable-link" href="#Setting-the-browsers-1"> ¶</a></span></h4> -<span id="index-R_005fBROWSER"></span> -<p>Another precious variable is <code>R_BROWSER</code>, the default <acronym>HTML</acronym> +<a class="index-entry-id" id="index-R_005fBROWSER"></a> +<p>Another precious variable is <code class="env">R_BROWSER</code>, the default <abbr class="acronym">HTML</abbr> browser, which should take a value of an executable in the user’s path or specify a full path. </p> -<span id="index-R_005fPDFVIEWER"></span> -<p>Its counterpart for PDF files is <code>R_PDFVIEWER</code>. +<a class="index-entry-id" id="index-R_005fPDFVIEWER"></a> +<p>Its counterpart for PDF files is <code class="env">R_PDFVIEWER</code>. </p> <hr> </div> -<div class="subsection" id="Compilation-flags"> -<span id="Compilation-flags-1"></span><h4 class="subsection">B.3.3 Compilation flags</h4> +<div class="subsection-level-extent" id="Compilation-flags"> +<h4 class="subsection" id="Compilation-flags-1"><span>B.3.3 Compilation flags<a class="copiable-link" href="#Compilation-flags-1"> ¶</a></span></h4> -<p>If you have libraries and header files, e.g., for <acronym>GNU</acronym> -readline, in non-system directories, use the variables <code>LDFLAGS</code> -(for libraries, using ‘<samp>-L</samp>’ flags to be passed to the linker) and -<code>CPPFLAGS</code> (for header files, using ‘<samp>-I</samp>’ flags to be passed to +<p>If you have libraries and header files, e.g., for <abbr class="acronym">GNU</abbr> +readline, in non-system directories, use the variables <code class="code">LDFLAGS</code> +(for libraries, using ‘<samp class="samp">-L</samp>’ flags to be passed to the linker) and +<code class="code">CPPFLAGS</code> (for header files, using ‘<samp class="samp">-I</samp>’ flags to be passed to the C/C++ preprocessors), respectively, to specify these locations. -These default to ‘<samp>-L/usr/local/lib</samp>’ (<code>LDFLAGS</code>, -‘<samp>-L/usr/local/lib64</samp>’ on most 64-bit Linux OSes) and -‘<samp>-I/usr/local/include</samp>’ (<code>CPPFLAGS</code>, but note that on most -systems <samp>/usr/local/include</samp> is regarded as a system include +These default to ‘<samp class="samp">-L/usr/local/lib</samp>’ (<code class="code">LDFLAGS</code>, +‘<samp class="samp">-L/usr/local/lib64</samp>’ on most 64-bit Linux OSes) and +‘<samp class="samp">-I/usr/local/include</samp>’ (<code class="code">CPPFLAGS</code>, but note that on most +systems <samp class="file">/usr/local/include</samp> is regarded as a system include directory and so instances in that macro will be skipped) to catch the most common cases. If libraries are still not found, then maybe your -compiler/linker does not support re-ordering of <samp>-L</samp> and -<samp>-l</samp> flags. +compiler/linker does not support re-ordering of <samp class="option">-L</samp> and +<samp class="option">-l</samp> flags. In this case, use a different compiler (or a front-end shell script which does the re-ordering). </p> <p>These flags can also be used to build a faster-running version of R. -On most platforms using <code>gcc</code>, having ‘<samp>-O3</samp>’ in -<code>CFLAGS</code> and <code>FFLAGS</code> produces worthwhile -performance gains with <code>gcc</code> and <code>gfortran</code>, but may +On most platforms using <code class="command">gcc</code>, having ‘<samp class="samp">-O3</samp>’ in +<code class="code">CFLAGS</code> and <code class="code">FFLAGS</code> produces worthwhile +performance gains with <code class="command">gcc</code> and <code class="command">gfortran</code>, but may result in a less reliable build (both segfaults and incorrect numeric -computations have been seen). On systems using the <acronym>GNU</acronym> linker +computations have been seen). On systems using the <abbr class="acronym">GNU</abbr> linker (especially those using R as a shared library), it is likely that -including ‘<samp>-Wl,-O1</samp>’ in <code>LDFLAGS</code> is worthwhile, and -‘<samp>'-Bdirect,--hash-style=both,-Wl,-O1'</samp>’ is recommended at -<a href="https://lwn.net/Articles/192624/">https://lwn.net/Articles/192624/</a>. Tuning compilation to a -specific <acronym>CPU</acronym> family (e.g. ‘<samp>-mtune=native</samp>’ for -<code>gcc</code>) can give worthwhile performance gains, especially on -older architectures such as ‘<samp>ix86</samp>’. +including ‘<samp class="samp">-Wl,-O1</samp>’ in <code class="code">LDFLAGS</code> is worthwhile, and +‘<samp class="samp">'-Bdirect,--hash-style=both,-Wl,-O1'</samp>’ is recommended at +<a class="uref" href="https://lwn.net/Articles/192624/">https://lwn.net/Articles/192624/</a>. Tuning compilation to a +specific <abbr class="acronym">CPU</abbr> family (e.g. ‘<samp class="samp">-mtune=native</samp>’ for +<code class="command">gcc</code>) can give worthwhile performance gains, especially on +older architectures such as ‘<samp class="samp">ix86</samp>’. </p> <hr> </div> -<div class="subsection" id="Making-manuals"> -<span id="Making-manuals-1"></span><h4 class="subsection">B.3.4 Making manuals</h4> +<div class="subsection-level-extent" id="Making-manuals"> +<h4 class="subsection" id="Making-manuals-1"><span>B.3.4 Making manuals<a class="copiable-link" href="#Making-manuals-1"> ¶</a></span></h4> -<span id="index-R_005fRD4PDF-1"></span> -<span id="index-R_005fPAPERSIZE-3"></span> +<a class="index-entry-id" id="index-R_005fRD4PDF-1"></a> +<a class="index-entry-id" id="index-R_005fPAPERSIZE-3"></a> <p>The default settings for making the manuals are controlled by -<code>R_RD4PDF</code> and <code>R_PAPERSIZE</code>. +<code class="env">R_RD4PDF</code> and <code class="env">R_PAPERSIZE</code>. </p> <hr> </div> </div> -<div class="section" id="Setting-the-shell"> -<span id="Setting-the-shell-1"></span><h3 class="section">B.4 Setting the shell</h3> +<div class="section-level-extent" id="Setting-the-shell"> +<h3 class="section" id="Setting-the-shell-1"><span>B.4 Setting the shell<a class="copiable-link" href="#Setting-the-shell-1"> ¶</a></span></h3> -<p>By default the shell scripts such as <samp>R</samp> will be ‘<samp>#!/bin/sh</samp>’ -scripts (or using the <code>SHELL</code> chosen by <samp>configure</samp>). This is -almost always satisfactory, but on a few systems <samp>/bin/sh</samp> is not a +<p>By default the shell scripts such as <samp class="file">R</samp> will be ‘<samp class="samp">#!/bin/sh</samp>’ +scripts (or using the <code class="env">SHELL</code> chosen by <samp class="file">configure</samp>). This is +almost always satisfactory, but on a few systems <samp class="file">/bin/sh</samp> is not a Bourne shell or clone, and the shell to be used can be changed by -setting the configure variable <code>R_SHELL</code> to a suitable value (a full -path to a shell, e.g. <samp>/usr/local/bin/bash</samp>). +setting the configure variable <code class="env">R_SHELL</code> to a suitable value (a full +path to a shell, e.g. <samp class="file">/usr/local/bin/bash</samp>). </p> <hr> </div> -<div class="section" id="Using-make"> -<span id="Using-make-1"></span><h3 class="section">B.5 Using make</h3> -<span id="index-make"></span> +<div class="section-level-extent" id="Using-make"> +<h3 class="section" id="Using-make-1"><span>B.5 Using make<a class="copiable-link" href="#Using-make-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-make"></a> -<p>To build in a separate directory you need a <code>make</code> that supports -the <code>VPATH</code> variable, for example <acronym>GNU</acronym> <code>make</code> and -<code>dmake</code>. +<p>To build in a separate directory you need a <code class="command">make</code> that supports +the <code class="code">VPATH</code> variable, for example <abbr class="acronym">GNU</abbr> <code class="command">make</code> and +<code class="command">dmake</code>. </p> -<p>If you want to use a <code>make</code> by another name, for example if your -<acronym>GNU</acronym> <code>make</code> is called ‘<samp>gmake</samp>’, you need to set the -variable <code>MAKE</code> at configure time, for example +<p>If you want to use a <code class="command">make</code> by another name, for example if your +<abbr class="acronym">GNU</abbr> <code class="command">make</code> is called ‘<samp class="samp">gmake</samp>’, you need to set the +variable <code class="code">MAKE</code> at configure time, for example </p> -<span id="index-configure-5"></span> +<a class="index-entry-id" id="index-configure-5"></a> <div class="example"> -<pre class="example">./configure MAKE=gmake +<pre class="example-preformatted">./configure MAKE=gmake </pre></div> <hr> </div> -<div class="section" id="Using-Fortran"> -<span id="Using-Fortran-1"></span><h3 class="section">B.6 Using Fortran</h3> -<span id="index-Fortran"></span> +<div class="section-level-extent" id="Using-Fortran"> +<h3 class="section" id="Using-Fortran-1"><span>B.6 Using Fortran<a class="copiable-link" href="#Using-Fortran-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Fortran"></a> <p>To compile R, you need a Fortran 90 compiler. The current default is to search for -<code>gfortran</code>, <code>g95</code>, <code>xlf95</code> <code>f95</code>, -<code>fort</code>, <code>ifort</code>, <code>ifc</code>, <code>efc</code>, -<code>pgfortran</code>, <code>pgf95</code> <code>lf95</code>, <code>ftn</code>, -<code>nagfor</code>, <code>xlf90</code>, <code>f90</code>, <code>pgf90</code>, -<code>pghpf</code>, <code>epcf90</code>. (Note that these are searched for by +<code class="command">gfortran</code>, <code class="command">g95</code>, <code class="command">xlf95</code> <code class="command">f95</code>, +<code class="command">fort</code>, <code class="command">ifort</code>, <code class="command">ifc</code>, <code class="command">efc</code>, +<code class="command">pgfortran</code>, <code class="command">pgf95</code> <code class="command">lf95</code>, <code class="command">ftn</code>, +<code class="command">nagfor</code>, <code class="command">xlf90</code>, <code class="command">f90</code>, <code class="command">pgf90</code>, +<code class="command">pghpf</code>, <code class="command">epcf90</code>. (Note that these are searched for by name, without checking the standard of Fortran they support.) The command and flags used should support fixed-form Fortran with extension -<samp>.f</samp>: in the unusual case that a specific flag is needed for -free-form Fortran with extension <samp>.f90</samp> or <samp>.f95</samp>, this can be -specified as part of <code>FCFLAGS</code>. +<samp class="file">.f</samp>: in the unusual case that a specific flag is needed for +free-form Fortran with extension <samp class="file">.f90</samp> or <samp class="file">.f95</samp>, this can be +specified as part of <code class="code">FCFLAGS</code>. </p> <p>The search mechanism can be changed using the configure variable -<code>FC</code> which specifies the command that runs the Fortran compiler. +<code class="code">FC</code> which specifies the command that runs the Fortran compiler. If your Fortran compiler is in a non-standard location, you -<span id="index-PATH-1"></span> -should set the environment variable <code>PATH</code> accordingly before -running <code>configure</code>, or use the configure variable <code>FC</code> to +<a class="index-entry-id" id="index-PATH-1"></a> +should set the environment variable <code class="env">PATH</code> accordingly before +running <code class="command">configure</code>, or use the configure variable <code class="code">FC</code> to specify its full path. </p> <p>If your Fortran libraries are in slightly peculiar places, you should -<span id="index-LD_005fLIBRARY_005fPATH-1"></span> -also look at <code>LD_LIBRARY_PATH</code> (or your system’s equivalent) to make +<a class="index-entry-id" id="index-LD_005fLIBRARY_005fPATH-1"></a> +also look at <code class="env">LD_LIBRARY_PATH</code> (or your system’s equivalent) to make sure that all libraries are on this path. </p> <p>Note that only Fortran compilers which convert identifiers to lower case are supported. </p> <p>You must set whatever compilation flags (if any) are needed to ensure -that Fortran <code>integer</code> is equivalent to a C <code>int</code> pointer and -Fortran <code>double precision</code> is equivalent to a C <code>double</code> +that Fortran <code class="code">integer</code> is equivalent to a C <code class="code">int</code> pointer and +Fortran <code class="code">double precision</code> is equivalent to a C <code class="code">double</code> pointer. This is checked during the configuration process. </p> -<p>Some of the Fortran code makes use of <code>DOUBLE COMPLEX</code> and -<code>COMPLEX*16</code> variables. This is checked for at configure time, as -well as its equivalence to the <code>Rcomplex</code> C structure defined in -<samp>R_ext/Complex.h</samp>. +<p>Some of the Fortran code makes use of <code class="code">DOUBLE COMPLEX</code> and +<code class="code">COMPLEX*16</code> variables. This is checked for at configure time, as +well as its equivalence to the <code class="code">Rcomplex</code> C structure defined in +<samp class="file">R_ext/Complex.h</samp>. </p> -<p><code>gfortran</code> 10 by default gives a compilation error for the +<p><code class="command">gfortran</code> 10 by default gives a compilation error for the previously widespread practice of passing a Fortran array element where an array is expected, or a scalar instead of a length-one array. See -<a href="https://gcc.gnu.org/gcc-10/porting_to.html">https://gcc.gnu.org/gcc-10/porting_to.html</a>. <code>gfortran</code> 12 +<a class="uref" href="https://gcc.gnu.org/gcc-10/porting_to.html">https://gcc.gnu.org/gcc-10/porting_to.html</a>. <code class="command">gfortran</code> 12 errors in more cases of this. </p> <hr> </div> -<div class="section" id="Compile-and-load-flags"> -<span id="Compile-and-load-flags-1"></span><h3 class="section">B.7 Compile and load flags</h3> +<div class="section-level-extent" id="Compile-and-load-flags"> +<h3 class="section" id="Compile-and-load-flags-1"><span>B.7 Compile and load flags<a class="copiable-link" href="#Compile-and-load-flags-1"> ¶</a></span></h3> -<p>A wide range of flags can be set in the file <samp>config.site</samp> or as +<p>A wide range of flags can be set in the file <samp class="file">config.site</samp> or as configure variables on the command line. We have already mentioned </p> -<dl compact="compact"> -<dt><span><code>CPPFLAGS</code></span></dt> -<dd><p>header file search directory (<samp>-I</samp>) and any other miscellaneous +<dl class="table"> +<dt><code class="code">CPPFLAGS</code></dt> +<dd><p>header file search directory (<samp class="option">-I</samp>) and any other miscellaneous options for the C and C++ preprocessors and compilers </p></dd> -<dt><span><code>LDFLAGS</code></span></dt> -<dd><p>path (<samp>-L</samp>), stripping (<samp>-s</samp>) and any other miscellaneous +<dt><code class="code">LDFLAGS</code></dt> +<dd><p>path (<samp class="option">-L</samp>), stripping (<samp class="option">-s</samp>) and any other miscellaneous options for the linker </p></dd> </dl> <p>and others include </p> -<dl compact="compact"> -<dt><span><code>CFLAGS</code></span></dt> +<dl class="table"> +<dt><code class="code">CFLAGS</code></dt> <dd><p>debugging and optimization flags, C </p></dd> -<dt><span><code>MAIN_CFLAGS</code></span></dt> +<dt><code class="code">MAIN_CFLAGS</code></dt> <dd><p>ditto, for compiling the main program (e.g. when profiling) </p></dd> -<dt><span><code>SHLIB_CFLAGS</code></span></dt> +<dt><code class="code">SHLIB_CFLAGS</code></dt> <dd><p>for shared objects (no known examples) </p></dd> -<dt><span><code>FFLAGS</code></span></dt> +<dt><code class="code">FFLAGS</code></dt> <dd><p>debugging and optimization flags, fixed-form Fortran </p></dd> -<dt><span><code>FCFLAGS</code></span></dt> +<dt><code class="code">FCFLAGS</code></dt> <dd><p>debugging and optimization flags, free-form Fortran </p></dd> -<dt><span><code>SAFE_FFLAGS</code></span></dt> +<dt><code class="code">SAFE_FFLAGS</code></dt> <dd><p>ditto for source files which need exact floating point behaviour </p></dd> -<dt><span><code>MAIN_FFLAGS</code></span></dt> +<dt><code class="code">MAIN_FFLAGS</code></dt> <dd><p>ditto, for compiling the main program (e.g. when profiling) </p></dd> -<dt><span><code>SHLIB_FFLAGS</code></span></dt> +<dt><code class="code">SHLIB_FFLAGS</code></dt> <dd><p>for shared objects (no known examples) </p></dd> -<dt><span><code>MAIN_LDFLAGS</code></span></dt> +<dt><code class="code">MAIN_LDFLAGS</code></dt> <dd><p>additional flags for the main link </p></dd> -<dt><span><code>SHLIB_LDFLAGS</code></span></dt> +<dt><code class="code">SHLIB_LDFLAGS</code></dt> <dd><p>additional flags for linking the shared objects </p></dd> -<dt><span><code>LIBnn</code></span></dt> -<dd><p>the primary library directory, <samp>lib</samp> or <samp>lib64</samp> +<dt><code class="code">LIBnn</code></dt> +<dd><p>the primary library directory, <samp class="file">lib</samp> or <samp class="file">lib64</samp> </p></dd> -<dt><span><code>CPICFLAGS</code></span></dt> +<dt><code class="code">CPICFLAGS</code></dt> <dd><p>special flags for compiling C code to be turned into a shared object </p></dd> -<dt><span><code>FPICFLAGS</code></span></dt> +<dt><code class="code">FPICFLAGS</code></dt> <dd><p>special flags for compiling Fortran code to be turned into a shared object </p></dd> -<dt><span><code>CXXPICFLAGS</code></span></dt> +<dt><code class="code">CXXPICFLAGS</code></dt> <dd><p>special flags for compiling C++ code to be turned into a shared object </p></dd> -<dt><span><code>DEFS</code></span></dt> +<dt><code class="code">DEFS</code></dt> <dd><p>defines to be used when compiling C code in R itself </p></dd> </dl> -<p>Library paths specified as <samp>-L/lib/path</samp> in <code>LDFLAGS</code> are -<span id="index-LD_005fLIBRARY_005fPATH-2"></span> -collected together and prepended to <code>LD_LIBRARY_PATH</code> (or your -system’s equivalent), so there should be no need for <samp>-R</samp> or -<samp>-rpath</samp> flags. -</p> -<p>Variables such as <code>CPICFLAGS</code> are determined where possible by -<code>configure</code>. Some systems allows two types of PIC flags, for -example ‘<samp>-fpic</samp>’ and ‘<samp>-fPIC</samp>’, and if they differ the first +<p>Library paths specified as <samp class="option">-L/lib/path</samp> in <code class="code">LDFLAGS</code> are +<a class="index-entry-id" id="index-LD_005fLIBRARY_005fPATH-2"></a> +collected together and prepended to <code class="env">LD_LIBRARY_PATH</code> (or your +system’s equivalent), so there should be no need for <samp class="option">-R</samp> or +<samp class="option">-rpath</samp> flags. +</p> +<p>Variables such as <code class="env">CPICFLAGS</code> are determined where possible by +<code class="command">configure</code>. Some systems allows two types of PIC flags, for +example ‘<samp class="samp">-fpic</samp>’ and ‘<samp class="samp">-fPIC</samp>’, and if they differ the first allows only a limited number of symbols in a shared object. Since R as a shared library has about 6200 symbols, if in doubt use the larger version. </p> -<p>Other variables often set by <code>configure</code> include -‘<samp>MAIN_LDFLAGS</samp>’, ‘<samp>SAFE_FFLAGS</samp>’, ‘<samp>SHLIB_LDFLAGS</samp>’ and -‘<samp>SHLIB_CXXLDFLAGS</samp>’: see file <samp>config.site</samp> in the sources for +<p>Other variables often set by <code class="command">configure</code> include +‘<samp class="samp">MAIN_LDFLAGS</samp>’, ‘<samp class="samp">SAFE_FFLAGS</samp>’, ‘<samp class="samp">SHLIB_LDFLAGS</samp>’ and +‘<samp class="samp">SHLIB_CXXLDFLAGS</samp>’: see file <samp class="file">config.site</samp> in the sources for more documentation on these and others. </p> <p>To compile a profiling version of R, one might for example want to -use ‘<samp>MAIN_CFLAGS=-pg</samp>’, ‘<samp>MAIN_FFLAGS=-pg</samp>’, -‘<samp>MAIN_LDFLAGS=-pg</samp>’ on platforms where ‘<samp>-pg</samp>’ cannot be used +use ‘<samp class="samp">MAIN_CFLAGS=-pg</samp>’, ‘<samp class="samp">MAIN_FFLAGS=-pg</samp>’, +‘<samp class="samp">MAIN_LDFLAGS=-pg</samp>’ on platforms where ‘<samp class="samp">-pg</samp>’ cannot be used with position-independent code. </p> -<p><strong>Beware</strong>: it may be necessary to set <code>CFLAGS</code> and -<code>FFLAGS</code> in ways compatible with the libraries to be used: one +<p><strong class="strong">Beware</strong>: it may be necessary to set <code class="code">CFLAGS</code> and +<code class="code">FFLAGS</code> in ways compatible with the libraries to be used: one possible issue is the alignment of doubles, another is the way structures are passed. </p> -<p>On some platforms <code>configure</code> will select additional flags for -<code>CFLAGS</code>, <code>CPPFLAGS</code> and <code>LIBS</code> in <code>R_XTRA_CFLAGS</code> +<p>On some platforms <code class="command">configure</code> will select additional flags for +<code class="code">CFLAGS</code>, <code class="code">CPPFLAGS</code> and <code class="code">LIBS</code> in <code class="code">R_XTRA_CFLAGS</code> (and so on). These are for options which are always required, for -example to force <acronym>IEC</acronym> 60559 compliance. +example to force <abbr class="acronym">IEC</abbr> 60559 compliance. </p> <hr> </div> -<div class="section" id="Maintainer-mode"> -<span id="Maintainer-mode-1"></span><h3 class="section">B.8 Maintainer mode</h3> +<div class="section-level-extent" id="Maintainer-mode"> +<h3 class="section" id="Maintainer-mode-1"><span>B.8 Maintainer mode<a class="copiable-link" href="#Maintainer-mode-1"> ¶</a></span></h3> <p>There are several files that are part of the R sources but can be re-generated from their own sources by configuring with option -<samp>--enable-maintainer-mode</samp> and then running <code>make</code> in the +<samp class="option">--enable-maintainer-mode</samp> and then running <code class="command">make</code> in the build directory. This requires other tools to be installed, discussed in the rest of this section. </p> -<p>File <samp>configure</samp> is created from <samp>configure.ac</samp> and the files -under <samp>m4</samp> by <code>autoconf</code> and <code>aclocal</code> (part of the -<strong>automake</strong> package). There is a formal version requirement on -<code>autoconf</code> of 2.71 or later, but it is unlikely that anything -other than the most recent versions<a id="DOCF69" href="#FOOT69"><sup>69</sup></a> +<p>File <samp class="file">configure</samp> is created from <samp class="file">configure.ac</samp> and the files +under <samp class="file">m4</samp> by <code class="command">autoconf</code> and <code class="command">aclocal</code> (part of the +<strong class="strong">automake</strong> package). There is a formal version requirement on +<code class="command">autoconf</code> of 2.71 or later, but it is unlikely that anything +other than the most recent versions<a class="footnote" id="DOCF69" href="#FOOT69"><sup>69</sup></a> have been thoroughly tested. </p> -<p>File <samp>src/include/config.h</samp> is created by <code>autoheader</code> -(part of <strong>autoconf</strong>). +<p>File <samp class="file">src/include/config.h</samp> is created by <code class="command">autoheader</code> +(part of <strong class="strong">autoconf</strong>). </p> -<p>Grammar files <samp>*.y</samp> are converted to C sources by an implementation -of <code>yacc</code>, usually <code>bison -y</code>: these are found in -<samp>src/main</samp> and <samp>src/library/tools/src</samp>. It is known that -earlier versions of <code>bison</code> generate code which reads (and in -some cases writes) outside array bounds: <code>bison</code> 3.8.2 is +<p>Grammar files <samp class="file">*.y</samp> are converted to C sources by an implementation +of <code class="command">yacc</code>, usually <code class="command">bison -y</code>: these are found in +<samp class="file">src/main</samp> and <samp class="file">src/library/tools/src</samp>. It is known that +earlier versions of <code class="command">bison</code> generate code which reads (and in +some cases writes) outside array bounds: <code class="command">bison</code> 3.8.2 is currently used. </p> -<p>The ultimate sources for package <strong>compiler</strong> are in its <samp>noweb</samp> +<p>The ultimate sources for package <strong class="strong">compiler</strong> are in its <samp class="file">noweb</samp> directory. To re-create the sources from -<samp>src/library/compiler/noweb/compiler.nw</samp>, the command -<code>notangle</code> is required. Some Linux distributions include this -command in package <strong>noweb</strong>. It can also be installed from the -sources at <a href="https://www.cs.tufts.edu/~nr/noweb/">https://www.cs.tufts.edu/~nr/noweb/</a><a id="DOCF70" href="#FOOT70"><sup>70</sup></a>. The package +<samp class="file">src/library/compiler/noweb/compiler.nw</samp>, the command +<code class="command">notangle</code> is required. Some Linux distributions include this +command in package <strong class="strong">noweb</strong>. It can also be installed from the +sources at <a class="url" href="https://www.cs.tufts.edu/~nr/noweb/">https://www.cs.tufts.edu/~nr/noweb/</a><a class="footnote" id="DOCF70" href="#FOOT70"><sup>70</sup></a>. The package sources are only re-created even in maintainer mode if -<samp>src/library/compiler/noweb/compiler.nw</samp> has been updated. +<samp class="file">src/library/compiler/noweb/compiler.nw</samp> has been updated. </p> <hr> </div> </div> -<div class="appendix" id="Platform-notes"> -<span id="Platform-notes-1"></span><h2 class="appendix">Appendix C Platform notes</h2> +<div class="appendix-level-extent" id="Platform-notes"> +<h2 class="appendix" id="Platform-notes-1"><span>Appendix C Platform notes<a class="copiable-link" href="#Platform-notes-1"> ¶</a></span></h2> <p>This section provides some notes on building R on different Unix-alike platforms. These notes are based on tests run on one or two systems in @@ -4636,17 +4630,17 @@ of compilers and support libraries. </p> <p>Older versions of this manual contain notes on platforms such as -HP-UX, <abbr>IRIX</abbr>, Alpha/OSF1 (for R < 2.10.0, and support -has since been removed for all of these) and <abbr>AIX</abbr> (for R < = +HP-UX, <abbr class="abbr">IRIX</abbr>, Alpha/OSF1 (for R < 2.10.0, and support +has since been removed for all of these) and <abbr class="abbr">AIX</abbr> (for R < = 3.5.x) for which we have had no recent reports. </p> <p>C macros to select particular platforms can be tricky to track down (there is a fair amount of misinformation on the Web). The Wiki -(currently) at <a href="https://sourceforge.net/p/predef/wiki/Home/">https://sourceforge.net/p/predef/wiki/Home/</a> +(currently) at <a class="uref" href="https://sourceforge.net/p/predef/wiki/Home/">https://sourceforge.net/p/predef/wiki/Home/</a> can be helpful. The R sources have used (often in included software -under <samp>src/extra</samp>) +under <samp class="file">src/extra</samp>) </p><div class="example"> -<pre class="example">AIX: _AIX +<pre class="example-preformatted">AIX: _AIX Cygwin: __CYGWIN__ FreeBSD: __FreeBSD__ HP-UX: __hpux__, __hpux @@ -4659,91 +4653,91 @@ Windows on 64-but ARM: _M_ARM64 or _WIN32 plus __aarch64__ </pre></div> -<p>Identifying compilers can be very tricky. GCC defines <code>__GNUC__</code>, +<p>Identifying compilers can be very tricky. GCC defines <code class="code">__GNUC__</code>, but so do other compilers claiming conformance with it, notably (LLVM -and Apple) <code>clang</code> and Intel compilers. Further, some use the -value of <code>__GNUC__</code> for their version, not the version of GCC they -claim to be compatible with.<a id="DOCF71" href="#FOOT71"><sup>71</sup></a> <code>clang</code>-based -compilers define <code>__clang__</code>. Both LLVM and Apple <code>clang</code> -define <code>__clang_major__</code> as a string giving their major version, +and Apple) <code class="command">clang</code> and Intel compilers. Further, some use the +value of <code class="code">__GNUC__</code> for their version, not the version of GCC they +claim to be compatible with.<a class="footnote" id="DOCF71" href="#FOOT71"><sup>71</sup></a> <code class="command">clang</code>-based +compilers define <code class="code">__clang__</code>. Both LLVM and Apple <code class="command">clang</code> +define <code class="code">__clang_major__</code> as a string giving their major version, but for example Apple’s 13.x.y is very different from LLVM’s 13.x.y. -And compilers based on LLVM <code>clang</code>, for example from Intel and +And compilers based on LLVM <code class="command">clang</code>, for example from Intel and IBM, will define these. Some of the included software uses -<code>__APPLE_CC__</code> to identify an Apple compiler (which used to include -Apple builds of GCC), but Apple <code>clang</code> is better identified by -the <code>__apple_build_version__</code> macro. +<code class="code">__APPLE_CC__</code> to identify an Apple compiler (which used to include +Apple builds of GCC), but Apple <code class="command">clang</code> is better identified by +the <code class="code">__apple_build_version__</code> macro. </p> <hr> -<div class="section" id="X11-issues"> -<span id="X11-issues-1"></span><h3 class="section">C.1 X11 issues</h3> +<div class="section-level-extent" id="X11-issues"> +<h3 class="section" id="X11-issues-1"><span>C.1 X11 issues<a class="copiable-link" href="#X11-issues-1"> ¶</a></span></h3> -<p>The ‘<samp>X11()</samp>’ graphics device is the one started automatically on +<p>The ‘<samp class="samp">X11()</samp>’ graphics device is the one started automatically on Unix-alikes (except most macOS builds) when plotting. As its name implies, it displays on a (local or remote) X server, and relies on the services provided by the X server. </p> -<span id="index-Cairo-2"></span> -<p>The ‘modern’ version of the ‘<samp>X11()</samp>’ device is based on ‘<samp>cairo</samp>’ -graphics and (in most implementations) uses ‘<samp>fontconfig</samp>’ to pick and +<a class="index-entry-id" id="index-Cairo-2"></a> +<p>The ‘modern’ version of the ‘<samp class="samp">X11()</samp>’ device is based on ‘<samp class="samp">cairo</samp>’ +graphics and (in most implementations) uses ‘<samp class="samp">fontconfig</samp>’ to pick and render fonts. This is done on the server, and although there can be selection issues, they are more amenable than the issues with -‘<samp>X11()</samp>’ discussed in the rest of this section. +‘<samp class="samp">X11()</samp>’ discussed in the rest of this section. </p> <p>When X11 was designed, most displays were around 75dpi, whereas today they are of the order of 100dpi or more. If you find that X11() -is reporting<a id="DOCF72" href="#FOOT72"><sup>72</sup></a> missing font sizes, especially larger ones, it is likely +is reporting<a class="footnote" id="DOCF72" href="#FOOT72"><sup>72</sup></a> missing font sizes, especially larger ones, it is likely that you are not using scalable fonts and have not installed the 100dpi versions of the X11 fonts. The names and details differ by system, but will likely have something like Fedora’s </p><div class="example"> -<pre class="example">xorg-x11-fonts-75dpi +<pre class="example-preformatted">xorg-x11-fonts-75dpi xorg-x11-fonts-100dpi xorg-x11-fonts-ISO8859-2-75dpi xorg-x11-fonts-Type1 xorg-x11-fonts-cyrillic </pre></div> -<p>and you need to ensure that the ‘<samp>-100dpi</samp>’ versions are installed -and on the X11 font path (check via <code>xset -q</code>). The -‘<samp>X11()</samp>’ device does try to set a pointsize and not a pixel size: +<p>and you need to ensure that the ‘<samp class="samp">-100dpi</samp>’ versions are installed +and on the X11 font path (check via <code class="command">xset -q</code>). The +‘<samp class="samp">X11()</samp>’ device does try to set a pointsize and not a pixel size: laptop users may find the default setting of 12 too large (although very frequently laptop screens are set to a fictitious dpi to appear like a scaled-down desktop screen). </p> <p>More complicated problems can occur in non-Western-European locales, so if you are using one, the first thing to check is that things work in -the <code>C</code> locale. The likely issues are a failure to find any fonts -or glyphs being rendered incorrectly (often as a pair of <acronym>ASCII</acronym> +the <code class="code">C</code> locale. The likely issues are a failure to find any fonts +or glyphs being rendered incorrectly (often as a pair of <abbr class="acronym">ASCII</abbr> characters). X11 works by being asked for a font specification and coming up with its idea of a close match. For text (as distinct from the symbols used by plotmath), the specification is the first element of -the option <code>"X11fonts"</code> which defaults to +the option <code class="code">"X11fonts"</code> which defaults to </p> <div class="example"> -<pre class="example">"-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*" +<pre class="example-preformatted">"-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*" </pre></div> <p>If you are using a single-byte encoding, for example ISO 8859-2 in -Eastern Europe or KOI8-R in Russian, use <code>xlsfonts</code> to find an +Eastern Europe or KOI8-R in Russian, use <code class="command">xlsfonts</code> to find an appropriate family of fonts in your encoding (the last field in the listing). If you find none, it is likely that you need to install -further font packages, such as ‘<samp>xorg-x11-fonts-ISO8859-2-75dpi</samp>’ and -‘<samp>xorg-x11-fonts-cyrillic</samp>’ shown in the listing above. +further font packages, such as ‘<samp class="samp">xorg-x11-fonts-ISO8859-2-75dpi</samp>’ and +‘<samp class="samp">xorg-x11-fonts-cyrillic</samp>’ shown in the listing above. </p> <p>Multi-byte encodings (most commonly UTF-8) are even more complicated. -There are few fonts in ‘<samp>iso10646-1</samp>’, the Unicode encoding, and they +There are few fonts in ‘<samp class="samp">iso10646-1</samp>’, the Unicode encoding, and they only contain a subset of the available glyphs (and are often fixed-width -designed for use in terminals). In such locales <em>fontsets</em> are +designed for use in terminals). In such locales <em class="emph">fontsets</em> are used, made up of fonts encoded in other encodings. If the locale you -are using has an entry in the ‘<samp>XLC_LOCALE</samp>’ directory (typically -<samp>/usr/share/X11/locale</samp>), it is likely that all you need to do is to +are using has an entry in the ‘<samp class="samp">XLC_LOCALE</samp>’ directory (typically +<samp class="file">/usr/share/X11/locale</samp>), it is likely that all you need to do is to pick a suitable font specification that has fonts in the encodings specified there. If not, you may have to get hold of a suitable locale entry for X11. This may mean that, for example, Japanese text can be -displayed when running in ‘<samp>ja_JP.UTF-8</samp>’ but not when running in -‘<samp>en_GB.UTF-8</samp>’ on the same machine (although on some systems many -UTF-8 X11 locales are aliased to ‘<samp>en_US.UTF-8</samp>’ which covers several +displayed when running in ‘<samp class="samp">ja_JP.UTF-8</samp>’ but not when running in +‘<samp class="samp">en_GB.UTF-8</samp>’ on the same machine (although on some systems many +UTF-8 X11 locales are aliased to ‘<samp class="samp">en_US.UTF-8</samp>’ which covers several character sets, e.g. ISO 8859-1 (Western European), JISX0208 (Kanji), KSC5601 (Korean), GB2312 (Chinese Han) and JISX0201 (Kana)). </p> @@ -4753,82 +4747,82 @@ provides standard typefaces such as Helvetica with a larger coverage of Unicode glyphs than the standard X11 bitmaps, including Cyrillic. These are generally not part of the default install, and the X server may need -to be configured to use them. They might be under the X11 <samp>fonts</samp> +to be configured to use them. They might be under the X11 <samp class="file">fonts</samp> directory or elsewhere, for example, </p> <div class="example"> -<pre class="example">/usr/share/fonts/default/Type1 +<pre class="example-preformatted">/usr/share/fonts/default/Type1 /usr/share/fonts/ja/TrueType </pre></div> <hr> </div> -<div class="section" id="Linux"> -<span id="Linux-1"></span><h3 class="section">C.2 Linux</h3> -<span id="index-Linux-1"></span> +<div class="section-level-extent" id="Linux"> +<h3 class="section" id="Linux-1"><span>C.2 Linux<a class="copiable-link" href="#Linux-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-Linux-1"></a> <p>Linux is the main development platform for R, so compilation from the sources is normally straightforward with the most common compilers and -libraries.<a id="DOCF73" href="#FOOT73"><sup>73</sup></a> +libraries.<a class="footnote" id="DOCF73" href="#FOOT73"><sup>73</sup></a> </p> <p>This section is about the GCC compilers: -<code>gcc</code>/<code>gfortran</code>/<code>g++</code>. +<code class="command">gcc</code>/<code class="command">gfortran</code>/<code class="command">g++</code>. </p> -<p>Recall that some package management systems (such as <acronym>RPM</acronym> and +<p>Recall that some package management systems (such as <abbr class="acronym">RPM</abbr> and deb) make a distinction between the user version of a package and the developer version. The latter usually has the same name but with the -extension ‘<samp>-devel</samp>’ or ‘<samp>-dev</samp>’: you need both versions -installed. So please check the <code>configure</code> output to see if the -expected features are detected: if for example ‘<samp>readline</samp>’ is +extension ‘<samp class="samp">-devel</samp>’ or ‘<samp class="samp">-dev</samp>’: you need both versions +installed. So please check the <code class="code">configure</code> output to see if the +expected features are detected: if for example ‘<samp class="samp">readline</samp>’ is missing add the developer package. (On most systems you will also need -‘<samp>ncurses</samp>’ and its developer package, although these should be -dependencies of the ‘<samp>readline</samp>’ package(s).) You should expect to -see in the <code>configure</code> summary +‘<samp class="samp">ncurses</samp>’ and its developer package, although these should be +dependencies of the ‘<samp class="samp">readline</samp>’ package(s).) You should expect to +see in the <code class="command">configure</code> summary </p> <div class="example"> -<pre class="example"> Interfaces supported: X11, tcltk +<pre class="example-preformatted"> Interfaces supported: X11, tcltk External libraries: pcre2, readline, curl Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU </pre></div> <p>When R has been installed from a binary distribution there are sometimes problems with missing components such as the Fortran -compiler. Searching the ‘<samp>R-help</samp>’ archives will normally reveal +compiler. Searching the ‘<samp class="samp">R-help</samp>’ archives will normally reveal what is needed. </p> -<p>It seems that ‘<samp>ix86</samp>’ Linux accepts non-PIC code in shared +<p>It seems that ‘<samp class="samp">ix86</samp>’ Linux accepts non-PIC code in shared libraries, but this is not necessarily so on other platforms, in -particular on 64-bit <acronym>CPU</acronym>s such as ‘<samp>x86_64</samp>’. So care -can be needed with <acronym>BLAS</acronym> libraries and when building R as a +particular on 64-bit <abbr class="acronym">CPU</abbr>s such as ‘<samp class="samp">x86_64</samp>’. So care +can be needed with <abbr class="acronym">BLAS</abbr> libraries and when building R as a shared library to ensure that position-independent code is used in any -static libraries (such as the Tcl/Tk libraries, <code>libpng</code>, -<code>libjpeg</code> and <code>zlib</code>) which might be linked against. +static libraries (such as the Tcl/Tk libraries, <code class="code">libpng</code>, +<code class="code">libjpeg</code> and <code class="code">zlib</code>) which might be linked against. Fortunately these are normally built as shared libraries with the -exception of the ATLAS <acronym>BLAS</acronym> libraries. +exception of the ATLAS <abbr class="acronym">BLAS</abbr> libraries. </p> -<p>The default optimization settings chosen for <code>CFLAGS</code> etc are -conservative. It is likely that using <samp>-mtune</samp> will result in +<p>The default optimization settings chosen for <code class="code">CFLAGS</code> etc are +conservative. It is likely that using <samp class="option">-mtune</samp> will result in significant performance improvements on recent CPUs: one possibility is -to add <samp>-mtune=native</samp> for the best possible performance on the +to add <samp class="option">-mtune=native</samp> for the best possible performance on the machine on which R is being installed. It is also possible to -increase the optimization levels to <samp>-O3</samp>: however for many +increase the optimization levels to <samp class="option">-O3</samp>: however for many versions of the compilers this has caused problems in at least one -<acronym>CRAN</acronym> package. +<abbr class="acronym">CRAN</abbr> package. </p> -<p>Do not use <samp>-O3</samp> with <code>gcc</code> 11.0 or 11.1: it mis-compiles +<p>Do not use <samp class="option">-O3</samp> with <code class="command">gcc</code> 11.0 or 11.1: it mis-compiles code resulting in plausible but -incorrect results. (This was seen in package <a href="https://CRAN.R-project.org/package=MASS"><strong>MASS</strong></a> but has +incorrect results. (This was seen in package <a class="url" href="https://CRAN.R-project.org/package=MASS"><strong class="strong">MASS</strong></a> but has been worked around there as from version 3.1-57.) </p> -<p>For comments on ‘<samp>ix86</samp>’ builds (including 32-bit builds on -‘<samp>x86_64</samp>’) see the version of this manual for R 4.3.x. +<p>For comments on ‘<samp class="samp">ix86</samp>’ builds (including 32-bit builds on +‘<samp class="samp">x86_64</samp>’) see the version of this manual for R 4.3.x. </p> -<p>To build a 64-bit version of R on ‘<samp>ppc64</samp>’ (also known as -‘<samp>powerpc64</samp>’) with <code>gcc</code> 4.1.1, Ei-ji Nakama used +<p>To build a 64-bit version of R on ‘<samp class="samp">ppc64</samp>’ (also known as +‘<samp class="samp">powerpc64</samp>’) with <code class="command">gcc</code> 4.1.1, Ei-ji Nakama used </p> <div class="example"> -<pre class="example">CC="gcc -m64" +<pre class="example-preformatted">CC="gcc -m64" CXX="gxx -m64" FC="gfortran -m64" CFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" @@ -4836,90 +4830,90 @@ </pre></div> <p>the additional flags being needed to resolve problems linking against -<samp>libnmath.a</samp> and when linking R as a shared library. +<samp class="file">libnmath.a</samp> and when linking R as a shared library. </p> -<p>The setting of the macro ‘<samp>SAFE_FFLAGS</samp>’ may need some help. It -should not need additional flags on platforms other than ‘<samp>68000</samp>’ -(not likely to be encountered) and ‘<samp>ix86</samp>’. For the latter, if -the Fortran compiler is GNU (<code>gfortran</code> or possibly -<code>g77</code>) the flags -</p><div class="example"> -<pre class="example">-msse2 -mfpmath=sse -</pre></div> -<p>are added: earlier versions of R added <samp>-ffloat-store</samp> and -this might still be needed if a ‘<samp>ix86</samp>’ CPU is encountered -without SSE2 support. Note that it is a <em>replacement</em> for -‘<samp>FFLAGS</samp>’, so should include all the flags in that macro (except +<p>The setting of the macro ‘<samp class="samp">SAFE_FFLAGS</samp>’ may need some help. It +should not need additional flags on platforms other than ‘<samp class="samp">68000</samp>’ +(not likely to be encountered) and ‘<samp class="samp">ix86</samp>’. For the latter, if +the Fortran compiler is GNU (<code class="command">gfortran</code> or possibly +<code class="command">g77</code>) the flags +</p><div class="example"> +<pre class="example-preformatted">-msse2 -mfpmath=sse +</pre></div> +<p>are added: earlier versions of R added <samp class="option">-ffloat-store</samp> and +this might still be needed if a ‘<samp class="samp">ix86</samp>’ CPU is encountered +without SSE2 support. Note that it is a <em class="emph">replacement</em> for +‘<samp class="samp">FFLAGS</samp>’, so should include all the flags in that macro (except perhaps the optimization level). </p> <p>Additional compilation flags can be specified for added safety/security checks. For example Fedora adds </p> <div class="example"> -<pre class="example">-Werror=format-security -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS +<pre class="example-preformatted">-Werror=format-security -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection </pre></div> <p>to all the C, C++ and Fortran compiler flags (even though -<code>_GLIBCXX_ASSERTIONS</code> is only for C++ in current GCC and -<code>glibc</code> and none of these are documented for <code>gfortran</code>). -Use of <code>_GLIBCXX_ASSERTIONS</code> will link <code>abort</code> and -<code>printf</code> into almost all C++ code, and <code>R CMD check +<code class="code">_GLIBCXX_ASSERTIONS</code> is only for C++ in current GCC and +<code class="code">glibc</code> and none of these are documented for <code class="code">gfortran</code>). +Use of <code class="code">_GLIBCXX_ASSERTIONS</code> will link <code class="code">abort</code> and +<code class="code">printf</code> into almost all C++ code, and <code class="command">R CMD check --as-cran</code> will warn. </p> <hr> -<div class="subsection" id="Clang"> -<span id="Clang-1"></span><h4 class="subsection">C.2.1 Clang</h4> +<div class="subsection-level-extent" id="Clang"> +<h4 class="subsection" id="Clang-1"><span>C.2.1 Clang<a class="copiable-link" href="#Clang-1"> ¶</a></span></h4> -<p>R has been built with Linux ‘<samp>ix86</samp>’ and ‘<samp>x86_64</samp>’ C and -C++ compilers (<a href="https://clang.llvm.org">https://clang.llvm.org</a>) based on the Clang -front-ends, invoked by <code>CC=clang CXX=clang++</code>, together with -<code>gfortran</code>. These take very similar options to the +<p>R has been built with Linux ‘<samp class="samp">ix86</samp>’ and ‘<samp class="samp">x86_64</samp>’ C and +C++ compilers (<a class="uref" href="https://clang.llvm.org">https://clang.llvm.org</a>) based on the Clang +front-ends, invoked by <code class="code">CC=clang CXX=clang++</code>, together with +<code class="command">gfortran</code>. These take very similar options to the corresponding GCC compilers. </p> <p>This has to be used in conjunction with a Fortran compiler: the -<code>configure</code> code will remove <samp>-lgcc</samp> from <code>FLIBS</code>, -which is needed for some versions of <code>gfortran</code>. +<code class="command">configure</code> code will remove <samp class="option">-lgcc</samp> from <code class="env">FLIBS</code>, +which is needed for some versions of <code class="command">gfortran</code>. </p> -<p>The current out-of-the-box default for <code>clang++</code> is to use the -C++ runtime from the installed <code>g++</code>. Using the runtime from -the <a href="https://libcxx.llvm.org/"><code>libc++</code></a> project (Fedora <acronym>RPM</acronym> -<code>libcxx-devel</code>) <em>via</em> <samp>-stdlib=libc++</samp> has also been +<p>The current out-of-the-box default for <code class="command">clang++</code> is to use the +C++ runtime from the installed <code class="command">g++</code>. Using the runtime from +the <a class="url" href="https://libcxx.llvm.org/"><code class="code">libc++</code></a> project (Fedora <abbr class="acronym">RPM</abbr> +<code class="code">libcxx-devel</code>) <em class="emph">via</em> <samp class="option">-stdlib=libc++</samp> has also been tested. </p> -<p>Recent versions have (optional when built) <abbr>OpenMP</abbr> support.<a id="DOCF74" href="#FOOT74"><sup>74</sup></a> +<p>Recent versions have (optional when built) <abbr class="abbr">OpenMP</abbr> support.<a class="footnote" id="DOCF74" href="#FOOT74"><sup>74</sup></a> </p> -<p>There are problems mixing <code>clang</code> 15.0.0 and later built as -default on Linux to produce PIE code and <code>gfortran</code> 11 or later, -which does not. One symptom is that <code>configure</code> does not detect -<code>FC_LEN_T</code>, which can be overcome by setting +<p>There are problems mixing <code class="command">clang</code> 15.0.0 and later built as +default on Linux to produce PIE code and <code class="command">gfortran</code> 11 or later, +which does not. One symptom is that <code class="command">configure</code> does not detect +<code class="code">FC_LEN_T</code>, which can be overcome by setting </p><div class="example"> -<pre class="example">FPIEFLAGS=-fPIE +<pre class="example-preformatted">FPIEFLAGS=-fPIE </pre></div> -<p>in <samp>config.site</samp>. (<code>configure</code> tries that value if it is +<p>in <samp class="file">config.site</samp>. (<code class="command">configure</code> tries that value if it is unset.) </p> <hr> </div> -<div class="subsection" id="flang"> -<span id="flang-1"></span><h4 class="subsection">C.2.2 flang</h4> +<div class="subsection-level-extent" id="flang"> +<h4 class="subsection" id="flang-1"><span>C.2.2 flang<a class="copiable-link" href="#flang-1"> ¶</a></span></h4> -<p>The name <code>flang</code> has been used for two projects: this is about +<p>The name <code class="command">flang</code> has been used for two projects: this is about the sub-project of LLVM which builds a Fortran compiler and runtime -libraries. The compiler is currently named <code>flang-new</code> but has been -announced to be renamed to <code>flang</code> when more nearly complete (and -at some earlier point in its development was known as <code>f18</code>). +libraries. The compiler is currently named <code class="command">flang-new</code> but has been +announced to be renamed to <code class="command">flang</code> when more nearly complete (and +at some earlier point in its development was known as <code class="command">f18</code>). </p> -<p>The version in LLVM 16 and later was able to build R on ‘<samp>x86_64</samp>’ Linux +<p>The version in LLVM 16 and later was able to build R on ‘<samp class="samp">x86_64</samp>’ Linux with </p><div class="example"> -<pre class="example">FC=/path/to/flang-new +<pre class="example-preformatted">FC=/path/to/flang-new </pre></div> -<p>with the matching <code>clang</code> used as the C compiler, and the build -passed <code>make check-all</code>. There is also support for -‘<samp>aarch64</samp>’ and ‘<samp>ppc64le</samp>’ Linux, but these have not been +<p>with the matching <code class="command">clang</code> used as the C compiler, and the build +passed <code class="command">make check-all</code>. There is also support for +‘<samp class="samp">aarch64</samp>’ and ‘<samp class="samp">ppc64le</samp>’ Linux, but these have not been tested with R. </p> @@ -4931,34 +4925,34 @@ <hr> </div> -<div class="subsection" id="Intel-compilers"> -<span id="Intel-compilers-1"></span><h4 class="subsection">C.2.3 Intel compilers</h4> +<div class="subsection-level-extent" id="Intel-compilers"> +<h4 class="subsection" id="Intel-compilers-1"><span>C.2.3 Intel compilers<a class="copiable-link" href="#Intel-compilers-1"> ¶</a></span></h4> <p>In late 2020 Intel revamped their C/C++ compilers (and later their Fortran compiler) to use an LLVM back-end (and for the C/C++ compilers, -a modified version of <code>clang</code> as the front-end). Those -compilers are only for ‘<samp>x86_64</samp>’: the earlier (now called +a modified version of <code class="command">clang</code> as the front-end). Those +compilers are only for ‘<samp class="samp">x86_64</samp>’: the earlier (now called ‘Classic’) C/C++ compilers were discontinued in late 2023 (and are covered in the version of this manual for R 4.3.x: the Fortran compiler -<code>ifort</code> remains part of the Fortran distribution).. +<code class="command">ifort</code> remains part of the Fortran distribution).. </p> <p>The compilers are now all under Intel’s ‘oneAPI’ brand. The revamped -ones are <code>icx</code>, <code>icpx</code> and <code>ifx</code>; they are -identified by the C/C++ macro <code>__INTEL_LLVM_COMPILER</code> (and do not -define <code>__INTEL_COMPILER</code>: they also define <code>__clang__</code> and -<code>__clang_major__</code>). +ones are <code class="command">icx</code>, <code class="command">icpx</code> and <code class="command">ifx</code>; they are +identified by the C/C++ macro <code class="code">__INTEL_LLVM_COMPILER</code> (and do not +define <code class="code">__INTEL_COMPILER</code>: they also define <code class="code">__clang__</code> and +<code class="code">__clang_major__</code>). </p> -<p>The C++ compiler uses the system’s <code>libstdc++</code> as its runtime -library rather than LLVM’s <code>libc++</code>. +<p>The C++ compiler uses the system’s <code class="code">libstdc++</code> as its runtime +library rather than LLVM’s <code class="code">libc++</code>. </p> <p>Standalone installers (which are free-of-charge) are available from -<a href="https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html">https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html</a>: +<a class="uref" href="https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html">https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html</a>: they are also part of the oneAPI Base and HPC (for Fortran) toolkits. </p> <p>We tried the compilers in oneAPI 2024.2.1 and 2023.x.y using (the paths do differ by compiler version) </p><div class="example"> -<pre class="example">IP=/path/to/compilers/bin/ +<pre class="example-preformatted">IP=/path/to/compilers/bin/ CC=$IP/icx CXX=$IP/icpx FC=$IP/ifx @@ -4970,53 +4964,53 @@ LDFLAGS="-L/path/to/compilers/compiler/lib -L/usr/local/lib64" </pre></div> <p>but the build segfaulted in the checks (in complex arithmetic in -<samp>tests/lapack.R</samp>). +<samp class="file">tests/lapack.R</samp>). </p> <p>Intel document building R with MKL: for the Intel compilers this needed something like </p><div class="example"> -<pre class="example">MKL_LIB_PATH=/path/to/intel_mkl/mkl/lib/intel64 +<pre class="example-preformatted">MKL_LIB_PATH=/path/to/intel_mkl/mkl/lib/intel64 export LD_LIBRARY_PATH="$MKL_LIB_PATH" MKL="-L${MKL_LIB_PATH} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential" ./configure --with-blas="$MKL" --with-lapack </pre></div> <p>and the build passed its checks with MKL 2023.2.0 (but not 2024.x on the hardware tested). It may also be possible to use a compiler option like -<samp>-qmkl=sequential</samp>. +<samp class="option">-qmkl=sequential</samp>. </p> -<p>One quirk is that the Intel Fortran compilers do not accept <samp>.f95</samp> -files, only <samp>.f90</samp>, for free-format Fortran. <code>configure</code> -adds <samp>-Tf</samp> which tells the compiler this is indeed a Fortran file -(and needs to immediately precede the file name), but <samp>-free</samp> is -needed to say it is free-format. Hence setting the <code>FCFLAGS</code> +<p>One quirk is that the Intel Fortran compilers do not accept <samp class="file">.f95</samp> +files, only <samp class="file">.f90</samp>, for free-format Fortran. <code class="command">configure</code> +adds <samp class="option">-Tf</samp> which tells the compiler this is indeed a Fortran file +(and needs to immediately precede the file name), but <samp class="option">-free</samp> is +needed to say it is free-format. Hence setting the <code class="code">FCFLAGS</code> macro. </p> <p>The compilers have many options: as the C/C++ and Fortran compilers have different origins for their front-ends, there is little consistency in their options. -(The C/C++ compilers support ‘all’ <code>clang</code> options even if -undocumented for <code>icx</code>/<code>icpc</code>, such as -<samp>-Wno-strict-prototypes</samp> above, However it is unclear for which -version of <code>clang</code>: the Intel manual suggests checking -<code>icx -help</code>.) The C/C++ compilers support clang-style -<abbr>LTO</abbr>: it is not clear if the Fortran one does. +(The C/C++ compilers support ‘all’ <code class="command">clang</code> options even if +undocumented for <code class="command">icx</code>/<code class="command">icpc</code>, such as +<samp class="option">-Wno-strict-prototypes</samp> above, However it is unclear for which +version of <code class="command">clang</code>: the Intel manual suggests checking +<code class="command">icx -help</code>.) The C/C++ compilers support clang-style +<abbr class="abbr">LTO</abbr>: it is not clear if the Fortran one does. </p> <p>For some earlier versions (including 2023.2.0) all CPU times in e.g. -<code>proc.time()</code> are reported as zero. If you see this, uncomment the -‘<samp>INTEL_ICX_FIX</samp>’ setting in <samp>config.site</samp> and re-build. +<code class="code">proc.time()</code> are reported as zero. If you see this, uncomment the +‘<samp class="samp">INTEL_ICX_FIX</samp>’ setting in <samp class="file">config.site</samp> and re-build. </p> -<p>The preferred Fortran standard for <code>ifx</code> can be set by one of -<samp>-std90</samp>, <samp>-std95</samp>, <samp>-std03</samp>, <samp>-std08</samp> or -<samp>-std18</samp> (and variants). However, this is documented to only +<p>The preferred Fortran standard for <code class="command">ifx</code> can be set by one of +<samp class="option">-std90</samp>, <samp class="option">-std95</samp>, <samp class="option">-std03</samp>, <samp class="option">-std08</samp> or +<samp class="option">-std18</samp> (and variants). However, this is documented to only affect warnings on non-standard features: the default is no such warnings. </p> <p>Warning to package maintainers: the Intel Fortran compiler interprets -comments intended for Visual Fortran<a id="DOCF75" href="#FOOT75"><sup>75</sup></a> like +comments intended for Visual Fortran<a class="footnote" id="DOCF75" href="#FOOT75"><sup>75</sup></a> like </p><div class="example"> -<pre class="example">!DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'kdenestmlcvb' :: kdenestmlcvb +<pre class="example-preformatted">!DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'kdenestmlcvb' :: kdenestmlcvb </pre></div> -<p>The <code>DLLEXPORT</code> gives a warning but the remainder silently +<p>The <code class="code">DLLEXPORT</code> gives a warning but the remainder silently generates incorrectly named entry points. Such comment lines need to be removed from code for use with R (even if using Intel Fortran on Windows). @@ -5026,129 +5020,129 @@ <hr> </div> </div> -<div class="section" id="macOS"> -<span id="macOS-2"></span><h3 class="section">C.3 macOS</h3> -<span id="index-macOS-2"></span> +<div class="section-level-extent" id="macOS"> +<h3 class="section" id="macOS-2"><span>C.3 macOS<a class="copiable-link" href="#macOS-2"> ¶</a></span></h3> +<a class="index-entry-id" id="index-macOS-2"></a> -<p>The instructions here are for ‘Apple Silicon’ (‘<samp>arm64</samp>’) or Intel -64-bit (‘<samp>x86_64</samp>’) builds on macOS 11 (Big Sur), 12 +<p>The instructions here are for ‘Apple Silicon’ (‘<samp class="samp">arm64</samp>’) or Intel +64-bit (‘<samp class="samp">x86_64</samp>’) builds on macOS 11 (Big Sur), 12 (Monterey), 13 (Ventura), 14 (Sonoma) and likely later. (They may well work on Intel macOS 10.14 or 10.15, but are untested there.) </p> <hr> -<div class="subsection" id="Prerequisites"> -<span id="Prerequisites-1"></span><h4 class="subsection">C.3.1 Prerequisites</h4> +<div class="subsection-level-extent" id="Prerequisites"> +<h4 class="subsection" id="Prerequisites-1"><span>C.3.1 Prerequisites<a class="copiable-link" href="#Prerequisites-1"> ¶</a></span></h4> -<p>The Apple silicon conmponents install into <samp>/opt/R/arm64</samp>, the -Intel ones into <samp>/opt/R/x86_64</samp>. That may not exist<a id="DOCF76" href="#FOOT76"><sup>76</sup></a> +<p>The Apple silicon conmponents install into <samp class="file">/opt/R/arm64</samp>, the +Intel ones into <samp class="file">/opt/R/x86_64</samp>. That may not exist<a class="footnote" id="DOCF76" href="#FOOT76"><sup>76</sup></a> so it is simplest to first create the directory and adjust its ownership if desired: for example by </p> <div class="example"> -<pre class="example">sudo mkdir -p /opt/R/arm64 +<pre class="example-preformatted">sudo mkdir -p /opt/R/arm64 sudo chown -R $USER /opt/R </pre></div> -<p>Also, add <samp>/opt/R/arm64/bin</samp> or <samp>/opt/R/x86_64/bin</samp> to your path. +<p>Also, add <samp class="file">/opt/R/arm64/bin</samp> or <samp class="file">/opt/R/x86_64/bin</samp> to your path. </p> <p>Define an appropriate variable in your Terminal: </p><div class="example"> -<pre class="example">set LOCAL=/opt/R/arm64 # Apple Silicon +<pre class="example-preformatted">set LOCAL=/opt/R/arm64 # Apple Silicon set LOCAL=/opt/R/x86_64 # Intel </pre></div> <p>to use the code snippets here. </p> <p>The following are essential to build R: </p> -<ul> -<li> Apple’s ‘Command Line Tools’: these can be (re-)installed by running -<code>xcode-select --install</code> in a terminal. +<ul class="itemize mark-bullet"> +<li>Apple’s ‘Command Line Tools’: these can be (re-)installed by running +<code class="command">xcode-select --install</code> in a terminal. -<p>If you have a fresh OS installation, running e.g. <code>make</code> in a +<p>If you have a fresh OS installation, running e.g. <code class="command">make</code> in a terminal will offer the installation of the command-line tools. If you have installed Xcode, this provides the command-line tools. The tools may need to be reinstalled when macOS is upgraded, as upgrading may partially or completely remove them. </p> <p>The Command Line Tools provide C and C++ compilers derived from LLVM’s -<code>clang</code> but nowadays known as ‘Apple clang’ with different +<code class="command">clang</code> but nowadays known as ‘Apple clang’ with different versioning (so Apple clang 15 is unrelated to LLVM clang 15). </p> -</li><li> A Fortran compiler. See <a href="#Fortran-compilers">Fortran compiler</a>. +</li><li>A Fortran compiler. See <a class="xref" href="#Fortran-compilers">Fortran compiler</a>. -</li><li> Binary components <code>pcre2</code><a id="DOCF77" href="#FOOT77"><sup>77</sup></a> and -<code>xz</code> (for <code>liblzma</code>) from -<a href="https://mac.r-project.org/bin/">https://mac.r-project.org/bin/</a>. There is an R script there to +</li><li>Binary components <code class="code">pcre2</code><a class="footnote" id="DOCF77" href="#FOOT77"><sup>77</sup></a> and +<code class="code">xz</code> (for <code class="code">liblzma</code>) from +<a class="uref" href="https://mac.r-project.org/bin/">https://mac.r-project.org/bin/</a>. There is an R script there to help with installing all the needed components. (At the time of writing -<code>install.libs("r-base-dev")</code> installed neither <code>readline5</code> nor +<code class="code">install.libs("r-base-dev")</code> installed neither <code class="code">readline5</code> nor those needed to support Pango.) -<p>Intel users want the <code>darwin20</code> components: the <code>darwin17</code> +<p>Intel users want the <code class="code">darwin20</code> components: the <code class="code">darwin17</code> ones are for macOS 10.13–10.15. </p> <p>Or this can be done manually, by for example </p><div class="example"> -<pre class="example">curl -OL https://mac.r-project.org/bin/darwin20/arm64/pcre2-10.42-darwin.20-arm64.tar.xz +<pre class="example-preformatted">curl -OL https://mac.r-project.org/bin/darwin20/arm64/pcre2-10.42-darwin.20-arm64.tar.xz sudo tar -xvzf pcre2-10.42-darwin.20-arm64.tar.gz -C / curl -OL https://mac.r-project.org/bin/darwin20/arm64/xz-5.4.2-darwin.20-arm64.tar.xz sudo tar -xvzf xz-5.4.2-darwin.20-arm64.tar.xz -C / </pre></div> -<p>(<code>sudo</code> is not needed if your account owns <samp>/opt/R/arm64</samp> or -<samp>/opt/R/x86_64</samp> as appropriate.) +<p>(<code class="command">sudo</code> is not needed if your account owns <samp class="file">/opt/R/arm64</samp> or +<samp class="file">/opt/R/x86_64</samp> as appropriate.) </p> -<p>Messages like ‘<samp>opt/R/: Can't restore time</samp>’ should be ignored. +<p>Messages like ‘<samp class="samp">opt/R/: Can't restore time</samp>’ should be ignored. </p></li></ul> <p>and desirable -</p><ul> -<li> Component <code>readline5</code>.<a id="DOCF78" href="#FOOT78"><sup>78</sup></a> If <code>readline</code> is -not present, the emulation in Apple’s version of <code>libedit</code> (aka -<code>editline</code>) will be used: if you wish to avoid that, configure with -<samp>--without-readline</samp>. +</p><ul class="itemize mark-bullet"> +<li>Component <code class="code">readline5</code>.<a class="footnote" id="DOCF78" href="#FOOT78"><sup>78</sup></a> If <code class="code">readline</code> is +not present, the emulation in Apple’s version of <code class="code">libedit</code> (aka +<code class="code">editline</code>) will be used: if you wish to avoid that, configure with +<samp class="option">--without-readline</samp>. -</li><li> Components <code>jpeg</code>, <code>libpng</code>, <code>pkgconfig</code>, <code>tiff</code> and -<code>zlib-system-stub</code> from <a href="https://mac.r-project.org/bin//">https://mac.r-project.org/bin//</a> for +</li><li>Components <code class="code">jpeg</code>, <code class="code">libpng</code>, <code class="code">pkgconfig</code>, <code class="code">tiff</code> and +<code class="code">zlib-system-stub</code> from <a class="uref" href="https://mac.r-project.org/bin//">https://mac.r-project.org/bin//</a> for the full range of bitmapped graphics devices. (Some builds of -<code>tiff</code> may require <code>libwebp</code> and/or <code>openjpeg</code>.) +<code class="code">tiff</code> may require <code class="code">libwebp</code> and/or <code class="code">openjpeg</code>.) -</li><li> An X sub-system unless configuring using <samp>--without-x</samp>: see -<a href="https://www.xquartz.org/">https://www.xquartz.org/</a>. R’s <code>configure</code> -script can be told to look for <code>X11</code> in XQuartz’s main -location of <samp>/opt/X11</samp>, e.g. by +</li><li>An X sub-system unless configuring using <samp class="option">--without-x</samp>: see +<a class="uref" href="https://www.xquartz.org/">https://www.xquartz.org/</a>. R’s <code class="command">configure</code> +script can be told to look for <code class="code">X11</code> in XQuartz’s main +location of <samp class="file">/opt/X11</samp>, e.g. by <div class="example"> -<pre class="example">--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib +<pre class="example-preformatted">--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib </pre></div> <p>Be wary of pre-release versions of XQuartz, which may be offered as an update. </p> -</li><li> An Objective-C compiler, as provided by <code>clang</code> in the Command -Line Tools: this is needed for the <code>quartz()</code> graphics device. +</li><li>An Objective-C compiler, as provided by <code class="command">clang</code> in the Command +Line Tools: this is needed for the <code class="code">quartz()</code> graphics device. -<p>Use <samp>--without-aqua</samp> if you want a standard Unix-alike build: -apart from disabling <code>quartz()</code> and the ability to use the build -with <small>R.APP</small>, it also changes the default location of the personal -library (see <code>?.libPaths</code>). +<p>Use <samp class="option">--without-aqua</samp> if you want a standard Unix-alike build: +apart from disabling <code class="code">quartz()</code> and the ability to use the build +with <small class="sc">R.APP</small>, it also changes the default location of the personal +library (see <code class="code">?.libPaths</code>). </p> -</li><li> A Tcl/Tk installation, See <a href="#Tcl_002fTk-headers-and-libraries">Tcl/Tk headers and libraries</a>. +</li><li>A Tcl/Tk installation, See <a class="xref" href="#Tcl_002fTk-headers-and-libraries">Tcl/Tk headers and libraries</a>. -</li><li> Support for Cairo-based graphics devices. See <a href="#Cairo-graphics">Cairo graphics</a>. +</li><li>Support for Cairo-based graphics devices. See <a class="xref" href="#Cairo-graphics">Cairo graphics</a>. -</li><li> A TeX installation. See <a href="#Other-libraries">Other libraries</a>. +</li><li>A TeX installation. See <a class="xref" href="#Other-libraries">Other libraries</a>. -</li><li> <code>texi2any</code> from a ‘<samp>texinfo</samp>’ distribution, which requires -<code>perl</code> (currently a default part of macOS but it has been +</li><li><code class="command">texi2any</code> from a ‘<samp class="samp">texinfo</samp>’ distribution, which requires +<code class="command">perl</code> (currently a default part of macOS but it has been announced that it may not be in future). -A version of <code>texi2any</code> has been included in the binary -distribution of R and there is a <code>texinfo</code> component at -<a href="https://mac.r-project.org/bin/">https://mac.r-project.org/bin/</a>. +A version of <code class="command">texi2any</code> has been included in the binary +distribution of R and there is a <code class="code">texinfo</code> component at +<a class="uref" href="https://mac.r-project.org/bin/">https://mac.r-project.org/bin/</a>. </li></ul> <p>To build R itself from the sources with the C/C++ compilers in the -Command Line Tools (or Xcode) and <code>gfortran</code> from the installer -mentioned below, use a file <samp>config.site</samp> containing +Command Line Tools (or Xcode) and <code class="command">gfortran</code> from the installer +mentioned below, use a file <samp class="file">config.site</samp> containing </p><div class="example"> -<pre class="example">CC=clang +<pre class="example-preformatted">CC=clang OBJC=$CC FC="/opt/gfortran/bin/gfortran -mtune=native" CPPFLAGS='-isystem $LOCAL/include' @@ -5156,72 +5150,72 @@ </pre></div> <p>and configure by something like </p><div class="example"> -<pre class="example">./configure -C \ +<pre class="example-preformatted">./configure -C \ --enable-R-shlib --enable-memory-profiling \ --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib \ --with-tcl-config=$LOCAL/lib/tclConfig.sh \ --with-tk-config=$LOCAL/lib/tkConfig.sh \ PKG_CONFIG_PATH=$LOCAL/lib/pkgconfig:/usr/lib/pkgconfig </pre></div> -<p>(See below for other options for Tcl/Tk.) For an ‘<samp>arm64</samp>’ build -further flags are desirable in <samp>config.site</samp>: +<p>(See below for other options for Tcl/Tk.) For an ‘<samp class="samp">arm64</samp>’ build +further flags are desirable in <samp class="file">config.site</samp>: </p><div class="example"> -<pre class="example">CFLAGS="-falign-functions=8 -g -O2" +<pre class="example-preformatted">CFLAGS="-falign-functions=8 -g -O2" </pre></div> -<p>is needed to inter-work with <code>gfortran</code> without segfaulting in -some packages. Some builds of <code>gfortran</code> have targetted the -current version of macOS (unlike <code>clang</code>), causing linker +<p>is needed to inter-work with <code class="command">gfortran</code> without segfaulting in +some packages. Some builds of <code class="command">gfortran</code> have targetted the +current version of macOS (unlike <code class="command">clang</code>), causing linker warnings: to avoid these use </p><div class="example"> -<pre class="example">FFLAGS="-g -O2 -mmacosx-version-min=11.0" +<pre class="example-preformatted">FFLAGS="-g -O2 -mmacosx-version-min=11.0" FCFLAGS="-g -O2 -mmacosx-version-min=11.0" </pre></div> <p>or perhaps </p><div class="example"> -<pre class="example">FFLAGS="-g -O2 -mmacos-version-min=11.0" +<pre class="example-preformatted">FFLAGS="-g -O2 -mmacos-version-min=11.0" FCFLAGS="-g -O2 -mmacos-version-min=11.0" </pre></div> -<p>where <code>11.0</code> can be replaced by <code>12.0</code>, <code>13.0</code> or -<code>14.0</code> for macOS 12.x, 13.x and 14.x. +<p>where <code class="code">11.0</code> can be replaced by <code class="code">12.0</code>, <code class="code">13.0</code> or +<code class="code">14.0</code> for macOS 12.x, 13.x and 14.x. </p> <p>To install packages using compiled code one needs the Command Line Tools (or Xcode) and appropriate compilers, e.g. the C/C++ compilers from -those tools and/or <code>gfortran</code>. Some packages have further -requirements such as component <code>pkgconfig</code> (and to set -<code>PKG_CONFIG_PATH=</code> as above). +those tools and/or <code class="command">gfortran</code>. Some packages have further +requirements such as component <code class="command">pkgconfig</code> (and to set +<code class="env">PKG_CONFIG_PATH=</code> as above). </p> <p>A subversion client can be obtained from -<a href="https://mac.r-project.org/tools/">https://mac.r-project.org/tools/</a>, for example by (Apple Silicon) +<a class="uref" href="https://mac.r-project.org/tools/">https://mac.r-project.org/tools/</a>, for example by (Apple Silicon) </p><div class="example"> -<pre class="example">curl -OL https://mac.r-project.org/tools/subversion-1.14.1-darwin.20-arm64.tar.gz +<pre class="example-preformatted">curl -OL https://mac.r-project.org/tools/subversion-1.14.1-darwin.20-arm64.tar.gz tar xf subversion-1.14.1-darwin.20-arm64.tar.gz sudo cp subversion-1.14.1-darwin-20-arm64/svn $LOCAL/bin </pre></div> <p>or (Intel) </p><div class="example"> -<pre class="example">curl -OL https://mac.r-project.org/tools/subversion-1.14.0-darwin15.6.tar.gz +<pre class="example-preformatted">curl -OL https://mac.r-project.org/tools/subversion-1.14.0-darwin15.6.tar.gz tar xf subversion-1.14.0-darwin15.6.tar.gz sudo cp subversion-1.14.0-darwin15.6/svn $LOCAL/bin </pre></div> -<p>If building software or installing source packages with <code>cmake</code> -(or a non-Apple <code>make</code>) for ‘Apple Silicon’ ensure it contains -the ‘<samp>arm64</samp>’ architecture (use <code>file</code> to be sure). -Running Apple compilers from an ‘<samp>x86_64</samp>’ executable will -generate ‘<samp>x86_64</samp>’ code …. +<p>If building software or installing source packages with <code class="command">cmake</code> +(or a non-Apple <code class="command">make</code>) for ‘Apple Silicon’ ensure it contains +the ‘<samp class="samp">arm64</samp>’ architecture (use <code class="command">file</code> to be sure). +Running Apple compilers from an ‘<samp class="samp">x86_64</samp>’ executable will +generate ‘<samp class="samp">x86_64</samp>’ code …. </p> -<p>Updating an ‘<samp>arm64</samp>’ build may fail because of the bug described -at <a href="https://openradar.appspot.com/FB8914243">https://openradar.appspot.com/FB8914243</a> but <em>ab initio</em> +<p>Updating an ‘<samp class="samp">arm64</samp>’ build may fail because of the bug described +at <a class="uref" href="https://openradar.appspot.com/FB8914243">https://openradar.appspot.com/FB8914243</a> but <em class="emph">ab initio</em> builds work. This has been far rarer since macOS 13. </p> -<p>If you are using the macOS 13 <abbr>SDK</abbr><a id="DOCF79" href="#FOOT79"><sup>79</sup></a>, -you may need to add something like <code>-mmacos-version-min=12.0</code> to -‘<samp>CFLAGS</samp>’. +<p>If you are using the macOS 13 <abbr class="abbr">SDK</abbr><a class="footnote" id="DOCF79" href="#FOOT79"><sup>79</sup></a>, +you may need to add something like <code class="code">-mmacos-version-min=12.0</code> to +‘<samp class="samp">CFLAGS</samp>’. </p> <p>Linker warnings like </p><div class="example"> -<pre class="example">ld: warning: could not create compact unwind for _sort_: +<pre class="example-preformatted">ld: warning: could not create compact unwind for _sort_: register 26 saved somewhere other than in frame ld: warning: ld: warning: could not create compact unwind for _arcoef_: registers 23 and 24 not saved contiguously in frame @@ -5232,86 +5226,86 @@ run-time libraries. </p> <p>The default security settings can make it difficult to install Apple -packages which have not been ‘notarized’<a id="DOCF80" href="#FOOT80"><sup>80</sup></a> +packages which have not been ‘notarized’<a class="footnote" id="DOCF80" href="#FOOT80"><sup>80</sup></a> by Apple. And not just packages, as this has been seen for executables -contained in tarballs/zipfiles (for example, for <code>pandoc</code>). -Usually one can use ‘<samp>Open With</samp>’ (Control/right/two-finger-click in -Finder), then select ‘<samp>Installer</samp>’ and ‘<samp>Open</samp>’ if you get a +contained in tarballs/zipfiles (for example, for <code class="command">pandoc</code>). +Usually one can use ‘<samp class="samp">Open With</samp>’ (Control/right/two-finger-click in +Finder), then select ‘<samp class="samp">Installer</samp>’ and ‘<samp class="samp">Open</samp>’ if you get a further warning message. </p> <p>If you run into problems with ‘quarantine’ for tarballs downloaded in a -browser, consider using <code>curl -OL</code> to download (as illustrated -above) or <code>xattr -c</code> to remove extended attributes. +browser, consider using <code class="command">curl -OL</code> to download (as illustrated +above) or <code class="command">xattr -c</code> to remove extended attributes. </p> -<p><code>configure</code> defaults to <samp>--with-internal-tzcode</samp> on +<p><code class="command">configure</code> defaults to <samp class="option">--with-internal-tzcode</samp> on macOS. The native implementation used to be unusable on earlier -versions (with a 32-bit <code>time_t</code> and/or timezone tables missing +versions (with a 32-bit <code class="code">time_t</code> and/or timezone tables missing information beyond the 32-bit range). As from macOS 12.6, option -<samp>--without-internal-tzcode</samp> can be used to override this and R +<samp class="option">--without-internal-tzcode</samp> can be used to override this and R contains sufficient workarounds (for example, the native code fails to -recognize dates with a negative <code>tm_year</code>, that is dates before +recognize dates with a negative <code class="code">tm_year</code>, that is dates before 1900) for R to pass its checks. However, there are discrepancies, notably in Europe in the 1900s and 1940s, even though the Olson database contains the correct information. </p> <hr> </div> -<div class="subsection" id="Fortran-compilers"> -<span id="Fortran-compiler"></span><h4 class="subsection">C.3.2 Fortran compiler</h4> +<div class="subsection-level-extent" id="Fortran-compilers"> +<h4 class="subsection" id="Fortran-compiler"><span>C.3.2 Fortran compiler<a class="copiable-link" href="#Fortran-compiler"> ¶</a></span></h4> -<p>There is a ‘universal’ (<code>arm64</code> and Intel) build of -<code>gfortran</code> 12.2 at -<a href="https://mac.r-project.org/tools/gfortran-12.2-universal.pkg">https://mac.r-project.org/tools/gfortran-12.2-universal.pkg</a>. -This installs into <samp>/opt/gfortran</samp>. -</p> -<p>The <samp>/opt/gfortran/SDK</samp> symlink should point to the desired path to -the <abbr>SDK</abbr> (defaults to the command line tools <abbr>SDK</abbr>). This can be updated by -running <samp>/opt/gfortran/bin/gfortran-update-sdk</samp> or manually. If the -symlink is broken, the driver will issue a warning and use <code>xcrun --show-sdk-path</code> to try to find an <abbr>SDK</abbr> and use its path. (The <abbr>SDK</abbr> path -is used when using <code>gfortran</code> to link, so not when building R +<p>There is a ‘universal’ (<code class="code">arm64</code> and Intel) build of +<code class="command">gfortran</code> 12.2 at +<a class="uref" href="https://mac.r-project.org/tools/gfortran-12.2-universal.pkg">https://mac.r-project.org/tools/gfortran-12.2-universal.pkg</a>. +This installs into <samp class="file">/opt/gfortran</samp>. +</p> +<p>The <samp class="file">/opt/gfortran/SDK</samp> symlink should point to the desired path to +the <abbr class="abbr">SDK</abbr> (defaults to the command line tools <abbr class="abbr">SDK</abbr>). This can be updated by +running <samp class="file">/opt/gfortran/bin/gfortran-update-sdk</samp> or manually. If the +symlink is broken, the driver will issue a warning and use <code class="code">xcrun +-show-sdk-path</code> to try to find an <abbr class="abbr">SDK</abbr> and use its path. (The <abbr class="abbr">SDK</abbr> path +is used when using <code class="command">gfortran</code> to link, so not when building R but when installing a few packages.) </p> -<p>Builds of <code>gfortran</code> 13.2 and 14.1 for <code>arm64</code> macOS 14 are +<p>Builds of <code class="command">gfortran</code> 13.2 and 14.1 for <code class="code">arm64</code> macOS 14 are available at -<a href="https://github.com/fxcoudert/gfortran-for-macOS/releases">https://github.com/fxcoudert/gfortran-for-macOS/releases</a>. These +<a class="uref" href="https://github.com/fxcoudert/gfortran-for-macOS/releases">https://github.com/fxcoudert/gfortran-for-macOS/releases</a>. These can be built for Intel and older OSes from the sources at -<a href="https://github.com/iains/gcc-13-branch/">https://github.com/iains/gcc-13-branch/</a> and -<code>gcc-14-branch/</code>. To use one of the pre-built compilers with Apple -<code>clang</code> needs something like +<a class="uref" href="https://github.com/iains/gcc-13-branch/">https://github.com/iains/gcc-13-branch/</a> and +<code class="code">gcc-14-branch/</code>. To use one of the pre-built compilers with Apple +<code class="command">clang</code> needs something like </p><div class="example"> -<pre class="example">LDFLAGS="-L/opt/R/arm64/lib -rpath /usr/local/gfortran/lib" +<pre class="example-preformatted">LDFLAGS="-L/opt/R/arm64/lib -rpath /usr/local/gfortran/lib" </pre></div> -<p>in <samp>config.site</samp> to ensure the Fortran run-time libraries are +<p>in <samp class="file">config.site</samp> to ensure the Fortran run-time libraries are found. </p> <hr> </div> -<div class="subsection" id="Cairo-graphics"> -<span id="Cairo-graphics-1"></span><h4 class="subsection">C.3.3 Cairo graphics</h4> +<div class="subsection-level-extent" id="Cairo-graphics"> +<h4 class="subsection" id="Cairo-graphics-1"><span>C.3.3 Cairo graphics<a class="copiable-link" href="#Cairo-graphics-1"> ¶</a></span></h4> -<span id="index-Cairo-3"></span> -<p>Cairo-based graphics devices such as <code>cairo_ps</code>, <code>cairo_pdf</code>, -<code>X11(type = "cairo")</code> and the Cairo-based types of devices -<code>bmp</code> <code>jpeg</code>, <code>png</code> and <code>tiff</code> are not the default +<a class="index-entry-id" id="index-Cairo-3"></a> +<p>Cairo-based graphics devices such as <code class="code">cairo_ps</code>, <code class="code">cairo_pdf</code>, +<code class="code">X11(type = "cairo")</code> and the Cairo-based types of devices +<code class="code">bmp</code> <code class="code">jpeg</code>, <code class="code">png</code> and <code class="code">tiff</code> are not the default on macOS, and much less used than the Quartz-based devices. However, -the only SVG device in the R distribution, <code>svg</code>, is based on +the only SVG device in the R distribution, <code class="code">svg</code>, is based on Cairo. </p> <p>Support for Cairo is optional and can be added in several ways, all of -which need <code>pkg-config</code>. <code>configure</code> will add Cairo support -if <code>pkg-config</code> finds package <code>cairo</code> unless -<code>--without-cairo</code> is used. +which need <code class="code">pkg-config</code>. <code class="command">configure</code> will add Cairo support +if <code class="code">pkg-config</code> finds package <code class="code">cairo</code> unless +<code class="code">--without-cairo</code> is used. </p> <p>A way to statically link Cairo is by downloading and unpacking -components <code>cairo</code>, <code>fontconfig</code>, <code>freetype</code>, -<code>pixman</code> and <code>zlib-system-stub</code> (and do not have -<samp>/opt/X11/lib/pkgconfig</samp> in <code>PKG_CONFIG_PATH</code>). Some static -builds of <code>fontconfig</code> need <code>libxml2</code> (from component -<code>xml2</code>) and others <code>expat</code>, supplied by macOS but needing a -file <samp>$LOCAL/lib/pkgconfig/expat.pc</samp> along the lines of +components <code class="code">cairo</code>, <code class="code">fontconfig</code>, <code class="code">freetype</code>, +<code class="code">pixman</code> and <code class="code">zlib-system-stub</code> (and do not have +<samp class="file">/opt/X11/lib/pkgconfig</samp> in <code class="env">PKG_CONFIG_PATH</code>). Some static +builds of <code class="code">fontconfig</code> need <code class="code">libxml2</code> (from component +<code class="code">xml2</code>) and others <code class="code">expat</code>, supplied by macOS but needing a +file <samp class="file">$LOCAL/lib/pkgconfig/expat.pc</samp> along the lines of </p><div class="example"> -<pre class="example">Name: expat +<pre class="example-preformatted">Name: expat Version: 2.2.8 Description: expat XML parser URL: http://www.libexpat.org @@ -5319,40 +5313,40 @@ Cflags: </pre></div> <p>Note that the list of components is liable to change: running -<code>pkg-config cairo --exists --print-errors</code> should tell you if +<code class="command">pkg-config cairo --exists --print-errors</code> should tell you if any others are required. </p> -<span id="index-Pango-1"></span> +<a class="index-entry-id" id="index-Pango-1"></a> <p>The best font experience of Cairo graphics will be to use it in combination with Pango which will match that supported on most other -Unix-alikes. <code>configure</code> uses <code>pkg-config</code> to determine +Unix-alikes. <code class="command">configure</code> uses <code class="command">pkg-config</code> to determine if all the external software required by both Pango and Cairo is -available: running <code>pkg-config pangocairo --exists +available: running <code class="command">pkg-config pangocairo --exists --print-errors</code> should show if the installation suffices and if not, what is missing. At the time of writing using pre-built components -<code>cairo</code>, <code>fontconfig</code>, <code>freetype</code>, <code>ffi</code>, -<code>fribidi</code>, <code>gettext</code>, <code>icu</code>, <code>glib</code>, -<code>harfbuzz</code>, <code>pango</code>, <code>pcre</code>, <code>pixman</code> and -<code>xml2</code> sufficed. +<code class="code">cairo</code>, <code class="code">fontconfig</code>, <code class="code">freetype</code>, <code class="code">ffi</code>, +<code class="code">fribidi</code>, <code class="code">gettext</code>, <code class="code">icu</code>, <code class="code">glib</code>, +<code class="code">harfbuzz</code>, <code class="code">pango</code>, <code class="code">pcre</code>, <code class="code">pixman</code> and +<code class="code">xml2</code> sufficed. </p> <hr> </div> -<div class="subsection" id="Other-C_002fC_002b_002b-compilers"> -<span id="Other-C_002fC_002b_002b-compilers-1"></span><h4 class="subsection">C.3.4 Other C/C++ compilers</h4> +<div class="subsection-level-extent" id="Other-C_002fC_002b_002b-compilers"> +<h4 class="subsection" id="Other-C_002fC_002b_002b-compilers-1"><span>C.3.4 Other C/C++ compilers<a class="copiable-link" href="#Other-C_002fC_002b_002b-compilers-1"> ¶</a></span></h4> -<p>Other pre-compiled distributions of <code>clang</code> may be available -from <a href="https://github.com/llvm/llvm-project/releases/">https://github.com/llvm/llvm-project/releases/</a> (recently -only for <code>arm64</code> and usually unsigned/not notarized which makes +<p>Other pre-compiled distributions of <code class="command">clang</code> may be available +from <a class="uref" href="https://github.com/llvm/llvm-project/releases/">https://github.com/llvm/llvm-project/releases/</a> (recently +only for <code class="code">arm64</code> and usually unsigned/not notarized which makes them hard to use). In particular, these include support for -<abbr>OpenMP</abbr> which Apple <code>clang</code> does not. Some of these have -included support for the <abbr>ASan</abbr> and <abbr>UBSan</abbr> sanitizers. +<abbr class="abbr">OpenMP</abbr> which Apple <code class="command">clang</code> does not. Some of these have +included support for the <abbr class="abbr">ASan</abbr> and <abbr class="abbr">UBSan</abbr> sanitizers. </p> <p>Suppose one of these distributions is installed under -<samp>$LOCAL/llvm</samp>. Use a file <samp>config.site</samp> containing +<samp class="file">$LOCAL/llvm</samp>. Use a file <samp class="file">config.site</samp> containing </p><div class="example"> -<pre class="example">SDK=`xcrun -show-sdk-path` +<pre class="example-preformatted">SDK=`xcrun -show-sdk-path` CC="$LOCAL/llvm/bin/clang -isysroot $SDK" CXX="$LOCAL/llvm/bin/clang++ -isysroot $SDK" OBJC=$CC @@ -5361,25 +5355,25 @@ R_LD_LIBRARY_PATH=$LOCAL/llvm/lib:$LOCAL/lib </pre></div> -<p>The care to specify library paths is to ensure that the <abbr>OpenMP</abbr> runtime -library, here <samp>$LOCAL/llvm/lib/libomp.dylib</samp>, is found when needed. +<p>The care to specify library paths is to ensure that the <abbr class="abbr">OpenMP</abbr> runtime +library, here <samp class="file">$LOCAL/llvm/lib/libomp.dylib</samp>, is found when needed. If this works, you should see the line </p><div class="example"> -<pre class="example">checking whether OpenMP SIMD reduction is supported... yes +<pre class="example-preformatted">checking whether OpenMP SIMD reduction is supported... yes </pre></div> -<p>in the <code>configure</code> output. Also, ‘<samp>R_LD_LIBRARY_PATH</samp>’ needs +<p>in the <code class="command">configure</code> output. Also, ‘<samp class="samp">R_LD_LIBRARY_PATH</samp>’ needs to be set to find the latest version of the C++ run-time libraries rather than the system ones. </p> <p>It is normally possible to build R with GCC (built from the sources, -from a <code>gfortran</code> distribution, from Homebrew, …). -When last tested it was not possible to use <code>gcc</code> to build the -<code>quartz()</code> device, so <code>configure --without-aqua</code> may be +from a <code class="command">gfortran</code> distribution, from Homebrew, …). +When last tested it was not possible to use <code class="command">gcc</code> to build the +<code class="code">quartz()</code> device, so <code class="command">configure --without-aqua</code> may be required. R was built and tested with the GCC 14.1 compilers in the -<code>arm64</code> <code>gfortran</code> distribution mentioned above using a -<samp>config.site</samp> containing +<code class="code">arm64</code> <code class="command">gfortran</code> distribution mentioned above using a +<samp class="file">config.site</samp> containing </p><div class="example"> -<pre class="example">CC=/usr/local/gfortran/bin/gcc +<pre class="example-preformatted">CC=/usr/local/gfortran/bin/gcc CXX=/usr/local/gfortran/bin/g++ FC=/usr/local/gfortran/bin/gfortran CFLAGS="-g -O2 -Wall -pedantic -Wstrict-prototypes" @@ -5391,126 +5385,126 @@ LDFLAGS=-L/opt/R/arm64/lib </pre></div> -<p>It is usually possible to add some <abbr>OpenMP</abbr> support to the Apple -<code>clang</code> compilers: see <a href="https://mac.r-project.org/openmp/">https://mac.r-project.org/openmp/</a>. +<p>It is usually possible to add some <abbr class="abbr">OpenMP</abbr> support to the Apple +<code class="command">clang</code> compilers: see <a class="uref" href="https://mac.r-project.org/openmp/">https://mac.r-project.org/openmp/</a>. Note that that approach is somewhat fragile as it needs a -<samp>libomp.dylib</samp> library matching the version of the compiler +<samp class="file">libomp.dylib</samp> library matching the version of the compiler used—and for example at the time of writing none was offered for the current compilers in Xcode CLT 14.3 nor 15. </p> <hr> </div> -<div class="subsection" id="Other-libraries"> -<span id="Other-libraries-1"></span><h4 class="subsection">C.3.5 Other libraries</h4> +<div class="subsection-level-extent" id="Other-libraries"> +<h4 class="subsection" id="Other-libraries-1"><span>C.3.5 Other libraries<a class="copiable-link" href="#Other-libraries-1"> ¶</a></span></h4> -<p>Pre-compiled versions of many of the <a href="#Useful-libraries-and-programs">Useful libraries and programs</a> -are available from <a href="https://mac.r-project.org/bin//">https://mac.r-project.org/bin//</a>. +<p>Pre-compiled versions of many of the <a class="ref" href="#Useful-libraries-and-programs">Useful libraries and programs</a> +are available from <a class="uref" href="https://mac.r-project.org/bin//">https://mac.r-project.org/bin//</a>. </p> <p>Looking at the top of -<samp>/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp> +<samp class="file">/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp> will show the compilers and configuration options used for the -<acronym>CRAN</acronym> binary package for R: at the time of writing the +<abbr class="acronym">CRAN</abbr> binary package for R: at the time of writing the non-default options </p><div class="example"> -<pre class="example">--enable-memory-profiling --enable-R-framework +<pre class="example-preformatted">--enable-memory-profiling --enable-R-framework --x-libraries=/opt/X11/lib --x-includes=/opt/X11/include </pre></div> -<p>were used. (<samp>--enable-R-framework</samp> implies <samp>--enable-R-shlib</samp>.) +<p>were used. (<samp class="option">--enable-R-framework</samp> implies <samp class="option">--enable-R-shlib</samp>.) </p> <p>The main TeX implementation used by the developers is -MacTeX<a id="DOCF81" href="#FOOT81"><sup>81</sup></a> -(<a href="https://www.tug.org/mactex/">https://www.tug.org/mactex/</a>): the full installation is about +MacTeX<a class="footnote" id="DOCF81" href="#FOOT81"><sup>81</sup></a> +(<a class="uref" href="https://www.tug.org/mactex/">https://www.tug.org/mactex/</a>): the full installation is about 8.5GB, but a much smaller version (‘Basic TeX’) is available at -<a href="https://www.tug.org/mactex/morepackages.html">https://www.tug.org/mactex/morepackages.html</a> to which you will +<a class="uref" href="https://www.tug.org/mactex/morepackages.html">https://www.tug.org/mactex/morepackages.html</a> to which you will need to add some packages to build R, e.g. for the 2022 version we -needed to add<a id="DOCF82" href="#FOOT82"><sup>82</sup></a> <strong>helvetic</strong>, <strong>inconsolata</strong> and -<strong>texinfo</strong> which brought this to about 310MB.<a id="DOCF83" href="#FOOT83"><sup>83</sup></a> -‘<samp>TeX Live Utility</samp>’ (available <em>via</em> the MacTeX front page) +needed to add<a class="footnote" id="DOCF82" href="#FOOT82"><sup>82</sup></a> <strong class="strong">helvetic</strong>, <strong class="strong">inconsolata</strong> and +<strong class="strong">texinfo</strong> which brought this to about 310MB.<a class="footnote" id="DOCF83" href="#FOOT83"><sup>83</sup></a> +‘<samp class="samp">TeX Live Utility</samp>’ (available <em class="emph">via</em> the MacTeX front page) provides a graphical means to manage TeX packages. These contain -executables which run natively on both ‘<samp>arm64</samp>’ and -‘<samp>x86_64</samp>’. +executables which run natively on both ‘<samp class="samp">arm64</samp>’ and +‘<samp class="samp">x86_64</samp>’. </p> <p>Checking packages thoroughly requires Ghostscript (part of the full MacTeX distribution or separately from -<a href="https://www.tug.org/mactex/morepackages.html">https://www.tug.org/mactex/morepackages.html</a>) and <code>qpdf</code> -(from <a href="https://mac.r-project.org/bin//">https://mac.r-project.org/bin//</a>, a version of which is in -the <samp>bin</samp> directory of a binary installation of R, usually -<samp>/Library/Frameworks/R.framework/Resources/bin/qpdf</samp>). +<a class="uref" href="https://www.tug.org/mactex/morepackages.html">https://www.tug.org/mactex/morepackages.html</a>) and <code class="command">qpdf</code> +(from <a class="uref" href="https://mac.r-project.org/bin//">https://mac.r-project.org/bin//</a>, a version of which is in +the <samp class="file">bin</samp> directory of a binary installation of R, usually +<samp class="file">/Library/Frameworks/R.framework/Resources/bin/qpdf</samp>). </p> -<p><code>R CMD check --as-cran</code> makes use of ‘HTML Tidy’. macOS at the -time of writing has a version in <samp>/usr/bin/tidy</samp> dating from 2006 +<p><code class="command">R CMD check --as-cran</code> makes use of ‘HTML Tidy’. macOS at the +time of writing has a version in <samp class="file">/usr/bin/tidy</samp> dating from 2006 which is far too old. Up-to-date versions can be -installed from <a href="http://binaries.html-tidy.org/">http://binaries.html-tidy.org/</a>. +installed from <a class="uref" href="http://binaries.html-tidy.org/">http://binaries.html-tidy.org/</a>. </p> -<p>One macOS quirk is that the default path has <samp>/usr/local/bin</samp> after -<samp>/usr/bin</samp>, contrary to common practice on Unix-alikes. This means +<p>One macOS quirk is that the default path has <samp class="file">/usr/local/bin</samp> after +<samp class="file">/usr/bin</samp>, contrary to common practice on Unix-alikes. This means that if you install tools from the sources they will by default be -installed under <samp>/usr/local</samp> and not supersede the system +installed under <samp class="file">/usr/local</samp> and not supersede the system versions. </p> <p>Parallel installation of packages will make use of the utility -<code>timeout</code> if available. A ‘universal’ build can be -downloaded from <a href="https://www.stats.ox.ac.uk/pub/bdr/timeout">https://www.stats.ox.ac.uk/pub/bdr/timeout</a>: make -it executable (<code>chmod 755 timeout</code>) and put it somewhere on your +<code class="command">timeout</code> if available. A ‘universal’ build can be +downloaded from <a class="uref" href="https://www.stats.ox.ac.uk/pub/bdr/timeout">https://www.stats.ox.ac.uk/pub/bdr/timeout</a>: make +it executable (<code class="code">chmod 755 timeout</code>) and put it somewhere on your path. </p> <hr> -<div class="subsubsection" id="Accelerate"> -<span id="Accelerate-1"></span><h4 class="subsubsection">C.3.5.1 Accelerate</h4> +<div class="subsubsection-level-extent" id="Accelerate"> +<h4 class="subsubsection" id="Accelerate-1"><span>C.3.5.1 Accelerate<a class="copiable-link" href="#Accelerate-1"> ¶</a></span></h4> -<span id="index-BLAS-library-1"></span> -<span id="index-LAPACK-library-1"></span> -<p>The <code>Accelerate</code> -library<a id="DOCF84" href="#FOOT84"><sup>84</sup></a> -can be used <em>via</em> the configuration option -</p> -<div class="example"> -<pre class="example">--with-blas="-framework Accelerate" -</pre></div> - -<p>to provide potentially higher-performance versions of the <acronym>BLAS</acronym> -and LAPACK routines.<a id="DOCF85" href="#FOOT85"><sup>85</sup></a> -This includes a full LAPACK which can be used <em>via</em> -<samp>--with-lapack</samp>: however, the version of LAPACK it contains has -often been seriously old (and is not used unless <samp>--with-lapack</samp> -is specified). Some <acronym>CRAN</acronym> builds of R can be -switched<a id="DOCF86" href="#FOOT86"><sup>86</sup></a> +<a class="index-entry-id" id="index-BLAS-library-1"></a> +<a class="index-entry-id" id="index-LAPACK-library-1"></a> +<p>The <code class="code">Accelerate</code> +library<a class="footnote" id="DOCF84" href="#FOOT84"><sup>84</sup></a> +can be used <em class="emph">via</em> the configuration option +</p> +<div class="example"> +<pre class="example-preformatted">--with-blas="-framework Accelerate" +</pre></div> + +<p>to provide potentially higher-performance versions of the <abbr class="acronym">BLAS</abbr> +and LAPACK routines.<a class="footnote" id="DOCF85" href="#FOOT85"><sup>85</sup></a> +This includes a full LAPACK which can be used <em class="emph">via</em> +<samp class="option">--with-lapack</samp>: however, the version of LAPACK it contains has +often been seriously old (and is not used unless <samp class="option">--with-lapack</samp> +is specified). Some <abbr class="acronym">CRAN</abbr> builds of R can be +switched<a class="footnote" id="DOCF86" href="#FOOT86"><sup>86</sup></a> to use Accelerate’s BLAS. </p> <p>As from macOS 13.3, the BLAS and LAPACK libraries under the Accelerate framework are ‘now inline with reference version -3.9.1’.<a id="DOCF87" href="#FOOT87"><sup>87</sup></a> However, this has been done by -naming new entry points and so only accessible <em>via</em> their C -headers. That version can be used for BLAS calls <em>via</em> -<code>configure</code> option <samp>--with-newAccelerate</samp>: it requires at -least macOS 13.3 and <abbr>SDK</abbr> 13.3 (from Xcode CLT 14.3). To use it for both +3.9.1’.<a class="footnote" id="DOCF87" href="#FOOT87"><sup>87</sup></a> However, this has been done by +naming new entry points and so only accessible <em class="emph">via</em> their C +headers. That version can be used for BLAS calls <em class="emph">via</em> +<code class="command">configure</code> option <samp class="option">--with-newAccelerate</samp>: it requires at +least macOS 13.3 and <abbr class="abbr">SDK</abbr> 13.3 (from Xcode CLT 14.3). To use it for both BLAS and LAPACK calls, configure with -<samp>--with-newAccelerate=lapack</samp>. These options cannot be used with -others such as <samp>--with-blas</samp> and <samp>--with-lapack</samp>. +<samp class="option">--with-newAccelerate=lapack</samp>. These options cannot be used with +others such as <samp class="option">--with-blas</samp> and <samp class="option">--with-lapack</samp>. </p> <p>Threading in Accelerate is controlled by ‘Grand Central -Dispatch’<a id="DOCF88" href="#FOOT88"><sup>88</sup></a> and is -said not to need user control. Test <samp>nls.R</samp> in package <strong>stats</strong> +Dispatch’<a class="footnote" id="DOCF88" href="#FOOT88"><sup>88</sup></a> and is +said not to need user control. Test <samp class="file">nls.R</samp> in package <strong class="strong">stats</strong> has often failed with the Accelerate BLAS on Intel macOS. All versions of Accelerate show differences from the reference BLAS (and most others) -in the use of <code>NA</code> <em>vs</em> <code>NaN</code> and a substantial number of +in the use of <code class="code">NA</code> <em class="emph">vs</em> <code class="code">NaN</code> and a substantial number of R packages fail their checks. </p> <hr> </div> -<div class="subsubsection" id="OpenBLAS-_0028macOS_0029"> -<span id="OpenBLAS"></span><h4 class="subsubsection">C.3.5.2 OpenBLAS</h4> +<div class="subsubsection-level-extent" id="OpenBLAS-_0028macOS_0029"> +<h4 class="subsubsection" id="OpenBLAS"><span>C.3.5.2 OpenBLAS<a class="copiable-link" href="#OpenBLAS"> ¶</a></span></h4> -<p>R has been built on ‘<samp>arm64</samp>’ using OpenBLAS 0.3.24 (sources -from <a href="https://github.com/OpenMathLib/OpenBLAS/releases">https://github.com/OpenMathLib/OpenBLAS/releases</a>) by -symlinking <samp>/opt/OpenBLAS/lib/libopenblas.dylib</samp> to -<samp>lib/libRblas.dylib</samp> (see <a href="#Shared-BLAS">Shared BLAS</a>). -</p> -<p>On macOS, a default build of OpenBLAS uses <code>pthreads</code> (as macOS -does not have <abbr>OpenMP</abbr>) with the number of threads controlled by -environment variable <code>OPENBLAS_NUM_THREADS</code>. On an M1 Pro this +<p>R has been built on ‘<samp class="samp">arm64</samp>’ using OpenBLAS 0.3.24 (sources +from <a class="uref" href="https://github.com/OpenMathLib/OpenBLAS/releases">https://github.com/OpenMathLib/OpenBLAS/releases</a>) by +symlinking <samp class="file">/opt/OpenBLAS/lib/libopenblas.dylib</samp> to +<samp class="file">lib/libRblas.dylib</samp> (see <a class="ref" href="#Shared-BLAS">Shared BLAS</a>). +</p> +<p>On macOS, a default build of OpenBLAS uses <code class="code">pthreads</code> (as macOS +does not have <abbr class="abbr">OpenMP</abbr>) with the number of threads controlled by +environment variable <code class="env">OPENBLAS_NUM_THREADS</code>. On an M1 Pro this defaulted to 10 threads (there are 8 ‘performance’ cores and 2 ‘efficiency cores‘) and we saw a 9x speedup over the reference BLAS on a large SVD (which was slightly faster than Accelerate). @@ -5518,319 +5512,319 @@ <hr> </div> </div> -<div class="subsection" id="Tcl_002fTk-headers-and-libraries"> -<span id="Tcl_002fTk-headers-and-libraries-1"></span><h4 class="subsection">C.3.6 Tcl/Tk headers and libraries</h4> +<div class="subsection-level-extent" id="Tcl_002fTk-headers-and-libraries"> +<h4 class="subsection" id="Tcl_002fTk-headers-and-libraries-1"><span>C.3.6 Tcl/Tk headers and libraries<a class="copiable-link" href="#Tcl_002fTk-headers-and-libraries-1"> ¶</a></span></h4> -<p>If you plan to use the <code>tcltk</code> package for R, you will need to +<p>If you plan to use the <code class="code">tcltk</code> package for R, you will need to install a distribution of Tcl/Tk. There are two alternatives. If you -use <small>R.APP</small> you will want to use X11-based Tcl/Tk (as used on other -Unix-alikes), which is installed under <samp>$LOCAL/lib</samp> as part of the <acronym>CRAN</acronym> binary for -R.<a id="DOCF89" href="#FOOT89"><sup>89</sup></a> This may need <code>configure</code> +use <small class="sc">R.APP</small> you will want to use X11-based Tcl/Tk (as used on other +Unix-alikes), which is installed under <samp class="file">$LOCAL/lib</samp> as part of the <abbr class="acronym">CRAN</abbr> binary for +R.<a class="footnote" id="DOCF89" href="#FOOT89"><sup>89</sup></a> This may need <code class="command">configure</code> options </p><div class="example"> -<pre class="example">--with-tcltk=$LOCAL/lib +<pre class="example-preformatted">--with-tcltk=$LOCAL/lib </pre></div> <p>or </p><div class="example"> -<pre class="example">--with-tcl-config=$LOCAL/lib/tclConfig.sh +<pre class="example-preformatted">--with-tcl-config=$LOCAL/lib/tclConfig.sh --with-tk-config=$LOCAL/lib/tkConfig.sh </pre></div> <p>Note that this requires a matching XQuartz installation. </p> <p>There is also a native (‘Aqua’) version of Tcl/Tk which produces widgets -in the native macOS style: this will not work with <small>R.APP</small> because of +in the native macOS style: this will not work with <small class="sc">R.APP</small> because of conflicts over the macOS menu, but for those only using command-line R this provides a much more intuitive interface to Tk for experienced Mac users. Earlier versions of macOS came with an Aqua Tcl/Tk distribution but these were often not at all recent versions of Tcl/Tk. -It is better to install Tcl/Tk 8.6.x from the sources<a id="DOCF90" href="#FOOT90"><sup>90</sup></a> or a binary distribution from -<a href="https://www.activestate.com/products/tcl/">https://www.activestate.com/products/tcl/</a>. For the latter, +It is better to install Tcl/Tk 8.6.x from the sources<a class="footnote" id="DOCF90" href="#FOOT90"><sup>90</sup></a> or a binary distribution from +<a class="uref" href="https://www.activestate.com/products/tcl/">https://www.activestate.com/products/tcl/</a>. For the latter, configure R with </p><div class="example"> -<pre class="example">--with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh +<pre class="example-preformatted">--with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh --with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh </pre></div> <p>If you need to find out which distribution of Tk is in use at run time, use </p><div class="example"> -<pre class="example">library(tcltk) +<pre class="example-preformatted">library(tcltk) tclvalue(.Tcl("tk windowingsystem")) # "x11" or "aqua" </pre></div> <p>Note that some Tcl/Tk extensions only support the X11 interface: this -includes <code>Tktable</code> and the <acronym>CRAN</acronym> package -<a href="https://CRAN.R-project.org/package=tkrplot"><strong>tkrplot</strong></a>. +includes <code class="code">Tktable</code> and the <abbr class="acronym">CRAN</abbr> package +<a class="url" href="https://CRAN.R-project.org/package=tkrplot"><strong class="strong">tkrplot</strong></a>. </p> <hr> </div> -<div class="subsection" id="Java-_0028macOS_0029"> -<span id="Java"></span><h4 class="subsection">C.3.7 Java</h4> +<div class="subsection-level-extent" id="Java-_0028macOS_0029"> +<h4 class="subsection" id="Java"><span>C.3.7 Java<a class="copiable-link" href="#Java"> ¶</a></span></h4> -<p>macOS does not comes with an installed Java runtime (<abbr>JRE</abbr>) and a +<p>macOS does not comes with an installed Java runtime (<abbr class="abbr">JRE</abbr>) and a macOS upgrade may remove one if already installed: it is intended to be -installed at first use. Check if a <abbr>JRE</abbr> is installed by running -<code>java -version</code> in a <code>Terminal</code> window: if Java is not +installed at first use. Check if a <abbr class="abbr">JRE</abbr> is installed by running +<code class="command">java -version</code> in a <code class="command">Terminal</code> window: if Java is not installed on an Intel Mac this may prompt you to install it. We recommend you install a version with long-term support, e.g. 17 or -21<a id="DOCF91" href="#FOOT91"><sup>91</sup></a> +21<a class="footnote" id="DOCF91" href="#FOOT91"><sup>91</sup></a> but not 18–20, 22–24 with a 6-month lifetime. </p> <p>The currently simplest way to install Java is from -<a href="https://adoptium.net">Adoptium</a><a id="DOCF92" href="#FOOT92"><sup>92</sup></a>: this installs into an -Apple-standard location and so works with <code>/usr/bin/java</code>. Other +<a class="uref" href="https://adoptium.net">Adoptium</a><a class="footnote" id="DOCF92" href="#FOOT92"><sup>92</sup></a>: this installs into an +Apple-standard location and so works with <code class="command">/usr/bin/java</code>. Other builds are available from -<a href="https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk">https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk</a> -and from OpenJDK at <a href="https://jdk.java.net/">https://jdk.java.net/</a>, for which -<code>JAVA_HOME</code> may need to be set both when configuring R and at +<a class="uref" href="https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk">https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk</a> +and from OpenJDK at <a class="uref" href="https://jdk.java.net/">https://jdk.java.net/</a>, for which +<code class="env">JAVA_HOME</code> may need to be set both when configuring R and at runtime. Note that Java distribution sites may use unusual designations -for macOS CPUs such as <code>AArch64</code>, <code>x64</code> or <code>x86 +for macOS CPUs such as <code class="code">AArch64</code>, <code class="code">x64</code> or <code class="code">x86 64-bit</code>. </p> <p>Binary distributions of R are built against a specific version (e.g. 11.0.18 or 17.0.1) of Java so </p><div class="example"> -<pre class="example">sudo R CMD javareconf +<pre class="example-preformatted">sudo R CMD javareconf </pre></div> <p>will likely be needed to be run before using Java-using packages. </p> <p>To see what compatible versions of Java are currently installed, run the appropriate one of </p><div class="example"> -<pre class="example">/usr/libexec/java_home -V -a arm64 +<pre class="example-preformatted">/usr/libexec/java_home -V -a arm64 /usr/libexec/java_home -V -a x86_64 </pre></div> -<p>If needed, set the environment variable <code>JAVA_HOME</code> to choose +<p>If needed, set the environment variable <code class="env">JAVA_HOME</code> to choose between these, both when R is built from the sources and when -<code>R CMD javareconf</code> is run. +<code class="command">R CMD javareconf</code> is run. </p> -<p>Configuring and building R both looks for a <abbr>JRE</abbr> and for support for -compiling <abbr>JNI</abbr> programs (used to install packages <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and -<a href="https://CRAN.R-project.org/package=JavaGD"><strong>JavaGD</strong></a>); the latter requires a <abbr>JDK</abbr> (Java <abbr>SDK</abbr>). Most -distributions of Java 11 or later are of a full <abbr>JDK</abbr>. +<p>Configuring and building R both looks for a <abbr class="abbr">JRE</abbr> and for support for +compiling <abbr class="abbr">JNI</abbr> programs (used to install packages <a class="url" href="https://CRAN.R-project.org/package=rJava"><strong class="strong">rJava</strong></a> and +<a class="url" href="https://CRAN.R-project.org/package=JavaGD"><strong class="strong">JavaGD</strong></a>); the latter requires a <abbr class="abbr">JDK</abbr> (Java <abbr class="abbr">SDK</abbr>). Most +distributions of Java 11 or later are of a full <abbr class="abbr">JDK</abbr>. </p> -<p>The build process tries to fathom out what <abbr>JRE</abbr>/<abbr>JDK</abbr> to use, +<p>The build process tries to fathom out what <abbr class="abbr">JRE</abbr>/<abbr class="abbr">JDK</abbr> to use, but it may need some help, e.g. by setting environment variable -<code>JAVA_HOME</code>. To select a build from <a href="https://adoptium.net">Adoptium</a> set e.g. +<code class="env">JAVA_HOME</code>. To select a build from <a class="uref" href="https://adoptium.net">Adoptium</a> set e.g. </p><div class="example"> -<pre class="example">JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home +<pre class="example-preformatted">JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home </pre></div> -<p>in <samp>config.site</samp>. For Java 21 from <a href="https://jdk.java.net/">https://jdk.java.net/</a> +<p>in <samp class="file">config.site</samp>. For Java 21 from <a class="uref" href="https://jdk.java.net/">https://jdk.java.net/</a> (which might no longer be available), use </p><div class="example"> -<pre class="example">JAVA_HOME=/path/to/jdk-21.jdk/Contents/Home +<pre class="example-preformatted">JAVA_HOME=/path/to/jdk-21.jdk/Contents/Home </pre></div> -<p>Note that it is necessary to set the environment variable <code>NOAWT</code> to -<code>1</code> to install many of the Java-using packages. +<p>Note that it is necessary to set the environment variable <code class="env">NOAWT</code> to +<code class="code">1</code> to install many of the Java-using packages. </p> <hr> </div> -<div class="subsection" id="Frameworks"> -<span id="Frameworks-1"></span><h4 class="subsection">C.3.8 Frameworks</h4> +<div class="subsection-level-extent" id="Frameworks"> +<h4 class="subsection" id="Frameworks-1"><span>C.3.8 Frameworks<a class="copiable-link" href="#Frameworks-1"> ¶</a></span></h4> -<p>The <acronym>CRAN</acronym> build of R is installed as a framework, which is +<p>The <abbr class="acronym">CRAN</abbr> build of R is installed as a framework, which is selected by the option </p> <div class="example"> -<pre class="example">./configure --enable-R-framework +<pre class="example-preformatted">./configure --enable-R-framework </pre></div> <p>(This is intended to be used with an Apple toolchain: others may not support frameworks correctly but those from LLVM have done so.) </p> -<p>It is only needed if you want to build R for use with the <small>R.APP</small> -console, and implies <samp>--enable-R-shlib</samp> to build R as a +<p>It is only needed if you want to build R for use with the <small class="sc">R.APP</small> +console, and implies <samp class="option">--enable-R-shlib</samp> to build R as a dynamic library. This option configures R to be built and installed -as a framework called <samp>R.framework</samp>. The default installation path -for <samp>R.framework</samp> is <samp>/Library/Frameworks</samp> but this can be +as a framework called <samp class="file">R.framework</samp>. The default installation path +for <samp class="file">R.framework</samp> is <samp class="file">/Library/Frameworks</samp> but this can be changed at configure time by specifying the flag -<samp>--enable-R-framework[=<var>DIR</var>]</samp> (or <samp>--prefix</samp>) or at -install time <em>via</em> +<samp class="option">--enable-R-framework[=<var class="var">DIR</var>]</samp> (or <samp class="option">--prefix</samp>) or at +install time <em class="emph">via</em> </p> <div class="example"> -<pre class="example">make prefix=/where/you/want/R.framework/to/go install +<pre class="example-preformatted">make prefix=/where/you/want/R.framework/to/go install </pre></div> <p>Note that installation as a framework is non-standard (especially to a non-standard location) and Unix utilities may not support it (e.g. the -<code>pkg-config</code> file <samp>libR.pc</samp> will be put somewhere unknown -to <code>pkg-config</code>). +<code class="command">pkg-config</code> file <samp class="file">libR.pc</samp> will be put somewhere unknown +to <code class="command">pkg-config</code>). </p> <hr> </div> -<div class="subsection" id="Building-R_002eapp"> -<span id="Building-R_002eapp-1"></span><h4 class="subsection">C.3.9 Building R.app</h4> +<div class="subsection-level-extent" id="Building-R_002eapp"> +<h4 class="subsection" id="Building-R_002eapp-1"><span>C.3.9 Building R.app<a class="copiable-link" href="#Building-R_002eapp-1"> ¶</a></span></h4> -<p>Building the <small>R.APP</small> GUI console is a separate project, using Xcode. -Before compiling <small>R.APP</small> make sure the current version of R is -installed in <samp>/Library/Frameworks/R.framework</samp> and is working at the +<p>Building the <small class="sc">R.APP</small> GUI console is a separate project, using Xcode. +Before compiling <small class="sc">R.APP</small> make sure the current version of R is +installed in <samp class="file">/Library/Frameworks/R.framework</samp> and is working at the command-line (this can be a binary install). </p> <p>The current sources can be checked out by </p><div class="example"> -<pre class="example">svn co https://svn.r-project.org/R-packages/trunk/Mac-GUI +<pre class="example-preformatted">svn co https://svn.r-project.org/R-packages/trunk/Mac-GUI </pre></div> -<p>and built by loading the <code>R.xcodeproj</code> project (select the -<code>R</code> target and a suitable configuration), or from the command-line +<p>and built by loading the <code class="code">R.xcodeproj</code> project (select the +<code class="code">R</code> target and a suitable configuration), or from the command-line by e.g. </p><div class="example"> -<pre class="example">xcodebuild -target R -configuration Release +<pre class="example-preformatted">xcodebuild -target R -configuration Release </pre></div> -<p>See also the <samp>INSTALL</samp> file in the checkout or directly at -<a href="https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL">https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL</a>. +<p>See also the <samp class="file">INSTALL</samp> file in the checkout or directly at +<a class="uref" href="https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL">https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL</a>. </p> -<p><small>R.APP</small> does not need to be installed in any specific way. Building -<small>R.APP</small> results in the <small>R.APP</small> bundle which appears as one R +<p><small class="sc">R.APP</small> does not need to be installed in any specific way. Building +<small class="sc">R.APP</small> results in the <small class="sc">R.APP</small> bundle which appears as one R icon. This application bundle can be run from anywhere and it is -customary to place it in the <samp>/Applications</samp> folder. +customary to place it in the <samp class="file">/Applications</samp> folder. </p> <hr> </div> -<div class="subsection" id="Building-binary-packages"> -<span id="Building-binary-packages-1"></span><h4 class="subsection">C.3.10 Building binary packages</h4> +<div class="subsection-level-extent" id="Building-binary-packages"> +<h4 class="subsection" id="Building-binary-packages-1"><span>C.3.10 Building binary packages<a class="copiable-link" href="#Building-binary-packages-1"> ¶</a></span></h4> -<p><acronym>CRAN</acronym> macOS binary packages are distributed as tarballs with -suffix <samp>.tgz</samp> to distinguish them from source tarballs. One can -<code>tar</code> an existing installed package, or use <code>R CMD +<p><abbr class="acronym">CRAN</abbr> macOS binary packages are distributed as tarballs with +suffix <samp class="file">.tgz</samp> to distinguish them from source tarballs. One can +<code class="command">tar</code> an existing installed package, or use <code class="command">R CMD INSTALL --build</code>. </p> <p>However, there are some important details. -</p><ul> -<li> Current <acronym>CRAN</acronym> macOS distributions are targeted at Big Sur +</p><ul class="itemize mark-bullet"> +<li>Current <abbr class="acronym">CRAN</abbr> macOS distributions are targeted at Big Sur so it is wise to ensure that the compilers generate code that will run on Big Sur or later. With the recommended compilers we can use <div class="example"> -<pre class="example">CC="clang -mmacos-version-min=11.0" +<pre class="example-preformatted">CC="clang -mmacos-version-min=11.0" CXX="clang++ -mmacos-version-min=11.0" FC="/opt//gfortran/bin/gfortran -mmacosx-version-min=11.0" </pre></div> <p>or set the environment variable </p><div class="example"> -<pre class="example">export MACOSX_DEPLOYMENT_TARGET=11.0 +<pre class="example-preformatted">export MACOSX_DEPLOYMENT_TARGET=11.0 </pre></div> -</li><li> Using the flag <samp>-Werror=partial-availability</samp> can help trigger +</li><li>Using the flag <samp class="option">-Werror=partial-availability</samp> can help trigger compilation errors on functionality not in Big Sur. -</li><li> Check that any compiled code is not dynamically linked to libraries only -on your machine, for example by using <code>otool -L</code> or -<code>objdump -macho -dylibs-used</code>. This can include C++ and Fortran -run-time libraries under <samp>/opt/R/x86_64/lib</samp> or -<samp>/opt/R/arm64/lib</samp>: one can use <code>install_name_tool</code> to +</li><li>Check that any compiled code is not dynamically linked to libraries only +on your machine, for example by using <code class="command">otool -L</code> or +<code class="command">objdump -macho -dylibs-used</code>. This can include C++ and Fortran +run-time libraries under <samp class="file">/opt/R/x86_64/lib</samp> or +<samp class="file">/opt/R/arm64/lib</samp>: one can use <code class="command">install_name_tool</code> to point these at system versions or those shipped with R, for example <div class="example"> -<pre class="example">install_name_tool -change /usr/local/llvm/lib/libc++.1.dylib \ +<pre class="example-preformatted">install_name_tool -change /usr/local/llvm/lib/libc++.1.dylib \ /usr/lib/libc++.1.dylib \ -<var>pkg</var>.so +<var class="var">pkg</var>.so install_name_tool -change /opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0/libgfortran.5.dylib \ /Library/Frameworks/R.framework/Resources/lib/libgfortran.5.dylib \ -<var>pkg</var>.so +<var class="var">pkg</var>.so install_name_tool -change /opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0/libquadmath.0.dylib \ /Library/Frameworks/R.framework/Resources/lib/libquadmath.0.dylib \ -<var>pkg</var>.so +<var class="var">pkg</var>.so </pre></div> -<p>(where the details depend on the compilers and <acronym>CRAN</acronym> macOS R +<p>(where the details depend on the compilers and <abbr class="acronym">CRAN</abbr> macOS R release). </p> -</li><li> For C++ code there is the possibility that calls will be generated to -entry points not in the system <samp>/usr/lib/libc++.1.dylib</samp>. The +</li><li>For C++ code there is the possibility that calls will be generated to +entry points not in the system <samp class="file">/usr/lib/libc++.1.dylib</samp>. The previous step allows this to be tested against the system library on the build OS, but not against earlier ones. It may be possible to -circumvent that by static linking to <samp>libc++.a</samp> and -<samp>libc++abi.a</samp> by something like +circumvent that by static linking to <samp class="file">libc++.a</samp> and +<samp class="file">libc++abi.a</samp> by something like <div class="example"> -<pre class="example">SHLIB_CXXLD = /usr/local/llvm/bin/clang +<pre class="example-preformatted">SHLIB_CXXLD = /usr/local/llvm/bin/clang PKG_LIBS = /usr/local/llvm/lib/libc++.a /usr/local/llvm/lib/libc++abi.a </pre></div> -<p>in <samp>src/Makevars</samp>. It would also be possible to static link the -Fortran runtime libraries <samp>libgfortran.a</samp> and <samp>libquadmath.a</samp> -should the Fortran compiler have later versions (but <code>gfortran</code> -8–14 all have version <code>5</code>). +<p>in <samp class="file">src/Makevars</samp>. It would also be possible to static link the +Fortran runtime libraries <samp class="file">libgfortran.a</samp> and <samp class="file">libquadmath.a</samp> +should the Fortran compiler have later versions (but <code class="command">gfortran</code> +8–14 all have version <code class="code">5</code>). </p></li></ul> -<p>The <acronym>CRAN</acronym> binary packages are built with the Apple compiler on +<p>The <abbr class="acronym">CRAN</abbr> binary packages are built with the Apple compiler on the oldest supported version of macOS, which avoids the first two and any issues with C++ libraries. </p> <hr> </div> -<div class="subsection" id="Building-for-Intel-on-arm64"> -<span id="Building-for-Intel-on-arm64-1"></span><h4 class="subsection">C.3.11 Building for Intel on ‘<samp>arm64</samp>’</h4> +<div class="subsection-level-extent" id="Building-for-Intel-on-arm64"> +<h4 class="subsection" id="Building-for-Intel-on-arm64-1"><span>C.3.11 Building for Intel on ‘<samp class="samp">arm64</samp>’<a class="copiable-link" href="#Building-for-Intel-on-arm64-1"> ¶</a></span></h4> -<p>Should one want to build R for Intel on an ‘<samp>arm64</samp>’ Big Sur +<p>Should one want to build R for Intel on an ‘<samp class="samp">arm64</samp>’ Big Sur Mac, add the target for the compilers: </p> <div class="example"> -<pre class="example">CC="clang -arch x86_64 +<pre class="example-preformatted">CC="clang -arch x86_64 OBJC=$CC CXX="clang++ -arch x86_64" FC="/opt//gfortran/bin/gfortran -arch x86_64 -mtune=native -mmacosx-version-min=11" </pre></div> <p>and install the Fortran compiler and external software described above -for Intel builds (and have <samp>/opt/R/x86_64/bin</samp> before -<samp>/opt/R/arm64/bin</samp> in your path). +for Intel builds (and have <samp class="file">/opt/R/x86_64/bin</samp> before +<samp class="file">/opt/R/arm64/bin</samp> in your path). </p> <p>To set the correct architecture (which will be auto-detected as -<code>aarch64</code>), use something like +<code class="code">aarch64</code>), use something like </p> <div class="example"> -<pre class="example">/path/to/configure --build=x86_64-apple-darwin20 +<pre class="example-preformatted">/path/to/configure --build=x86_64-apple-darwin20 </pre></div> <hr> </div> -<div class="subsection" id="Installer"> -<span id="Installer-1"></span><h4 class="subsection">C.3.12 Installer</h4> +<div class="subsection-level-extent" id="Installer"> +<h4 class="subsection" id="Installer-1"><span>C.3.12 Installer<a class="copiable-link" href="#Installer-1"> ¶</a></span></h4> -<p>The scripts for the <acronym>CRAN</acronym> packaging of R can be found under -<a href="https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/">https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/</a>: start -with the <samp>README</samp> file in that directory. +<p>The scripts for the <abbr class="acronym">CRAN</abbr> packaging of R can be found under +<a class="uref" href="https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/">https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/</a>: start +with the <samp class="file">README</samp> file in that directory. </p> <hr> </div> </div> -<div class="section" id="FreeBSD"> -<span id="FreeBSD-1"></span><h3 class="section">C.4 FreeBSD</h3> -<span id="index-FreeBSD"></span> +<div class="section-level-extent" id="FreeBSD"> +<h3 class="section" id="FreeBSD-1"><span>C.4 FreeBSD<a class="copiable-link" href="#FreeBSD-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-FreeBSD"></a> <p>There have been few recent reports on FreeBSD: there is a ‘port’ at -<a href="https://svnweb.freebsd.org/ports/head/math/R">https://svnweb.freebsd.org/ports/head/math/R</a>, currently last +<a class="uref" href="https://svnweb.freebsd.org/ports/head/math/R">https://svnweb.freebsd.org/ports/head/math/R</a>, currently last updated for R 4.0.4. Recent versions of FreeBSD use Clang and the -<code>libc++</code> C++ headers and runtime, but the ‘port’ has been +<code class="code">libc++</code> C++ headers and runtime, but the ‘port’ has been configured to use GCC. </p> -<p>Use of ICU for collation and the <code>configure</code> option -<samp>--with-internal-tzcode</samp> are desirable workarounds. +<p>Use of ICU for collation and the <code class="command">configure</code> option +<samp class="option">--with-internal-tzcode</samp> are desirable workarounds. </p> <hr> </div> -<div class="section" id="OpenBSD"> -<span id="OpenBSD-1"></span><h3 class="section">C.5 OpenBSD</h3> -<span id="index-OpenBSD"></span> +<div class="section-level-extent" id="OpenBSD"> +<h3 class="section" id="OpenBSD-1"><span>C.5 OpenBSD<a class="copiable-link" href="#OpenBSD-1"> ¶</a></span></h3> +<a class="index-entry-id" id="index-OpenBSD"></a> <p>Ingo Feinerer installed R version 3.2.2 on OpenBSD 5.8 arch -‘<samp>amd64</samp>’ (their name for ‘<samp>x86_64</samp>’). Details of the build +‘<samp class="samp">amd64</samp>’ (their name for ‘<samp class="samp">x86_64</samp>’). Details of the build (and patches applied) are at -<a href="https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/math/R/">https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/math/R/</a>, +<a class="uref" href="https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/math/R/">https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/math/R/</a>, currently updated for R 4.2.3. </p> <hr> </div> -<div class="section" id="Cygwin"> -<span id="Cygwin-1"></span><h3 class="section">C.6 Cygwin</h3> +<div class="section-level-extent" id="Cygwin"> +<h3 class="section" id="Cygwin-1"><span>C.6 Cygwin<a class="copiable-link" href="#Cygwin-1"> ¶</a></span></h3> -<p>The 32-bit version never worked well enough to pass R’s <code>make +<p>The 32-bit version never worked well enough to pass R’s <code class="command">make check</code>, and residual support from earlier experiments was removed in R 3.3.0. </p> @@ -5838,22 +5832,22 @@ </p> <hr> </div> -<div class="section" id="New-platforms"> -<span id="New-platforms-1"></span><h3 class="section">C.7 New platforms</h3> +<div class="section-level-extent" id="New-platforms"> +<h3 class="section" id="New-platforms-1"><span>C.7 New platforms<a class="copiable-link" href="#New-platforms-1"> ¶</a></span></h3> <p>There are a number of sources of problems when installing R on a new hardware/OS platform. These include </p> -<p><strong>Floating Point Arithmetic</strong>: R requires arithmetic compliant -with <acronym>IEC</acronym> 60559, also known as <acronym>IEEE</acronym> 754. -This mandates the use of plus and minus infinity and <code>NaN</code> (not a +<p><strong class="strong">Floating Point Arithmetic</strong>: R requires arithmetic compliant +with <abbr class="acronym">IEC</abbr> 60559, also known as <abbr class="acronym">IEEE</abbr> 754. +This mandates the use of plus and minus infinity and <code class="code">NaN</code> (not a number) as well as specific details of rounding. Although almost all -current <abbr>FPU</abbr>s can support this, selecting such support can be a pain. +current <abbr class="abbr">FPU</abbr>s can support this, selecting such support can be a pain. The problem is that there is no agreement on how to set the signalling -behaviour; Sun/Sparc, SGI/IRIX and ‘<samp>ix86</samp>’ Linux require no +behaviour; Sun/Sparc, SGI/IRIX and ‘<samp class="samp">ix86</samp>’ Linux require no special action, FreeBSD requires a call to (the macro) -<code>fpsetmask(0)</code> and OSF1 required that computation be done with a -<samp>-ieee_with_inexact</samp> flag etc. With Intel compilers on 32-bit and +<code class="code">fpsetmask(0)</code> and OSF1 required that computation be done with a +<samp class="option">-ieee_with_inexact</samp> flag etc. With Intel compilers on 32-bit and 64-bit Intel machines, one has to explicitly disable flush-to-zero and denormals-are-zero modes. Some ARM processors including A12Z and M1 (Apple Silicon) by default use runfast mode, which includes @@ -5861,36 +5855,36 @@ default-nan mode, the NaN payload used for representation of numeric NA values is lost even on simple operations with finite values. On a new platform you must find out the magic recipe and add some code to make it -work. This can often be done via the file <samp>config.site</samp> which +work. This can often be done via the file <samp class="file">config.site</samp> which resides in the top level directory. </p> <p>Beware of using high levels of optimization, at least initially. On many compilers these reduce the degree of compliance to the -<acronym>IEEE</acronym> model. For example, using <samp>-fast</samp> on the Oracle -compilers has caused R’s <code>NaN</code> to be set incorrectly, and -<code>gcc</code>’s <samp>-ffast-math</samp> and <code>clang</code>’s -<samp>-Ofast</samp> have given incorrect results. +<abbr class="acronym">IEEE</abbr> model. For example, using <samp class="option">-fast</samp> on the Oracle +compilers has caused R’s <code class="code">NaN</code> to be set incorrectly, and +<code class="command">gcc</code>’s <samp class="option">-ffast-math</samp> and <code class="command">clang</code>’s +<samp class="option">-Ofast</samp> have given incorrect results. </p> -<p><strong>Shared Objects</strong>: There seems to be very little agreement +<p><strong class="strong">Shared Objects</strong>: There seems to be very little agreement across platforms on what needs to be done to build shared objects. there are many different combinations of flags for the compilers and -loaders. <acronym>GNU</acronym> libtool cannot be used (yet), as it currently +loaders. <abbr class="acronym">GNU</abbr> libtool cannot be used (yet), as it currently does not fully support Fortran: one would need a shell wrapper for this). The technique we use is to first interrogate the X window system -about what it does (using <code>xmkmf</code>), and then override this in -situations where we know better (for tools from the <acronym>GNU</acronym> +about what it does (using <code class="command">xmkmf</code>), and then override this in +situations where we know better (for tools from the <abbr class="acronym">GNU</abbr> Compiler Collection and/or platforms we know about). This typically works, but you may have to manually override the results. Scanning the -manual entries for <code>cc</code> and <code>ld</code> usually reveals the +manual entries for <code class="command">cc</code> and <code class="command">ld</code> usually reveals the correct incantation. Once you know the recipe you can modify the file -<samp>config.site</samp> (following the instructions therein) so that the +<samp class="file">config.site</samp> (following the instructions therein) so that the build will use these options. </p> -<p>It seems that <code>gcc</code> 3.4.x and later on ‘<samp>ix86</samp>’ Linux +<p>It seems that <code class="command">gcc</code> 3.4.x and later on ‘<samp class="samp">ix86</samp>’ Linux defeat attempts by the LAPACK code to avoid computations entirely in -extended-precision registers, so file <samp>src/modules/lapack/dlamc.f</samp> +extended-precision registers, so file <samp class="file">src/modules/lapack/dlamc.f</samp> may need to be compiled without optimization or with additional flags. -Set the configure variable <code>SAFE_FFLAGS</code> to the flags to be used for +Set the configure variable <code class="env">SAFE_FFLAGS</code> to the flags to be used for this file. </p> <p>If you do manage to get R running on a new platform please let us @@ -5898,638 +5892,644 @@ that platform. </p> <p>If you are having trouble getting R to work on your platform please -feel free to use the ‘<samp>R-devel</samp>’ mailing list to ask questions. We +feel free to use the ‘<samp class="samp">R-devel</samp>’ mailing list to ask questions. We have had a fair amount of practice at porting R to new platforms <small class="enddots">...</small> </p> <p>One thing you might want to add for a new platform is the mapping of -C/C++/Fortran calls to entry point names used for <code>R CMD check</code>. -See <a href="https://svn.r-project.org/R-dev-web/trunk/sotools.txt">https://svn.r-project.org/R-dev-web/trunk/sotools.txt</a> for how +C/C++/Fortran calls to entry point names used for <code class="command">R CMD check</code>. +See <a class="uref" href="https://svn.r-project.org/R-dev-web/trunk/sotools.txt">https://svn.r-project.org/R-dev-web/trunk/sotools.txt</a> for how to do so. </p> <hr> </div> </div> -<div class="unnumbered" id="Function-and-variable-index"> -<span id="Function-and-variable-index-1"></span><h2 class="unnumbered">Function and variable index</h2> +<div class="unnumbered-level-extent" id="Function-and-variable-index"> +<h2 class="unnumbered" id="Function-and-variable-index-1"><span>Function and variable index<a class="copiable-link" href="#Function-and-variable-index-1"> ¶</a></span></h2> -<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Function-and-variable-index_vr_letter-C"><b>C</b></a> +<div class="printindex vr-printindex"> +<table class="vr-letters-header-printindex"><tr><th>Jump to: </th><td><a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-C"><b>C</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-I"><b>I</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-I"><b>I</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-M"><b>M</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-M"><b>M</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-R"><b>R</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-R"><b>R</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-U"><b>U</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-U"><b>U</b></a> </td></tr></table> -<table class="index-vr" border="0"> -<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Function-and-variable-index_vr_letter-C">C</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-configure"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="#Simple-compilation">Simple compilation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-configure-1"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="#Simple-compilation">Simple compilation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-configure-2"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-configure-3"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-configure-4"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="#Configuration-variables">Configuration variables</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-configure-5"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="#Using-make">Using make</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Function-and-variable-index_vr_letter-I">I</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-install_002epackages"><code>install.packages</code></a>:</td><td> </td><td valign="top"><a href="#Installing-packages">Installing packages</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Function-and-variable-index_vr_letter-M">M</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-make"><code>make</code></a>:</td><td> </td><td valign="top"><a href="#Using-make">Using make</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Function-and-variable-index_vr_letter-R">R</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-remove_002epackages"><code>remove.packages</code></a>:</td><td> </td><td valign="top"><a href="#Removing-packages">Removing packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fHOME"><code>R_HOME</code></a>:</td><td> </td><td valign="top"><a href="#Simple-compilation">Simple compilation</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Function-and-variable-index_vr_letter-U">U</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-update_002epackages"><code>update.packages</code></a>:</td><td> </td><td valign="top"><a href="#Updating-packages">Updating packages</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> +<table class="vr-entries-printindex" border="0"> +<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Function-and-variable-index_vr_letter-C">C</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-configure"><code>configure</code></a></td><td class="printindex-index-section"><a href="#Simple-compilation">Simple compilation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-configure-1"><code>configure</code></a></td><td class="printindex-index-section"><a href="#Simple-compilation">Simple compilation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-configure-2"><code>configure</code></a></td><td class="printindex-index-section"><a href="#Installation">Installation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-configure-3"><code>configure</code></a></td><td class="printindex-index-section"><a href="#Installation">Installation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-configure-4"><code>configure</code></a></td><td class="printindex-index-section"><a href="#Configuration-variables">Configuration variables</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-configure-5"><code>configure</code></a></td><td class="printindex-index-section"><a href="#Using-make">Using make</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Function-and-variable-index_vr_letter-I">I</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-install_002epackages"><code>install.packages</code></a></td><td class="printindex-index-section"><a href="#Installing-packages">Installing packages</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Function-and-variable-index_vr_letter-M">M</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-make"><code>make</code></a></td><td class="printindex-index-section"><a href="#Using-make">Using make</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Function-and-variable-index_vr_letter-R">R</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fHOME"><code>R_HOME</code></a></td><td class="printindex-index-section"><a href="#Simple-compilation">Simple compilation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-remove_002epackages"><code>remove.packages</code></a></td><td class="printindex-index-section"><a href="#Removing-packages">Removing packages</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Function-and-variable-index_vr_letter-U">U</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-update_002epackages"><code>update.packages</code></a></td><td class="printindex-index-section"><a href="#Updating-packages">Updating packages</a></td></tr> +<tr><td colspan="3"><hr></td></tr> </table> -<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Function-and-variable-index_vr_letter-C"><b>C</b></a> +<table class="vr-letters-footer-printindex"><tr><th>Jump to: </th><td><a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-C"><b>C</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-I"><b>I</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-I"><b>I</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-M"><b>M</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-M"><b>M</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-R"><b>R</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-R"><b>R</b></a> -<a class="summary-letter" href="#Function-and-variable-index_vr_letter-U"><b>U</b></a> +<a class="summary-letter-printindex" href="#Function-and-variable-index_vr_letter-U"><b>U</b></a> </td></tr></table> +</div> <hr> </div> -<div class="unnumbered" id="Concept-index"> -<span id="Concept-index-1"></span><h2 class="unnumbered">Concept index</h2> +<div class="unnumbered-level-extent" id="Concept-index"> +<h2 class="unnumbered" id="Concept-index-1"><span>Concept index<a class="copiable-link" href="#Concept-index-1"> ¶</a></span></h2> -<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Concept-index_cp_letter-B"><b>B</b></a> +<div class="printindex cp-printindex"> +<table class="cp-letters-header-printindex"><tr><th>Jump to: </th><td><a class="summary-letter-printindex" href="#Concept-index_cp_letter-B"><b>B</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-C"><b>C</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-C"><b>C</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-F"><b>F</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-F"><b>F</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-I"><b>I</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-I"><b>I</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-L"><b>L</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-L"><b>L</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-M"><b>M</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-M"><b>M</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-O"><b>O</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-O"><b>O</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-P"><b>P</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-P"><b>P</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-R"><b>R</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-R"><b>R</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-S"><b>S</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-S"><b>S</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-U"><b>U</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-U"><b>U</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-V"><b>V</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-V"><b>V</b></a> </td></tr></table> -<table class="index-cp" border="0"> -<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-B">B</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-BLAS-library">BLAS library</a>:</td><td> </td><td valign="top"><a href="#Linear-algebra">Linear algebra</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-BLAS-library-1">BLAS library</a>:</td><td> </td><td valign="top"><a href="#Accelerate">Accelerate</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-C">C</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Cairo">Cairo</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-macOS">Installing R under macOS</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Cairo-1">Cairo</a>:</td><td> </td><td valign="top"><a href="#Useful-libraries-and-programs">Useful libraries and programs</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Cairo-2">Cairo</a>:</td><td> </td><td valign="top"><a href="#X11-issues">X11 issues</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Cairo-3">Cairo</a>:</td><td> </td><td valign="top"><a href="#Cairo-graphics">Cairo graphics</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-F">F</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Fortran">Fortran</a>:</td><td> </td><td valign="top"><a href="#Using-Fortran">Using Fortran</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-FreeBSD">FreeBSD</a>:</td><td> </td><td valign="top"><a href="#FreeBSD">FreeBSD</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-I">I</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Installation">Installation</a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Installing-under-Unix_002dalikes">Installing under Unix-alikes</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Installing-under-Windows">Installing under Windows</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-Windows">Installing R under Windows</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Internationalization">Internationalization</a>:</td><td> </td><td valign="top"><a href="#Internationalization">Internationalization</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-L">L</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-LAPACK-library">LAPACK library</a>:</td><td> </td><td valign="top"><a href="#LAPACK">LAPACK</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LAPACK-library-1">LAPACK library</a>:</td><td> </td><td valign="top"><a href="#Accelerate">Accelerate</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Libraries">Libraries</a>:</td><td> </td><td valign="top"><a href="#Add_002don-packages">Add-on packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Libraries_002c-managing">Libraries, managing</a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Libraries_002c-site">Libraries, site</a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Libraries_002c-user">Libraries, user</a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Linux">Linux</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Linux-1">Linux</a>:</td><td> </td><td valign="top"><a href="#Linux">Linux</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Locale">Locale</a>:</td><td> </td><td valign="top"><a href="#Internationalization">Internationalization</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Locale-1">Locale</a>:</td><td> </td><td valign="top"><a href="#Locales">Locales</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Localization">Localization</a>:</td><td> </td><td valign="top"><a href="#Internationalization">Internationalization</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-M">M</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-macOS">macOS</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-macOS-1">macOS</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-macOS">Installing R under macOS</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-macOS-2">macOS</a>:</td><td> </td><td valign="top"><a href="#macOS">macOS</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Manuals">Manuals</a>:</td><td> </td><td valign="top"><a href="#Making-the-manuals">Making the manuals</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Manuals_002c-installing">Manuals, installing</a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-O">O</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Obtaining-R">Obtaining R</a>:</td><td> </td><td valign="top"><a href="#Obtaining-R">Obtaining R</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-OpenBSD">OpenBSD</a>:</td><td> </td><td valign="top"><a href="#OpenBSD">OpenBSD</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-P">P</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Packages">Packages</a>:</td><td> </td><td valign="top"><a href="#Add_002don-packages">Add-on packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Packages_002c-default">Packages, default</a>:</td><td> </td><td valign="top"><a href="#Default-packages">Default packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Packages_002c-installing">Packages, installing</a>:</td><td> </td><td valign="top"><a href="#Installing-packages">Installing packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Packages_002c-removing">Packages, removing</a>:</td><td> </td><td valign="top"><a href="#Removing-packages">Removing packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Packages_002c-updating">Packages, updating</a>:</td><td> </td><td valign="top"><a href="#Updating-packages">Updating packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Pango">Pango</a>:</td><td> </td><td valign="top"><a href="#Useful-libraries-and-programs">Useful libraries and programs</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Pango-1">Pango</a>:</td><td> </td><td valign="top"><a href="#Cairo-graphics">Cairo graphics</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-R">R</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Repositories">Repositories</a>:</td><td> </td><td valign="top"><a href="#Setting-up-a-package-repository">Setting up a package repository</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-S">S</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Site-libraries">Site libraries</a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Sources-for-R">Sources for R</a>:</td><td> </td><td valign="top"><a href="#Getting-and-unpacking-the-sources">Getting and unpacking the sources</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Subversion">Subversion</a>:</td><td> </td><td valign="top"><a href="#Using-Subversion-and-rsync">Using Subversion and rsync</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Subversion-1">Subversion</a>:</td><td> </td><td valign="top"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-U">U</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-User-libraries">User libraries</a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Concept-index_cp_letter-V">V</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-Vignettes">Vignettes</a>:</td><td> </td><td valign="top"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> +<table class="cp-entries-printindex" border="0"> +<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-B">B</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-BLAS-library">BLAS library</a></td><td class="printindex-index-section"><a href="#Linear-algebra">Linear algebra</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-BLAS-library-1">BLAS library</a></td><td class="printindex-index-section"><a href="#Accelerate">Accelerate</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-C">C</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Cairo">Cairo</a></td><td class="printindex-index-section"><a href="#Installing-R-under-macOS">Installing R under macOS</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Cairo-1">Cairo</a></td><td class="printindex-index-section"><a href="#Useful-libraries-and-programs">Useful libraries and programs</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Cairo-2">Cairo</a></td><td class="printindex-index-section"><a href="#X11-issues">X11 issues</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Cairo-3">Cairo</a></td><td class="printindex-index-section"><a href="#Cairo-graphics">Cairo graphics</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-F">F</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Fortran">Fortran</a></td><td class="printindex-index-section"><a href="#Using-Fortran">Using Fortran</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-FreeBSD">FreeBSD</a></td><td class="printindex-index-section"><a href="#FreeBSD">FreeBSD</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-I">I</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Installation">Installation</a></td><td class="printindex-index-section"><a href="#Installation">Installation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Installing-under-Unix_002dalikes">Installing under Unix-alikes</a></td><td class="printindex-index-section"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Installing-under-Windows">Installing under Windows</a></td><td class="printindex-index-section"><a href="#Installing-R-under-Windows">Installing R under Windows</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Internationalization">Internationalization</a></td><td class="printindex-index-section"><a href="#Internationalization">Internationalization</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-L">L</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LAPACK-library">LAPACK library</a></td><td class="printindex-index-section"><a href="#LAPACK">LAPACK</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LAPACK-library-1">LAPACK library</a></td><td class="printindex-index-section"><a href="#Accelerate">Accelerate</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Libraries">Libraries</a></td><td class="printindex-index-section"><a href="#Add_002don-packages">Add-on packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Libraries_002c-managing">Libraries, managing</a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Libraries_002c-site">Libraries, site</a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Libraries_002c-user">Libraries, user</a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Linux">Linux</a></td><td class="printindex-index-section"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Linux-1">Linux</a></td><td class="printindex-index-section"><a href="#Linux">Linux</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Locale">Locale</a></td><td class="printindex-index-section"><a href="#Internationalization">Internationalization</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Locale-1">Locale</a></td><td class="printindex-index-section"><a href="#Locales">Locales</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Localization">Localization</a></td><td class="printindex-index-section"><a href="#Internationalization">Internationalization</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-M">M</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-macOS">macOS</a></td><td class="printindex-index-section"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-macOS-1">macOS</a></td><td class="printindex-index-section"><a href="#Installing-R-under-macOS">Installing R under macOS</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-macOS-2">macOS</a></td><td class="printindex-index-section"><a href="#macOS">macOS</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Manuals">Manuals</a></td><td class="printindex-index-section"><a href="#Making-the-manuals">Making the manuals</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Manuals_002c-installing">Manuals, installing</a></td><td class="printindex-index-section"><a href="#Installation">Installation</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-O">O</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Obtaining-R">Obtaining R</a></td><td class="printindex-index-section"><a href="#Obtaining-R">Obtaining R</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-OpenBSD">OpenBSD</a></td><td class="printindex-index-section"><a href="#OpenBSD">OpenBSD</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-P">P</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Packages">Packages</a></td><td class="printindex-index-section"><a href="#Add_002don-packages">Add-on packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Packages_002c-default">Packages, default</a></td><td class="printindex-index-section"><a href="#Default-packages">Default packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Packages_002c-installing">Packages, installing</a></td><td class="printindex-index-section"><a href="#Installing-packages">Installing packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Packages_002c-removing">Packages, removing</a></td><td class="printindex-index-section"><a href="#Removing-packages">Removing packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Packages_002c-updating">Packages, updating</a></td><td class="printindex-index-section"><a href="#Updating-packages">Updating packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Pango">Pango</a></td><td class="printindex-index-section"><a href="#Useful-libraries-and-programs">Useful libraries and programs</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Pango-1">Pango</a></td><td class="printindex-index-section"><a href="#Cairo-graphics">Cairo graphics</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-R">R</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Repositories">Repositories</a></td><td class="printindex-index-section"><a href="#Setting-up-a-package-repository">Setting up a package repository</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-S">S</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Site-libraries">Site libraries</a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Sources-for-R">Sources for R</a></td><td class="printindex-index-section"><a href="#Getting-and-unpacking-the-sources">Getting and unpacking the sources</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Subversion">Subversion</a></td><td class="printindex-index-section"><a href="#Using-Subversion-and-rsync">Using Subversion and rsync</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Subversion-1">Subversion</a></td><td class="printindex-index-section"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-U">U</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-User-libraries">User libraries</a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Concept-index_cp_letter-V">V</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-Vignettes">Vignettes</a></td><td class="printindex-index-section"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> +<tr><td colspan="3"><hr></td></tr> </table> -<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Concept-index_cp_letter-B"><b>B</b></a> +<table class="cp-letters-footer-printindex"><tr><th>Jump to: </th><td><a class="summary-letter-printindex" href="#Concept-index_cp_letter-B"><b>B</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-C"><b>C</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-C"><b>C</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-F"><b>F</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-F"><b>F</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-I"><b>I</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-I"><b>I</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-L"><b>L</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-L"><b>L</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-M"><b>M</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-M"><b>M</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-O"><b>O</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-O"><b>O</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-P"><b>P</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-P"><b>P</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-R"><b>R</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-R"><b>R</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-S"><b>S</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-S"><b>S</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-U"><b>U</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-U"><b>U</b></a> -<a class="summary-letter" href="#Concept-index_cp_letter-V"><b>V</b></a> +<a class="summary-letter-printindex" href="#Concept-index_cp_letter-V"><b>V</b></a> </td></tr></table> +</div> <hr> </div> -<div class="unnumbered" id="Environment-variable-index"> -<span id="Environment-variable-index-1"></span><h2 class="unnumbered">Environment variable index</h2> +<div class="unnumbered-level-extent" id="Environment-variable-index"> +<h2 class="unnumbered" id="Environment-variable-index-1"><span>Environment variable index<a class="copiable-link" href="#Environment-variable-index-1"> ¶</a></span></h2> -<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Environment-variable-index_en_letter-B"><b>B</b></a> +<div class="printindex en-printindex"> +<table class="en-letters-header-printindex"><tr><th>Jump to: </th><td><a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-B"><b>B</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-C"><b>C</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-C"><b>C</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-D"><b>D</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-D"><b>D</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-J"><b>J</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-J"><b>J</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-L"><b>L</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-L"><b>L</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-P"><b>P</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-P"><b>P</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-R"><b>R</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-R"><b>R</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-T"><b>T</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-T"><b>T</b></a> </td></tr></table> -<table class="index-en" border="0"> -<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-B">B</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-BLAS_005fLIBS"><code>BLAS_LIBS</code></a>:</td><td> </td><td valign="top"><a href="#BLAS">BLAS</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-C">C</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-CONFIG_005fSITE"><code>CONFIG_SITE</code></a>:</td><td> </td><td valign="top"><a href="#Configuration-variables">Configuration variables</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-D">D</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-DESTDIR"><code>DESTDIR</code></a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-DESTDIR-1"><code>DESTDIR</code></a>:</td><td> </td><td valign="top"><a href="#Unix_002dalike-standalone">Unix-alike standalone</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-J">J</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-JAVA_005fHOME"><code>JAVA_HOME</code></a>:</td><td> </td><td valign="top"><a href="#Java-support">Java support</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-L">L</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-LANG"><code>LANG</code></a>:</td><td> </td><td valign="top"><a href="#Localization-of-messages">Localization of messages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LANGUAGE"><code>LANGUAGE</code></a>:</td><td> </td><td valign="top"><a href="#Localization-of-messages">Localization of messages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LANGUAGE-1"><code>LANGUAGE</code></a>:</td><td> </td><td valign="top"><a href="#Localization-of-messages">Localization of messages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LAPACK_005fLIBS"><code>LAPACK_LIBS</code></a>:</td><td> </td><td valign="top"><a href="#LAPACK">LAPACK</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LC_005fALL"><code>LC_ALL</code></a>:</td><td> </td><td valign="top"><a href="#Localization-of-messages">Localization of messages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LC_005fCOLLATE"><code>LC_COLLATE</code></a>:</td><td> </td><td valign="top"><a href="#Testing-a-Unix_002dalike-Installation">Testing a Unix-alike Installation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LC_005fMESSAGES"><code>LC_MESSAGES</code></a>:</td><td> </td><td valign="top"><a href="#Localization-of-messages">Localization of messages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH"><code>LD_LIBRARY_PATH</code></a>:</td><td> </td><td valign="top"><a href="#Unix_002dalike-standalone">Unix-alike standalone</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-1"><code>LD_LIBRARY_PATH</code></a>:</td><td> </td><td valign="top"><a href="#Using-Fortran">Using Fortran</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-2"><code>LD_LIBRARY_PATH</code></a>:</td><td> </td><td valign="top"><a href="#Compile-and-load-flags">Compile and load flags</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-P">P</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-PAPERSIZE"><code>PAPERSIZE</code></a>:</td><td> </td><td valign="top"><a href="#Setting-paper-size">Setting paper size</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-PATH"><code>PATH</code></a>:</td><td> </td><td valign="top"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-PATH-1"><code>PATH</code></a>:</td><td> </td><td valign="top"><a href="#Using-Fortran">Using Fortran</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-R">R</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fARCH"><code>R_ARCH</code></a>:</td><td> </td><td valign="top"><a href="#Sub_002darchitectures">Sub-architectures</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fBROWSER"><code>R_BROWSER</code></a>:</td><td> </td><td valign="top"><a href="#Setting-the-browsers">Setting the browsers</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fDEFAULT_005fPACKAGES"><code>R_DEFAULT_PACKAGES</code></a>:</td><td> </td><td valign="top"><a href="#Default-packages">Default packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fDISABLE_005fHTTPD"><code>R_DISABLE_HTTPD</code></a>:</td><td> </td><td valign="top"><a href="#Help-options">Help options</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fGSCMD"><code>R_GSCMD</code></a>:</td><td> </td><td valign="top"><a href="#Useful-libraries-and-programs">Useful libraries and programs</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fINSTALL_005fTAR"><code>R_INSTALL_TAR</code></a>:</td><td> </td><td valign="top"><a href="#Windows-packages">Windows packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH"><code>R_JAVA_LD_LIBRARY_PATH</code></a>:</td><td> </td><td valign="top"><a href="#Java-support">Java support</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH-1"><code>R_JAVA_LD_LIBRARY_PATH</code></a>:</td><td> </td><td valign="top"><a href="#Java-support">Java support</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fLIBS"><code>R_LIBS</code></a>:</td><td> </td><td valign="top"><a href="#Add_002don-packages">Add-on packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fLIBS_005fSITE"><code>R_LIBS_SITE</code></a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fLIBS_005fUSER"><code>R_LIBS_USER</code></a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fPAPERSIZE"><code>R_PAPERSIZE</code></a>:</td><td> </td><td valign="top"><a href="#Making-the-manuals">Making the manuals</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fPAPERSIZE-1"><code>R_PAPERSIZE</code></a>:</td><td> </td><td valign="top"><a href="#Running-R">Running R</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fPAPERSIZE-2"><code>R_PAPERSIZE</code></a>:</td><td> </td><td valign="top"><a href="#Setting-paper-size">Setting paper size</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fPAPERSIZE-3"><code>R_PAPERSIZE</code></a>:</td><td> </td><td valign="top"><a href="#Making-manuals">Making manuals</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fPDFVIEWER"><code>R_PDFVIEWER</code></a>:</td><td> </td><td valign="top"><a href="#Setting-the-browsers">Setting the browsers</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fRD4PDF"><code>R_RD4PDF</code></a>:</td><td> </td><td valign="top"><a href="#Making-the-manuals">Making the manuals</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fRD4PDF-1"><code>R_RD4PDF</code></a>:</td><td> </td><td valign="top"><a href="#Making-manuals">Making manuals</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fSCRIPT_005fDEFAULT_005fPACKAGES"><code>R_SCRIPT_DEFAULT_PACKAGES</code></a>:</td><td> </td><td valign="top"><a href="#Default-packages">Default packages</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-R_005fUSER"><code>R_USER</code></a>:</td><td> </td><td valign="top"><a href="#Running-R">Running R</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th id="Environment-variable-index_en_letter-T">T</th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="#index-TAR"><code>TAR</code></a>:</td><td> </td><td valign="top"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TAR_005fOPTIONS"><code>TAR_OPTIONS</code></a>:</td><td> </td><td valign="top"><a href="#Getting-and-unpacking-the-sources">Getting and unpacking the sources</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TEMP"><code>TEMP</code></a>:</td><td> </td><td valign="top"><a href="#Running-R">Running R</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TMP"><code>TMP</code></a>:</td><td> </td><td valign="top"><a href="#Running-R">Running R</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TMPDIR"><code>TMPDIR</code></a>:</td><td> </td><td valign="top"><a href="#Simple-compilation">Simple compilation</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TMPDIR-1"><code>TMPDIR</code></a>:</td><td> </td><td valign="top"><a href="#Running-R">Running R</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TMPDIR-2"><code>TMPDIR</code></a>:</td><td> </td><td valign="top"><a href="#Running-R">Running R</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-TMPDIR-3"><code>TMPDIR</code></a>:</td><td> </td><td valign="top"><a href="#Installing-packages">Installing packages</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> +<table class="en-entries-printindex" border="0"> +<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-B">B</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-BLAS_005fLIBS"><code>BLAS_LIBS</code></a></td><td class="printindex-index-section"><a href="#BLAS">BLAS</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-C">C</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-CONFIG_005fSITE"><code>CONFIG_SITE</code></a></td><td class="printindex-index-section"><a href="#Configuration-variables">Configuration variables</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-D">D</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-DESTDIR"><code>DESTDIR</code></a></td><td class="printindex-index-section"><a href="#Installation">Installation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-DESTDIR-1"><code>DESTDIR</code></a></td><td class="printindex-index-section"><a href="#Unix_002dalike-standalone">Unix-alike standalone</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-J">J</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-JAVA_005fHOME"><code>JAVA_HOME</code></a></td><td class="printindex-index-section"><a href="#Java-support">Java support</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-L">L</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LANG"><code>LANG</code></a></td><td class="printindex-index-section"><a href="#Localization-of-messages">Localization of messages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LANGUAGE"><code>LANGUAGE</code></a></td><td class="printindex-index-section"><a href="#Localization-of-messages">Localization of messages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LANGUAGE-1"><code>LANGUAGE</code></a></td><td class="printindex-index-section"><a href="#Localization-of-messages">Localization of messages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LAPACK_005fLIBS"><code>LAPACK_LIBS</code></a></td><td class="printindex-index-section"><a href="#LAPACK">LAPACK</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LC_005fALL"><code>LC_ALL</code></a></td><td class="printindex-index-section"><a href="#Localization-of-messages">Localization of messages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LC_005fCOLLATE"><code>LC_COLLATE</code></a></td><td class="printindex-index-section"><a href="#Testing-a-Unix_002dalike-Installation">Testing a Unix-alike Installation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LC_005fMESSAGES"><code>LC_MESSAGES</code></a></td><td class="printindex-index-section"><a href="#Localization-of-messages">Localization of messages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LD_005fLIBRARY_005fPATH"><code>LD_LIBRARY_PATH</code></a></td><td class="printindex-index-section"><a href="#Unix_002dalike-standalone">Unix-alike standalone</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LD_005fLIBRARY_005fPATH-1"><code>LD_LIBRARY_PATH</code></a></td><td class="printindex-index-section"><a href="#Using-Fortran">Using Fortran</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-LD_005fLIBRARY_005fPATH-2"><code>LD_LIBRARY_PATH</code></a></td><td class="printindex-index-section"><a href="#Compile-and-load-flags">Compile and load flags</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-P">P</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-PAPERSIZE"><code>PAPERSIZE</code></a></td><td class="printindex-index-section"><a href="#Setting-paper-size">Setting paper size</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-PATH"><code>PATH</code></a></td><td class="printindex-index-section"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-PATH-1"><code>PATH</code></a></td><td class="printindex-index-section"><a href="#Using-Fortran">Using Fortran</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-R">R</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fARCH"><code>R_ARCH</code></a></td><td class="printindex-index-section"><a href="#Sub_002darchitectures">Sub-architectures</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fBROWSER"><code>R_BROWSER</code></a></td><td class="printindex-index-section"><a href="#Setting-the-browsers">Setting the browsers</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fDEFAULT_005fPACKAGES"><code>R_DEFAULT_PACKAGES</code></a></td><td class="printindex-index-section"><a href="#Default-packages">Default packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fDISABLE_005fHTTPD"><code>R_DISABLE_HTTPD</code></a></td><td class="printindex-index-section"><a href="#Help-options">Help options</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fGSCMD"><code>R_GSCMD</code></a></td><td class="printindex-index-section"><a href="#Useful-libraries-and-programs">Useful libraries and programs</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fINSTALL_005fTAR"><code>R_INSTALL_TAR</code></a></td><td class="printindex-index-section"><a href="#Windows-packages">Windows packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH"><code>R_JAVA_LD_LIBRARY_PATH</code></a></td><td class="printindex-index-section"><a href="#Java-support">Java support</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH-1"><code>R_JAVA_LD_LIBRARY_PATH</code></a></td><td class="printindex-index-section"><a href="#Java-support">Java support</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fLIBS"><code>R_LIBS</code></a></td><td class="printindex-index-section"><a href="#Add_002don-packages">Add-on packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fLIBS_005fSITE"><code>R_LIBS_SITE</code></a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fLIBS_005fUSER"><code>R_LIBS_USER</code></a></td><td class="printindex-index-section"><a href="#Managing-libraries">Managing libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fPAPERSIZE"><code>R_PAPERSIZE</code></a></td><td class="printindex-index-section"><a href="#Making-the-manuals">Making the manuals</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fPAPERSIZE-1"><code>R_PAPERSIZE</code></a></td><td class="printindex-index-section"><a href="#Running-R">Running R</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fPAPERSIZE-2"><code>R_PAPERSIZE</code></a></td><td class="printindex-index-section"><a href="#Setting-paper-size">Setting paper size</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fPAPERSIZE-3"><code>R_PAPERSIZE</code></a></td><td class="printindex-index-section"><a href="#Making-manuals">Making manuals</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fPDFVIEWER"><code>R_PDFVIEWER</code></a></td><td class="printindex-index-section"><a href="#Setting-the-browsers">Setting the browsers</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fRD4PDF"><code>R_RD4PDF</code></a></td><td class="printindex-index-section"><a href="#Making-the-manuals">Making the manuals</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fRD4PDF-1"><code>R_RD4PDF</code></a></td><td class="printindex-index-section"><a href="#Making-manuals">Making manuals</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fSCRIPT_005fDEFAULT_005fPACKAGES"><code>R_SCRIPT_DEFAULT_PACKAGES</code></a></td><td class="printindex-index-section"><a href="#Default-packages">Default packages</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-R_005fUSER"><code>R_USER</code></a></td><td class="printindex-index-section"><a href="#Running-R">Running R</a></td></tr> +<tr><td colspan="3"><hr></td></tr> +<tr><th id="Environment-variable-index_en_letter-T">T</th></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TAR"><code>TAR</code></a></td><td class="printindex-index-section"><a href="#Essential-programs-and-libraries">Essential programs and libraries</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TAR_005fOPTIONS"><code>TAR_OPTIONS</code></a></td><td class="printindex-index-section"><a href="#Getting-and-unpacking-the-sources">Getting and unpacking the sources</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TEMP"><code>TEMP</code></a></td><td class="printindex-index-section"><a href="#Running-R">Running R</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TMP"><code>TMP</code></a></td><td class="printindex-index-section"><a href="#Running-R">Running R</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TMPDIR"><code>TMPDIR</code></a></td><td class="printindex-index-section"><a href="#Simple-compilation">Simple compilation</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TMPDIR-1"><code>TMPDIR</code></a></td><td class="printindex-index-section"><a href="#Running-R">Running R</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TMPDIR-2"><code>TMPDIR</code></a></td><td class="printindex-index-section"><a href="#Running-R">Running R</a></td></tr> +<tr><td></td><td class="printindex-index-entry"><a href="#index-TMPDIR-3"><code>TMPDIR</code></a></td><td class="printindex-index-section"><a href="#Installing-packages">Installing packages</a></td></tr> +<tr><td colspan="3"><hr></td></tr> </table> -<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Environment-variable-index_en_letter-B"><b>B</b></a> +<table class="en-letters-footer-printindex"><tr><th>Jump to: </th><td><a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-B"><b>B</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-C"><b>C</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-C"><b>C</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-D"><b>D</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-D"><b>D</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-J"><b>J</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-J"><b>J</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-L"><b>L</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-L"><b>L</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-P"><b>P</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-P"><b>P</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-R"><b>R</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-R"><b>R</b></a> -<a class="summary-letter" href="#Environment-variable-index_en_letter-T"><b>T</b></a> +<a class="summary-letter-printindex" href="#Environment-variable-index_en_letter-T"><b>T</b></a> </td></tr></table> +</div> </div> </div> -<div class="footnote"> +<div class="footnotes-segment"> <hr> <h4 class="footnotes-heading">Footnotes</h4> -<h5><a id="FOOT1" href="#DOCF1">(1)</a></h5> -<p>e.g. <acronym>GNU</acronym> -<code>tar</code> version 1.15 or later, or that from the ‘<samp>libarchive</samp>’ +<h5 class="footnote-body-heading"><a id="FOOT1" href="#DOCF1">(1)</a></h5> +<p>e.g. <abbr class="acronym">GNU</abbr> +<code class="command">tar</code> version 1.15 or later, or that from the ‘<samp class="samp">libarchive</samp>’ (as used on macOS) or ‘Heirloom Toolchest’ distributions.</p> -<h5><a id="FOOT2" href="#DOCF2">(2)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT2" href="#DOCF2">(2)</a></h5> <p>for some Subversion clients -‘<samp>http:</samp>’ may appear to work, but requires continual redirection.</p> -<h5><a id="FOOT3" href="#DOCF3">(3)</a></h5> +‘<samp class="samp">http:</samp>’ may appear to work, but requires continual redirection.</p> +<h5 class="footnote-body-heading"><a id="FOOT3" href="#DOCF3">(3)</a></h5> <p>aka ‘Apple Silicon’, known to -some as ‘<samp>arm64-apple-darwin</samp>’.</p> -<h5><a id="FOOT4" href="#DOCF4">(4)</a></h5> -<p>which use <samp>lib</samp> rather than -<samp>lib64</samp> for their primary 64-bit library directories: attempts are +some as ‘<samp class="samp">arm64-apple-darwin</samp>’.</p> +<h5 class="footnote-body-heading"><a id="FOOT4" href="#DOCF4">(4)</a></h5> +<p>which use <samp class="file">lib</samp> rather than +<samp class="file">lib64</samp> for their primary 64-bit library directories: attempts are made to detect such systems.</p> -<h5><a id="FOOT5" href="#DOCF5">(5)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT5" href="#DOCF5">(5)</a></h5> <p>not by the version supplied by macOS.</p> -<h5><a id="FOOT6" href="#DOCF6">(6)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT6" href="#DOCF6">(6)</a></h5> <p>Instructions on how to install the latest version are at -<a href="https://www.ctan.org/tex-archive/fonts/inconsolata/">https://www.ctan.org/tex-archive/fonts/inconsolata/</a>.</p> -<h5><a id="FOOT7" href="#DOCF7">(7)</a></h5> +<a class="uref" href="https://www.ctan.org/tex-archive/fonts/inconsolata/">https://www.ctan.org/tex-archive/fonts/inconsolata/</a>.</p> +<h5 class="footnote-body-heading"><a id="FOOT7" href="#DOCF7">(7)</a></h5> <p>on a -Unix-alike, ‘<samp>inconsolata</samp>’ is omitted if not found by -<code>configure</code>.</p> -<h5><a id="FOOT8" href="#DOCF8">(8)</a></h5> +Unix-alike, ‘<samp class="samp">inconsolata</samp>’ is omitted if not found by +<code class="command">configure</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT8" href="#DOCF8">(8)</a></h5> <p>This will be needed if more than one sub-architecture is to be installed.</p> -<h5><a id="FOOT9" href="#DOCF9">(9)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT9" href="#DOCF9">(9)</a></h5> <p>How to prepare such a directory is described in file -<samp>src/extra/tzone/Notes</samp> in the R sources.</p> -<h5><a id="FOOT10" href="#DOCF10">(10)</a></h5> +<samp class="file">src/extra/tzone/Notes</samp> in the R sources.</p> +<h5 class="footnote-body-heading"><a id="FOOT10" href="#DOCF10">(10)</a></h5> <p>But on Windows problems have been seen with case-changing functions on accented Latin-1 characters.</p> -<h5><a id="FOOT11" href="#DOCF11">(11)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT11" href="#DOCF11">(11)</a></h5> <p>for -example, <samp>-fopenmp</samp>, <samp>-fiopenmp</samp>, <samp>-xopenmp</samp> or -<samp>-qopenmp</samp>. This includes for <code>clang</code> and the Intel and +example, <samp class="option">-fopenmp</samp>, <samp class="option">-fiopenmp</samp>, <samp class="option">-xopenmp</samp> or +<samp class="option">-qopenmp</samp>. This includes for <code class="command">clang</code> and the Intel and Oracle compilers.</p> -<h5><a id="FOOT12" href="#DOCF12">(12)</a></h5> -<p>This does not necessarily disable <em>use</em> of -<abbr>OpenMP</abbr> – the <code>configure</code> code allows for platforms where <abbr>OpenMP</abbr> -is used without a flag. For the <code>flang</code> compiler in late 2017, -the Fortran runtime always used <abbr>OpenMP</abbr>.</p> -<h5><a id="FOOT13" href="#DOCF13">(13)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT12" href="#DOCF12">(12)</a></h5> +<p>This does not necessarily disable <em class="emph">use</em> of +<abbr class="abbr">OpenMP</abbr> – the <code class="command">configure</code> code allows for platforms where <abbr class="abbr">OpenMP</abbr> +is used without a flag. For the <code class="command">flang</code> compiler in late 2017, +the Fortran runtime always used <abbr class="abbr">OpenMP</abbr>.</p> +<h5 class="footnote-body-heading"><a id="FOOT13" href="#DOCF13">(13)</a></h5> <p>Then recommended packages -installed as part of the R installation do use <abbr>LTO</abbr>, but not packages +installed as part of the R installation do use <abbr class="abbr">LTO</abbr>, but not packages installed later.</p> -<h5><a id="FOOT14" href="#DOCF14">(14)</a></h5> -<p>A complete <acronym>CRAN</acronym> installation reduced from 50 +<h5 class="footnote-body-heading"><a id="FOOT14" href="#DOCF14">(14)</a></h5> +<p>A complete <abbr class="acronym">CRAN</abbr> installation reduced from 50 to 35GB.</p> -<h5><a id="FOOT15" href="#DOCF15">(15)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT15" href="#DOCF15">(15)</a></h5> <p>although there is the possibility to exclude Fortran but that misses some of the benefits.</p> -<h5><a id="FOOT16" href="#DOCF16">(16)</a></h5> -<p>not <code>NM</code> as we found <code>make</code> +<h5 class="footnote-body-heading"><a id="FOOT16" href="#DOCF16">(16)</a></h5> +<p>not <code class="env">NM</code> as we found <code class="command">make</code> overriding that.</p> -<h5><a id="FOOT17" href="#DOCF17">(17)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT17" href="#DOCF17">(17)</a></h5> <p>probably also 8.4 and later.</p> -<h5><a id="FOOT18" href="#DOCF18">(18)</a></h5> -<p>There are reports of segfaults when ‘<samp>MiKTeX</samp>’ -installs additional packages when making <samp>NEWS.pdf</samp>: re-running -<code>make</code> seems to solve this.</p> -<h5><a id="FOOT19" href="#DOCF19">(19)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT18" href="#DOCF18">(18)</a></h5> +<p>There are reports of segfaults when ‘<samp class="samp">MiKTeX</samp>’ +installs additional packages when making <samp class="file">NEWS.pdf</samp>: re-running +<code class="command">make</code> seems to solve this.</p> +<h5 class="footnote-body-heading"><a id="FOOT19" href="#DOCF19">(19)</a></h5> <p>At the time of writing, version 2.8.5 or later.</p> -<h5><a id="FOOT20" href="#DOCF20">(20)</a></h5> -<p>The installer puts links to <code>R</code> and -<code>Rscript</code> in <samp>/usr/local/bin</samp>. If these are missing or +<h5 class="footnote-body-heading"><a id="FOOT20" href="#DOCF20">(20)</a></h5> +<p>The installer puts links to <code class="command">R</code> and +<code class="command">Rscript</code> in <samp class="file">/usr/local/bin</samp>. If these are missing or that is not on your path, you can run directly the copies in -<samp>/Library/Frameworks/R.framework/Resources/bin</samp> or link those +<samp class="file">/Library/Frameworks/R.framework/Resources/bin</samp> or link those yourself to somewhere on your path.</p> -<h5><a id="FOOT21" href="#DOCF21">(21)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT21" href="#DOCF21">(21)</a></h5> <p>Formerly known as the Trash.</p> -<h5><a id="FOOT22" href="#DOCF22">(22)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT22" href="#DOCF22">(22)</a></h5> <p>At the -time of writing: use <code>pkgutil --pkgs | grep -i org.r-project</code> to +time of writing: use <code class="command">pkgutil --pkgs | grep -i org.r-project</code> to check.</p> -<h5><a id="FOOT23" href="#DOCF23">(23)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT23" href="#DOCF23">(23)</a></h5> <p>More precisely, of the Apple package of the same name: this means that ARM and Intel versions can be installed together.</p> -<h5><a id="FOOT24" href="#DOCF24">(24)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT24" href="#DOCF24">(24)</a></h5> <p>Including GCC 9 on Linux.</p> -<h5><a id="FOOT25" href="#DOCF25">(25)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT25" href="#DOCF25">(25)</a></h5> <p>On Windows a path containing spaces will be replaced by the ‘short path’ version if that does not contain spaces.</p> -<h5><a id="FOOT26" href="#DOCF26">(26)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT26" href="#DOCF26">(26)</a></h5> <p>unless they were excluded in the build.</p> -<h5><a id="FOOT27" href="#DOCF27">(27)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT27" href="#DOCF27">(27)</a></h5> <p>its binding is locked once the startup files have been -read, so users cannot easily change it. See <code>?.libPaths</code> for how +read, so users cannot easily change it. See <code class="code">?.libPaths</code> for how to make use of the new value.</p> -<h5><a id="FOOT28" href="#DOCF28">(28)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT28" href="#DOCF28">(28)</a></h5> <p>If a proxy needs to be set, see -<code>?download.file</code>.</p> -<h5><a id="FOOT29" href="#DOCF29">(29)</a></h5> +<code class="command">?download.file</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT29" href="#DOCF29">(29)</a></h5> <p>for a small number of -<acronym>CRAN</acronym> packages where this is known to be safe and is needed by +<abbr class="acronym">CRAN</abbr> packages where this is known to be safe and is needed by the autobuilder this is the default. Look at the source of -<samp>tools:::.install_packages</samp> for the list. It can also be specified -in the package’s <samp>DESCRIPTION</samp> file.</p> -<h5><a id="FOOT30" href="#DOCF30">(30)</a></h5> +<samp class="file">tools:::.install_packages</samp> for the list. It can also be specified +in the package’s <samp class="file">DESCRIPTION</samp> file.</p> +<h5 class="footnote-body-heading"><a id="FOOT30" href="#DOCF30">(30)</a></h5> <p>Note that capitalization and versioning may differ from the Open Source project.</p> -<h5><a id="FOOT31" href="#DOCF31">(31)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT31" href="#DOCF31">(31)</a></h5> <p>using a path containing spaces is likely to cause problems</p> -<h5><a id="FOOT32" href="#DOCF32">(32)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT32" href="#DOCF32">(32)</a></h5> <p>They need -to have been created using <samp>-headerpad_max_install_names</samp>, which +to have been created using <samp class="option">-headerpad_max_install_names</samp>, which is the default for an R package.</p> -<h5><a id="FOOT33" href="#DOCF33">(33)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT33" href="#DOCF33">(33)</a></h5> <p>‘X/Open Portability Guide’, which has had several versions.</p> -<h5><a id="FOOT34" href="#DOCF34">(34)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT34" href="#DOCF34">(34)</a></h5> <p>On some systems setting -<code>LC_ALL</code> or <code>LC_MESSAGES</code> to ‘<samp>C</samp>’ disables <code>LANGUAGE</code>.</p> -<h5><a id="FOOT35" href="#DOCF35">(35)</a></h5> +<code class="env">LC_ALL</code> or <code class="env">LC_MESSAGES</code> to ‘<samp class="samp">C</samp>’ disables <code class="env">LANGUAGE</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT35" href="#DOCF35">(35)</a></h5> <p>If you try changing from French to Russian except in a UTF-8 locale, you may find messages change to English.</p> -<h5><a id="FOOT36" href="#DOCF36">(36)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT36" href="#DOCF36">(36)</a></h5> <p>the language written in England: some people living in the USA appropriate this name for their language.</p> -<h5><a id="FOOT37" href="#DOCF37">(37)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT37" href="#DOCF37">(37)</a></h5> <p>with Americanisms.</p> -<h5><a id="FOOT38" href="#DOCF38">(38)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT38" href="#DOCF38">(38)</a></h5> <p>e.g. Bessel, beta and gamma functions</p> -<h5><a id="FOOT39" href="#DOCF39">(39)</a></h5> -<p>including copying <samp>MkRules.dist</samp> to -<samp>MkRule.local</samp> and selecting the architecture.</p> -<h5><a id="FOOT40" href="#DOCF40">(40)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT39" href="#DOCF39">(39)</a></h5> +<p>including copying <samp class="file">MkRules.dist</samp> to +<samp class="file">MkRule.local</samp> and selecting the architecture.</p> +<h5 class="footnote-body-heading"><a id="FOOT40" href="#DOCF40">(40)</a></h5> <p>also known as -<acronym>IEEE</acronym> 754</p> -<h5><a id="FOOT41" href="#DOCF41">(41)</a></h5> +<abbr class="acronym">IEEE</abbr> 754</p> +<h5 class="footnote-body-heading"><a id="FOOT41" href="#DOCF41">(41)</a></h5> <p>Note that C11 compilers need not be C99-compliant: R requires support for -<code>double complex</code> and variable-length arrays which are optional in +<code class="code">double complex</code> and variable-length arrays which are optional in C11 but are mandatory in C99. C17 (also known as C18 as it was published in 2018) is a ‘bugfix release’ of C11, clarifying the standard. However, all known recent compilers in C11 or C17 mode are C99-compliant, and most default to C17.</p> -<h5><a id="FOOT42" href="#DOCF42">(42)</a></h5> -<p>Examples are <samp>-std=gnu99</samp>, <samp>-std=c99</samp> and -<samp>-c99</samp>.</p> -<h5><a id="FOOT43" href="#DOCF43">(43)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT42" href="#DOCF42">(42)</a></h5> +<p>Examples are <samp class="option">-std=gnu99</samp>, <samp class="option">-std=c99</samp> and +<samp class="option">-c99</samp>.</p> +<h5 class="footnote-body-heading"><a id="FOOT43" href="#DOCF43">(43)</a></h5> <p>However, it is possible to break -the default behaviour of <code>glibc</code> by re-specifying the <code>gconv</code> +the default behaviour of <code class="code">glibc</code> by re-specifying the <code class="code">gconv</code> modules to be loaded.</p> -<h5><a id="FOOT44" href="#DOCF44">(44)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT44" href="#DOCF44">(44)</a></h5> <p>specifically, the C99 -functionality of headers <samp>wchar.h</samp> and <samp>wctype.h</samp>, types -<code>wctans_t</code> and <code>mbstate_t</code> and functions <code>mbrtowc</code>, -<code>mbstowcs</code>, <code>wcrtomb</code>, <code>wcscoll</code>, <code>wcstombs</code>, -<code>wctrans</code>, <code>wctype</code>, and <code>iswctype</code>.</p> -<h5><a id="FOOT45" href="#DOCF45">(45)</a></h5> -<p>including <code>expm1</code>, <code>hypot</code>, <code>log1p</code>, -<code>nearbyint</code> and <code>va_copy</code>.</p> -<h5><a id="FOOT46" href="#DOCF46">(46)</a></h5> +functionality of headers <samp class="file">wchar.h</samp> and <samp class="file">wctype.h</samp>, types +<code class="code">wctans_t</code> and <code class="code">mbstate_t</code> and functions <code class="code">mbrtowc</code>, +<code class="code">mbstowcs</code>, <code class="code">wcrtomb</code>, <code class="code">wcscoll</code>, <code class="code">wcstombs</code>, +<code class="code">wctrans</code>, <code class="code">wctype</code>, and <code class="code">iswctype</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT45" href="#DOCF45">(45)</a></h5> +<p>including <code class="code">expm1</code>, <code class="code">hypot</code>, <code class="code">log1p</code>, +<code class="code">nearbyint</code> and <code class="code">va_copy</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT46" href="#DOCF46">(46)</a></h5> <p>including -<code>opendir</code>, <code>readdir</code>, <code>closedir</code>, <code>popen</code>, -<code>stat</code>, <code>glob</code>, <code>access</code>, <code>getcwd</code> and <code>chdir</code> -system calls, <code>select</code> on a Unix-alike, and either <code>putenv</code> or -<code>setenv</code>.</p> -<h5><a id="FOOT47" href="#DOCF47">(47)</a></h5> +<code class="code">opendir</code>, <code class="code">readdir</code>, <code class="code">closedir</code>, <code class="code">popen</code>, +<code class="code">stat</code>, <code class="code">glob</code>, <code class="code">access</code>, <code class="code">getcwd</code> and <code class="code">chdir</code> +system calls, <code class="code">select</code> on a Unix-alike, and either <code class="code">putenv</code> or +<code class="code">setenv</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT47" href="#DOCF47">(47)</a></h5> <p>such as -<code>realpath</code>, <code>symlink</code>.</p> -<h5><a id="FOOT48" href="#DOCF48">(48)</a></h5> -<p>most often distributed as part of <code>xz</code>: +<code class="code">realpath</code>, <code class="code">symlink</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT48" href="#DOCF48">(48)</a></h5> +<p>most often distributed as part of <code class="code">xz</code>: possible names in Linux distributions include -<code>xz-devel</code>/<code>xz-libs</code> and <code>liblzma-dev</code>.</p> -<h5><a id="FOOT49" href="#DOCF49">(49)</a></h5> +<code class="code">xz-devel</code>/<code class="code">xz-libs</code> and <code class="code">liblzma-dev</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT49" href="#DOCF49">(49)</a></h5> <p>for example to specify static linking with a build which has both shared and static libraries.</p> -<h5><a id="FOOT50" href="#DOCF50">(50)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT50" href="#DOCF50">(50)</a></h5> <p>Such as -<acronym>GNU</acronym> <code>tar</code> 1.15 or later, <code>bsdtar</code> (from -<a href="https://github.com/libarchive/libarchive/">https://github.com/libarchive/libarchive/</a>, used as -<code>tar</code> by FreeBSD and macOS 10.6 and later) or <code>tar</code> from +<abbr class="acronym">GNU</abbr> <code class="command">tar</code> 1.15 or later, <code class="command">bsdtar</code> (from +<a class="uref" href="https://github.com/libarchive/libarchive/">https://github.com/libarchive/libarchive/</a>, used as +<code class="command">tar</code> by FreeBSD and macOS 10.6 and later) or <code class="command">tar</code> from the Heirloom Toolchest -(<a href="https://heirloom.sourceforge.net/tools.html">https://heirloom.sourceforge.net/tools.html</a>), although the -latter does not support <code>xz</code> compression.</p> -<h5><a id="FOOT51" href="#DOCF51">(51)</a></h5> -<p><code>texi2dvi</code> is normally a shell +(<a class="uref" href="https://heirloom.sourceforge.net/tools.html">https://heirloom.sourceforge.net/tools.html</a>), although the +latter does not support <code class="command">xz</code> compression.</p> +<h5 class="footnote-body-heading"><a id="FOOT51" href="#DOCF51">(51)</a></h5> +<p><code class="command">texi2dvi</code> is normally a shell script. Some of the issues which have been observed with broken -versions of <code>texi2dvi</code> can be circumvented by setting the -environment variable <code>R_TEXI2DVICMD</code> to the value <code>emulation</code>.</p> -<h5><a id="FOOT52" href="#DOCF52">(52)</a></h5> +versions of <code class="command">texi2dvi</code> can be circumvented by setting the +environment variable <code class="env">R_TEXI2DVICMD</code> to the value <code class="code">emulation</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT52" href="#DOCF52">(52)</a></h5> <p>If necessary the path to -<code>pkg-config</code> can be specified by setting <code>PKG_CONFIG</code> in -<samp>config.site</samp>, on the <code>configure</code> command line or in the +<code class="command">pkg-config</code> can be specified by setting <code class="env">PKG_CONFIG</code> in +<samp class="file">config.site</samp>, on the <code class="command">configure</code> command line or in the environment. There is a compatible re-implementation of -<code>pkg-config</code> called <code>pkgconf</code> which can be used in the +<code class="command">pkg-config</code> called <code class="command">pkgconf</code> which can be used in the unlikely event that is installed but not linked to -<code>pkg-config</code>.</p> -<h5><a id="FOOT53" href="#DOCF53">(53)</a></h5> -<p>also known as <code>ttf-mscorefonts-installer</code> in the +<code class="command">pkg-config</code>.</p> +<h5 class="footnote-body-heading"><a id="FOOT53" href="#DOCF53">(53)</a></h5> +<p>also known as <code class="code">ttf-mscorefonts-installer</code> in the Debian/Ubuntu world: see also -<a href="https://en.wikipedia.org/wiki/Core_fonts_for_the_Web">https://en.wikipedia.org/wiki/Core_fonts_for_the_Web</a>.</p> -<h5><a id="FOOT54" href="#DOCF54">(54)</a></h5> -<p><code>ttf-liberation</code> +<a class="uref" href="https://en.wikipedia.org/wiki/Core_fonts_for_the_Web">https://en.wikipedia.org/wiki/Core_fonts_for_the_Web</a>.</p> +<h5 class="footnote-body-heading"><a id="FOOT54" href="#DOCF54">(54)</a></h5> +<p><code class="code">ttf-liberation</code> in Debian/Ubuntu.</p> -<h5><a id="FOOT55" href="#DOCF55">(55)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT55" href="#DOCF55">(55)</a></h5> <p>Including that used by Fedora 28 and later</p> -<h5><a id="FOOT56" href="#DOCF56">(56)</a></h5> -<p>R uses <samp>rpc/xdr.h</samp> but that includes -<samp>netconfig.h</samp> from the top <samp>tirpc</samp> directory.</p> -<h5><a id="FOOT57" href="#DOCF57">(57)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT56" href="#DOCF56">(56)</a></h5> +<p>R uses <samp class="file">rpc/xdr.h</samp> but that includes +<samp class="file">netconfig.h</samp> from the top <samp class="file">tirpc</samp> directory.</p> +<h5 class="footnote-body-heading"><a id="FOOT57" href="#DOCF57">(57)</a></h5> <p>This is true even for the ‘Aqua’ version of Tk on macOS, but distributions of that include a copy of the X11 files needed.</p> -<h5><a id="FOOT58" href="#DOCF58">(58)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT58" href="#DOCF58">(58)</a></h5> <p>The search order is currently OpenBLAS, BLIS, ATLAS, platform-specific choices (see -below) and finally a generic <samp>libblas</samp>.</p> -<h5><a id="FOOT59" href="#DOCF59">(59)</a></h5> +below) and finally a generic <samp class="file">libblas</samp>.</p> +<h5 class="footnote-body-heading"><a id="FOOT59" href="#DOCF59">(59)</a></h5> <p>Using -the Oracle Developer Studio <code>cc</code> and <code>f95</code> compilers</p> -<h5><a id="FOOT60" href="#DOCF60">(60)</a></h5> +the Oracle Developer Studio <code class="command">cc</code> and <code class="command">f95</code> compilers</p> +<h5 class="footnote-body-heading"><a id="FOOT60" href="#DOCF60">(60)</a></h5> <p>for example, Intel MKL not packaged by Fedora.</p> -<h5><a id="FOOT61" href="#DOCF61">(61)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT61" href="#DOCF61">(61)</a></h5> <p>The only way to see exactly which CPUs the distributed libraries have been tuned for is to -read the <samp>atlas.spec</samp> file.</p> -<h5><a id="FOOT62" href="#DOCF62">(62)</a></h5> -<p><a href="https://math-atlas.sourceforge.net/atlas_install/">https://math-atlas.sourceforge.net/atlas_install/</a></p> -<h5><a id="FOOT63" href="#DOCF63">(63)</a></h5> -<p><a href="https://math-atlas.sourceforge.net/faq.html#tnum">https://math-atlas.sourceforge.net/faq.html#tnum</a></p> -<h5><a id="FOOT64" href="#DOCF64">(64)</a></h5> +read the <samp class="file">atlas.spec</samp> file.</p> +<h5 class="footnote-body-heading"><a id="FOOT62" href="#DOCF62">(62)</a></h5> +<p><a class="uref" href="https://math-atlas.sourceforge.net/atlas_install/">https://math-atlas.sourceforge.net/atlas_install/</a></p> +<h5 class="footnote-body-heading"><a id="FOOT63" href="#DOCF63">(63)</a></h5> +<p><a class="uref" href="https://math-atlas.sourceforge.net/faq.html#tnum">https://math-atlas.sourceforge.net/faq.html#tnum</a></p> +<h5 class="footnote-body-heading"><a id="FOOT64" href="#DOCF64">(64)</a></h5> <p>(and more, e.g. for 64-bit ints and static versions).</p> -<h5><a id="FOOT65" href="#DOCF65">(65)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT65" href="#DOCF65">(65)</a></h5> <p>Nowadays known as ‘Intel oneAPI Math Kernel Library’ or even ‘oneMKL’.</p> -<h5><a id="FOOT66" href="#DOCF66">(66)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT66" href="#DOCF66">(66)</a></h5> <p>The issue for macOS has been the use of double-complex routines.</p> -<h5><a id="FOOT67" href="#DOCF67">(67)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT67" href="#DOCF67">(67)</a></h5> <p>ATLAS, OpenBLAS and Accelerate.</p> -<h5><a id="FOOT68" href="#DOCF68">(68)</a></h5> -<p>We have measured 15–20% on ‘<samp>i686</samp>’ Linux -and around 10% on ‘<samp>x86_64</samp>’ Linux.</p> -<h5><a id="FOOT69" href="#DOCF69">(69)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT68" href="#DOCF68">(68)</a></h5> +<p>We have measured 15–20% on ‘<samp class="samp">i686</samp>’ Linux +and around 10% on ‘<samp class="samp">x86_64</samp>’ Linux.</p> +<h5 class="footnote-body-heading"><a id="FOOT69" href="#DOCF69">(69)</a></h5> <p>at the time of revision of -this para in early 2024, <strong>autoconf-2.72</strong> and -<strong>automake-1.16.5</strong>. Previously <strong>autoconf-2.71</strong> was used.</p> -<h5><a id="FOOT70" href="#DOCF70">(70)</a></h5> +this para in early 2024, <strong class="strong">autoconf-2.72</strong> and +<strong class="strong">automake-1.16.5</strong>. Previously <strong class="strong">autoconf-2.71</strong> was used.</p> +<h5 class="footnote-body-heading"><a id="FOOT70" href="#DOCF70">(70)</a></h5> <p>The links there have proved difficult to access, in which case grab the copy made available at -<a href="https://developer.r-project.org/noweb-2.11b.tgz">https://developer.r-project.org/noweb-2.11b.tgz</a>.</p> -<h5><a id="FOOT71" href="#DOCF71">(71)</a></h5> -<p>Most <code>clang</code>-based -compilers give <code>4</code>, but not those distributed by FreeBSD. Intel’s -<code>icx</code> reported <code>12</code> in 2023.</p> -<h5><a id="FOOT72" href="#DOCF72">(72)</a></h5> -<p>for example, <code>X11 font at size 14 could not +<a class="uref" href="https://developer.r-project.org/noweb-2.11b.tgz">https://developer.r-project.org/noweb-2.11b.tgz</a>.</p> +<h5 class="footnote-body-heading"><a id="FOOT71" href="#DOCF71">(71)</a></h5> +<p>Most <code class="command">clang</code>-based +compilers give <code class="code">4</code>, but not those distributed by FreeBSD. Intel’s +<code class="command">icx</code> reported <code class="code">12</code> in 2023.</p> +<h5 class="footnote-body-heading"><a id="FOOT72" href="#DOCF72">(72)</a></h5> +<p>for example, <code class="code">X11 font at size 14 could not be loaded</code>.</p> -<h5><a id="FOOT73" href="#DOCF73">(73)</a></h5> -<p>For example, <code>glibc</code>: other C libraries such as -<code>musl</code> (as used by Alpine Linux) have been used but are not +<h5 class="footnote-body-heading"><a id="FOOT73" href="#DOCF73">(73)</a></h5> +<p>For example, <code class="code">glibc</code>: other C libraries such as +<code class="code">musl</code> (as used by Alpine Linux) have been used but are not routinely tested.</p> -<h5><a id="FOOT74" href="#DOCF74">(74)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT74" href="#DOCF74">(74)</a></h5> <p>This -also needs the <abbr>OpenMP</abbr> runtime which has sometimes been distributed +also needs the <abbr class="abbr">OpenMP</abbr> runtime which has sometimes been distributed separately.</p> -<h5><a id="FOOT75" href="#DOCF75">(75)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT75" href="#DOCF75">(75)</a></h5> <p>as the ‘Classic’ compiler has been known on Windows.</p> -<h5><a id="FOOT76" href="#DOCF76">(76)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT76" href="#DOCF76">(76)</a></h5> <p>it -will if R has been installed from <acronym>CRAN</acronym> since R 4.3.0.</p> -<h5><a id="FOOT77" href="#DOCF77">(77)</a></h5> +will if R has been installed from <abbr class="acronym">CRAN</abbr> since R 4.3.0.</p> +<h5 class="footnote-body-heading"><a id="FOOT77" href="#DOCF77">(77)</a></h5> <p>If compiling it from source on -‘<samp>arm64</samp>’, <code>pcre2</code> (at least up to version 10.39) needs to +‘<samp class="samp">arm64</samp>’, <code class="code">pcre2</code> (at least up to version 10.39) needs to be built without JIT support (the default) as the R build segfaults -if that is enabled, so do run <code>make check</code> on your build.</p> -<h5><a id="FOOT78" href="#DOCF78">(78)</a></h5> +if that is enabled, so do run <code class="code">make check</code> on your build.</p> +<h5 class="footnote-body-heading"><a id="FOOT78" href="#DOCF78">(78)</a></h5> <p>For licence reasons this is version -5.2 of <code>readline</code>: for those who want a more recent version it is +5.2 of <code class="code">readline</code>: for those who want a more recent version it is straightforward to compile it from its sources.</p> -<h5><a id="FOOT79" href="#DOCF79">(79)</a></h5> -<p><code>ls -l `xcrun --show-sdk-path`</code> in a terminal will show you which <abbr>SDK</abbr> is selected.</p> -<h5><a id="FOOT80" href="#DOCF80">(80)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT79" href="#DOCF79">(79)</a></h5> +<p><code class="command">ls -l `xcrun +-show-sdk-path`</code> in a terminal will show you which <abbr class="abbr">SDK</abbr> is selected.</p> +<h5 class="footnote-body-heading"><a id="FOOT80" href="#DOCF80">(80)</a></h5> <p>See -<a href="https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution">https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution</a>.</p> -<h5><a id="FOOT81" href="#DOCF81">(81)</a></h5> +<a class="uref" href="https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution">https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution</a>.</p> +<h5 class="footnote-body-heading"><a id="FOOT81" href="#DOCF81">(81)</a></h5> <p>An essentially equivalent TeX installation can be obtained by the Unix TeX Live installation scripts.</p> -<h5><a id="FOOT82" href="#DOCF82">(82)</a></h5> -<p>E.g. <em>via</em> <code>tlmgr install helvetic +<h5 class="footnote-body-heading"><a id="FOOT82" href="#DOCF82">(82)</a></h5> +<p>E.g. <em class="emph">via</em> <code class="command">tlmgr install helvetic inconsolata texinfo</code> .</p> -<h5><a id="FOOT83" href="#DOCF83">(83)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT83" href="#DOCF83">(83)</a></h5> <p>Adding all the -packages needed to check <acronym>CRAN</acronym> increased this to about 600MB.</p> -<h5><a id="FOOT84" href="#DOCF84">(84)</a></h5> -<p><a href="https://developer.apple.com/documentation/accelerate">https://developer.apple.com/documentation/accelerate</a>.</p> -<h5><a id="FOOT85" href="#DOCF85">(85)</a></h5> +packages needed to check <abbr class="acronym">CRAN</abbr> increased this to about 600MB.</p> +<h5 class="footnote-body-heading"><a id="FOOT84" href="#DOCF84">(84)</a></h5> +<p><a class="uref" href="https://developer.apple.com/documentation/accelerate">https://developer.apple.com/documentation/accelerate</a>.</p> +<h5 class="footnote-body-heading"><a id="FOOT85" href="#DOCF85">(85)</a></h5> <p>It has been reported that for some -non-Apple toolchains <code>CPPFLAGS</code> needed to contain -<code>-D__ACCELERATE__</code>: not needed for <code>clang</code> from LLVM.</p> -<h5><a id="FOOT86" href="#DOCF86">(86)</a></h5> -<p><a href="https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Which-BLAS-is-used-and-how-can-it-be-changed_003f">https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Which-BLAS-is-used-and-how-can-it-be-changed_003f</a></p> -<h5><a id="FOOT87" href="#DOCF87">(87)</a></h5> +non-Apple toolchains <code class="code">CPPFLAGS</code> needed to contain +<code class="code">-D__ACCELERATE__</code>: not needed for <code class="command">clang</code> from LLVM.</p> +<h5 class="footnote-body-heading"><a id="FOOT86" href="#DOCF86">(86)</a></h5> +<p><a class="url" href="https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Which-BLAS-is-used-and-how-can-it-be-changed_003f">https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Which-BLAS-is-used-and-how-can-it-be-changed_003f</a></p> +<h5 class="footnote-body-heading"><a id="FOOT87" href="#DOCF87">(87)</a></h5> <p>Released 2021-04-01.</p> -<h5><a id="FOOT88" href="#DOCF88">(88)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT88" href="#DOCF88">(88)</a></h5> <p>E.g., -<a href="https://en.wikipedia.org/wiki/Grand_Central_Dispatch">https://en.wikipedia.org/wiki/Grand_Central_Dispatch</a> .</p> -<h5><a id="FOOT89" href="#DOCF89">(89)</a></h5> +<a class="url" href="https://en.wikipedia.org/wiki/Grand_Central_Dispatch">https://en.wikipedia.org/wiki/Grand_Central_Dispatch</a> .</p> +<h5 class="footnote-body-heading"><a id="FOOT89" href="#DOCF89">(89)</a></h5> <p>Just that component can be selected from the installer for R: at the ‘Installation Type’ screen select ‘Customise’ and then just the ‘Tcl/Tk 8.6.11’ component.</p> -<h5><a id="FOOT90" href="#DOCF90">(90)</a></h5> +<h5 class="footnote-body-heading"><a id="FOOT90" href="#DOCF90">(90)</a></h5> <p>Configure -Tk with <samp>--enable-aqua</samp>.</p> -<h5><a id="FOOT91" href="#DOCF91">(91)</a></h5> +Tk with <samp class="option">--enable-aqua</samp>.</p> +<h5 class="footnote-body-heading"><a id="FOOT91" href="#DOCF91">(91)</a></h5> <p>The planned nextLTS release is 25 in September 2025. Java 8 -<em>aka</em> 1.8.0 is still LTS but some packages require 11 or later.</p> -<h5><a id="FOOT92" href="#DOCF92">(92)</a></h5> +<em class="emph">aka</em> 1.8.0 is still LTS but some packages require 11 or later.</p> +<h5 class="footnote-body-heading"><a id="FOOT92" href="#DOCF92">(92)</a></h5> <p>which website works with Safari but not some other browsers.</p> </div> diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/html/resources.html R-patched/doc/html/resources.html --- R-release-orig/doc/html/resources.html 2024-10-31 09:02:39.000000000 +0100 +++ R-patched/doc/html/resources.html 2024-11-25 01:32:25.049541250 +0100 @@ -1,6 +1,6 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>R Resources</title> @@ -18,21 +18,8 @@ <link href="dir.html#Top" rel="prev" title="(dir)"> <style type="text/css"> <!-- -a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em} -a.summary-letter {text-decoration: none} -blockquote.indentedblock {margin-right: 0em} -div.display {margin-left: 3.2em} -div.example {margin-left: 3.2em} -kbd {font-style: oblique} -pre.display {font-family: inherit} -pre.format {font-family: inherit} -pre.menu-comment {font-family: serif} -pre.menu-preformatted {font-family: serif} -span.nolinebreak {white-space: nowrap} -span.roman {font-family: initial; font-weight: normal} -span.sansserif {font-family: sans-serif; font-weight: normal} -span:hover a.copiable-anchor {visibility: visible} -ul.no-bullet {list-style: none} +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} @media screen { .container { padding-right: 10px; @@ -171,7 +158,6 @@ </head> <body lang="en"> -<h1 class="settitle" align="center">R Resources</h1> @@ -181,62 +167,62 @@ </h1> <hr> -<span id="Top"></span><h1 class="node-heading">Top</h1> +<h1 class="node" id="Top"><span>Top<a class="copiable-link" href="#Top"> ¶</a></span></h1> <hr> -<div class="chapter" id="FAQ"> -<span id="FAQ-1"></span><h3 class="section">1 FAQ</h3> +<div class="section-level-extent" id="FAQ"> +<h3 class="section chapter-level-set-section" id="FAQ-1"><span>1 FAQ<a class="copiable-link" href="#FAQ-1"> ¶</a></span></h3> -<p>A collection of <a href="faq.html">Frequently Asked Questions</a> and their -answers is maintained by <a href="mailto:Kurt.Hornik@R-project.org">Kurt Hornik</a> -and can be found at the <acronym>URL</acronym> +<p>A collection of <a class="uref" href="faq.html">Frequently Asked Questions</a> and their +answers is maintained by <a class="email" href="mailto:Kurt.Hornik@R-project.org">Kurt Hornik</a> +and can be found at the <abbr class="acronym">URL</abbr> </p> -<blockquote> -<p><a href="https://CRAN.R-project.org/doc/FAQ/R-FAQ.html">https://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a> +<blockquote class="quotation"> +<p><a class="uref" href="https://CRAN.R-project.org/doc/FAQ/R-FAQ.html">https://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a> </p></blockquote> <hr> </div> -<div class="chapter" id="Mailing-lists"> -<span id="Mailing-lists-1"></span><h3 class="section">2 Mailing lists</h3> +<div class="section-level-extent" id="Mailing-lists"> +<h3 class="section chapter-level-set-section" id="Mailing-lists-1"><span>2 Mailing lists<a class="copiable-link" href="#Mailing-lists-1"> ¶</a></span></h3> -<p>Thanks to <a href="mailto:Martin.Maechler@R-project.org">Martin Maechler</a> there +<p>Thanks to <a class="email" href="mailto:Martin.Maechler@R-project.org">Martin Maechler</a> there are a number of mailing lists which are used by R users and developers. See </p> -<blockquote> -<p><a href="https://www.R-project.org/mail.html">https://www.R-project.org/mail.html</a> +<blockquote class="quotation"> +<p><a class="uref" href="https://www.R-project.org/mail.html">https://www.R-project.org/mail.html</a> </p></blockquote> <p>for details. </p> <hr> </div> -<div class="chapter" id="Archives"> -<span id="Archives-1"></span><h3 class="section">3 Archives</h3> +<div class="section-level-extent" id="Archives"> +<h3 class="section chapter-level-set-section" id="Archives-1"><span>3 Archives<a class="copiable-link" href="#Archives-1"> ¶</a></span></h3> -<p>The Comprehensive R Archive Network (<acronym>CRAN</acronym>) is a collection of +<p>The Comprehensive R Archive Network (<abbr class="acronym">CRAN</abbr>) is a collection of sites which carry identical material, consisting of the R distribution(s), the contributed extensions, documentation for R, and -binaries, with the master site at <a href="https://CRAN.R-project.org/">https://CRAN.R-project.org/</a> and +binaries, with the master site at <a class="uref" href="https://CRAN.R-project.org/">https://CRAN.R-project.org/</a> and information on daily mirrors available from </p> -<blockquote> -<p><a href="https://CRAN.R-project.org/mirrors.html">https://CRAN.R-project.org/mirrors.html</a> +<blockquote class="quotation"> +<p><a class="uref" href="https://CRAN.R-project.org/mirrors.html">https://CRAN.R-project.org/mirrors.html</a> </p></blockquote> <hr> </div> -<div class="chapter" id="Bug_002dtracking-system"> -<span id="Bug_002dtracking-system-1"></span><h3 class="section">4 Bug-tracking system</h3> +<div class="section-level-extent" id="Bug_002dtracking-system"> +<h3 class="section chapter-level-set-section" id="Bug_002dtracking-system-1"><span>4 Bug-tracking system<a class="copiable-link" href="#Bug_002dtracking-system-1"> ¶</a></span></h3> <p>R has a bug-tracking system (or perhaps a bug-filing system is a more precise description) available on the net at </p> -<blockquote> -<p><a href="https://bugs.R-project.org/">https://bugs.R-project.org/</a> +<blockquote class="quotation"> +<p><a class="uref" href="https://bugs.R-project.org/">https://bugs.R-project.org/</a> </p></blockquote> </div> diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/manual/Makefile.in R-patched/doc/manual/Makefile.in --- R-release-orig/doc/manual/Makefile.in 2024-03-27 00:02:03.000000000 +0100 +++ R-patched/doc/manual/Makefile.in 2024-11-21 17:45:07.153343850 +0100 @@ -208,7 +208,9 @@ v="$${vv} (`sed -e 1d -e 's/^Last Changed Date: //' $(SVN_REV)`)"; \ $(ECHO) "@set VERSION $${v}" >> $@; \ rwv=`$(R_EXE) -f $(top_srcdir)/src/gnuwin32/fixed/rwver.R`; \ - $(ECHO) "@set RWVERSION $${rwv}" >> $@ ) + $(ECHO) "@set RWVERSION $${rwv}" >> $@; \ + rwtv=`$(ECHO) $${rwv} | sed -e 's/\.[^.]\+$$//'` >> $@; \ + $(ECHO) "@set RWTVERSION $${rwtv}" >> $@ ) @if test "$(R_PAPERSIZE)" = "a4"; then \ $(ECHO) "@afourpaper" >> $@ ; \ fi diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/manual/Makefile.win R-patched/doc/manual/Makefile.win --- R-release-orig/doc/manual/Makefile.win 2024-03-27 00:02:03.000000000 +0100 +++ R-patched/doc/manual/Makefile.win 2024-11-21 17:45:07.189053714 +0100 @@ -170,7 +170,9 @@ v="$${vv} (`sed -e 1d -e 's/^Last Changed Date: //' $(SVN_REV)`)"; \ $(ECHO) "@set VERSION $${v}" >> $@; \ rwv=$(shell ../../bin$(R_ARCH)/Rscript ../../src/gnuwin32/fixed/rwver.R); \ - $(ECHO) "@set RWVERSION $${rwv}" >> $@ ) + $(ECHO) "@set RWVERSION $${rwv}" >> $@; \ + rwtv=`$(ECHO) $${rwv} | sed -e 's/\.[^.]\+$$//'`; \ + $(ECHO) "@set RWTVERSION $${rwtv}" >> $@ ) @if test "$(R_PAPERSIZE)" = "a4"; then \ $(ECHO) "@afourpaper" >> $@ ; \ fi diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/manual/R-admin.texi R-patched/doc/manual/R-admin.texi --- R-release-orig/doc/manual/R-admin.texi 2024-09-29 00:15:00.000000000 +0200 +++ R-patched/doc/manual/R-admin.texi 2024-11-24 17:45:06.618167002 +0100 @@ -1102,7 +1102,7 @@ @subsection C standards Compiling @R{} requires C99 or later: C11 and C17 are minor updates, but -the substantial update planned for `C23' (now expected @emph{ca} April +the substantial update planned for `C23' (finally published in October 2024) will also be supported. As from @R{} 4.3.0 there is support for packages to indicate their @@ -1433,8 +1433,8 @@ from @uref{https://CRAN.R-project.org/bin/windows/Rtools/rtools44/rtools.html,Rtools44 for Windows}. See -@uref{https://CRAN.R-project.org/bin/windows/base/howto-R-devel.html, Building -R and packages} for more details on how to use it. +@uref{https://CRAN.R-project.org/bin/windows/base/howto-@value{RWTVERSION}.html, +Building @value{RWTVERSION} and packages on Windows} for more details on how to use it. The toolset includes compilers (currently GCC version 13.2.0 with selected additional patches) and runtime libraries from @@ -2137,8 +2137,8 @@ packages. Those with compiled code need the tools (see @ref{The Windows toolset}). The tools are found automatically by @R{} when installed by the toolset installer. See -@uref{https://cran.r-project.org/bin/windows/base/howto-R-devel.html,Building -R and packages} for more details. +@uref{https://cran.r-project.org/bin/windows/base/howto-@value{RWTVERSION}.html, +Building @value{RWTVERSION} and packages on Windows} for more details. Occasional permission problems after unpacking source packages have been seen on some systems: these have been circumvented by setting the diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/doc/manual/R-exts.texi R-patched/doc/manual/R-exts.texi --- R-release-orig/doc/manual/R-exts.texi 2024-09-16 00:15:01.000000000 +0200 +++ R-patched/doc/manual/R-exts.texi 2024-11-24 17:45:06.657855505 +0100 @@ -318,9 +318,12 @@ characters cannot be guaranteed to be supported in all locales. It would be good practice to avoid the shell metacharacters @code{()@{@}'[]$~}: @code{~} is also used as part of `8.3' filenames on -Windows. In addition, packages are normally distributed as tarballs, -and these have a limit on path lengths: for maximal portability 100 -bytes. +Windows. In addition, some applications on Windows can only work with path +names of certain length, following an earlier limit in the Windows operating +system. Packages are normally distributed as tarballs, and these have a limit +on path lengths. So, to be friendly to users who themselves may want to use a +relatively long path where they extract the package, and for maximal +portability, 100 bytes. A source package if possible should not contain binary executable files: they are not portable, and a security risk if they are of the @@ -623,7 +626,7 @@ suggests and so the user package needs to do so too and include this in @samp{VignetteBuilder}. -@c This included latin2 but we now know musl does not support it. +@c This included latin2 but we now know musl does not support it. @c DESCRIPTION field Encoding If the @file{DESCRIPTION} file is not entirely in @acronym{ASCII} it should contain an @samp{Encoding} field specifying an encoding. This is @@ -692,8 +695,8 @@ An @samp{RdMacros} field can be used to hold a comma-separated list of packages from which the current package will import @file{Rd} macro definitions. These package should also be listed in @samp{Imports} -(or @samp{Depends}). The macros in these packages will be -imported after the system macros, in the +(or @samp{Depends}). The macros in these packages will be +imported after the system macros, in the order listed in the @samp{RdMacros} field, before any macro definitions in the current package are loaded. Macro definitions in individual @file{.Rd} files in the @file{man} directory are loaded last, and are @@ -1550,7 +1553,7 @@ If you are not using @samp{LazyData} and either your data files are large or e.g., you use @file{data/foo.R} scripts to produce your data, loading -your namespace, you +your namespace, you can speed up installation by providing a file @file{datalist} in the @file{data} subdirectory. This should have one line per topic that @code{data()} will find, in the format @samp{foo} if @code{data(foo)} @@ -1903,7 +1906,7 @@ both the command and the appropriate flags, so that for example @samp{CC} must always be used with @samp{CFLAGS} and (for code to be linked into a shared library) @samp{CPICFLAGS}. For Fortran, be careful -to use @samp{FC FFLAGS FPICFLAGS} for fixed-form Fortran and +to use @samp{FC FFLAGS FPICFLAGS} for fixed-form Fortran and @samp{FC FCFLAGS FPICFLAGS} for free-form Fortran. As from @R{} 4.3.0, variables @@ -1935,7 +1938,7 @@ @end example @noindent Note that @code{FLIBS} as determined by @R{} must be used to ensure that -Fortran code works on all @R{} platforms. +Fortran code works on all @R{} platforms. @strong{N.B.}: If the @command{configure} script creates files, e.g.@: @@ -2717,7 +2720,7 @@ $(SHLIB): Csdp/lib/libsdp.a -Csdp/lib/libsdp.a: +Csdp/lib/libsdp.a: @@(cd Csdp/lib && $(MAKE) libsdp.a \ CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)") @end smallexample @@ -2923,7 +2926,7 @@ @c (search for `Oracle Developer Studio 12.6: Fortran User's Guide' and @c look for §4.6). @c Intel Fortran had full Fortran 2008 support from version 17.0, and some -@c 2018 support in version 16.0 and more in version 19.0. +@c 2018 support in version 16.0 and more in version 19.0. Modern versions of Fortran support modules, whereby compiling one source file creates a module file which is then included in others. (Module @@ -3198,15 +3201,14 @@ @subsection C standards C has had standards C89/C90, C99, C11, C17 (also known as C18), and C23 -is in final draft and expected to be published in 2024. C11 was a -minor change to C99 which introduced some new features and made others -optional, and C17 is a `bug-fix' update to C11. On the other hand, C23 -makes extensive changes, including making @code{bool}, @code{true} and -@code{false} reserved words, finally disallowing K&R-style function -declarations and clarifying the formerly deprecated meaning of function -declarations with an empty parameter list to mean zero -parameters. (There are many other additions: see for example -@uref{https://en.cppreference.com/w/c/23}.) +(published in 2024). C11 was a minor change to C99 which introduced +some new features and made others optional, and C17 is a `bug-fix' +update to C11. On the other hand, C23 makes extensive changes, +including making @code{bool}, @code{true} and @code{false} reserved +words, finally disallowing K&R-style function declarations and +clarifying the formerly deprecated meaning of function declarations with +an empty parameter list to mean zero parameters. (There are many other +additions: see for example @uref{https://en.cppreference.com/w/c/23}.) The @command{configure} script in recent versions of @R{} aims to choose a C compiler which supports C11: as the default in recent versions of @@ -3234,8 +3236,8 @@ The (claimed) C standard in use can be checked by the macro @code{__STDC_VERSION__}. This is undefined in C89/C90 and should have values @code{199901L}, @code{201112L} and @code{201710L} for C99, C11 -and C17. As C23 is not yet published there is as yet no definitive -value: compilers are currently using @code{202000L}. +and C17. The definitive value for C23 seems to be @code{202311L} but +compilers are currently using @code{202000L}. @c https://gustedt.gitlabpages.inria.fr/c23-library/ C23 has macros similar to C++ `feature tests' for many of its changes, for example @code{__STDC_VERSION_LIMITS_H__}. @@ -3353,11 +3355,11 @@ (cd libs; \ CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ - cmake . \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS:bool=OFF \ - -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON; \ - $(MAKE)) + cmake . \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS:bool=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON; \ + $(MAKE)) @end example @noindent @@ -3999,7 +4001,7 @@ by using calls to @code{system.file()}. All other files needed to re-make the vignettes (such as @LaTeX{} style files, Bib@TeX{} input files and files for any figures not created by running the code in the -vignette) must be in the vignette source directory. @code{R CMD check} +vignette) must be in the vignette source directory. @code{R CMD check} will check that vignette production has succeeded by comparing modification times of output files in @file{inst/doc} with the source in @file{vignettes}. @@ -6062,7 +6064,7 @@ non-portable characters such as @samp{$} in identifiers and use of C++ headers under @file{ext}. -item +@item Including C-style headers in C++ code is not portable. Including the legacy header@footnote{which often is the same as the header included by the C compiler, but some compilers have wrappers for some of the C @@ -6155,7 +6157,7 @@ @item In C++ code @example -using namespace std; +using namespace std; @end example @noindent is not good practice, and has caused platform-dependent errors if @@ -6231,12 +6233,12 @@ @item Package authors commonly assume things are part of C/C++ when they are -not: the most common example is POSIX@footnote{Although this is expected -to be part of C23, full support of that is years away.} function -@code{strdup}. The most common C library on Linux, @code{glibc}, will -hide the declarations of such extensions unless a `feature-test macro' -is defined @strong{before} (almost) any system header is included. So -for @code{strdup} you need +not: the most common example is POSIX@footnote{Although this was added +for C23, full support of that is years away.} function @code{strdup}. +The most common C library on Linux, @code{glibc}, will hide the +declarations of such extensions unless a `feature-test macro' is defined +@strong{before} (almost) any system header is included. So for +@code{strdup} you need @example #define _POSIX_C_SOURCE 200809L ... @@ -6391,8 +6393,8 @@ declared without arguments and is likely to become the default in future compilers. (It already is for Apple @command{clang} and for @I{LLVM} @command{clang} in C23 mode.) Note that using @code{f()} for a function -without any parameters was deprecated in C99 and C11, but it expected to -be non-deprecated in C23. However, @code{f(void)} is supported by all +without any parameters was deprecated in C99 and C11, but it became +non-deprecated in C23. However, @code{f(void)} is supported by all standards and avoids any uncertainty. @c draft n3054 §6.7.6.3 point 13 and footnote. @@ -6450,7 +6452,7 @@ error("Actual: %0.f; Expected %0.f\n", (double) XLENGTH(Robj), (double) nelem); @end example @noindent -@c x86_64 as a 52-bit design limit. +@c x86_64 has a 52-bit design limit. @c Linux and Windows are said to have 48-bit virtual address limits. (This could print to full precision, lengths well beyond the address space limits of current OSes, let alone practical limits.) @@ -6464,6 +6466,12 @@ So the values will need to be cast to the type assumed by the format (and @code{%lld} was not supported on Windows until @R{}@tie{}4.2.0). +@item +@I{Variadic} macros in C or C++ only portably allow a non-zero number of +arguments, although some compilers have allowed zero, often with a +warning. The latter was standardized in C++20 using the @code{__VA_OPT__} +macro. C23 also allows zero arguments in a similar way. + @end itemize Some additional information for C++ is available at @@ -6597,7 +6605,7 @@ similar. @item -Use of what @command{gfprtran} calls `Fortran 2018 deleted features', +Use of what @command{gfortran} calls `Fortran 2018 deleted features', although most were `deleted' in earlier standards: those itemized here were deleted in Fortran 2008. (In the Fortran standards `deleted' means features that compilers are not required to implement.) These include @@ -8553,7 +8561,7 @@ \Sexpr[results=rd]@{tools:::Rd_expr_PR(1234)@} @end example @noindent -when parsed. +when parsed. Some macros that might be of general use are: @ftable @code @@ -8790,7 +8798,7 @@ the preferred assignment operator @samp{<-} (rather than @samp{=}) for assignment. Many package authors use a version of Emacs (on a Unix-alike or Windows) to edit @R{} code, using the @I{ESS[S]} mode of the -@acronym{ESS} Emacs package. See +@acronym{ESS} Emacs package. See @ifset UseExternalXrefs @ref{R coding standards, , R coding standards, R-ints, R Internals} @end ifset @@ -9162,19 +9170,19 @@ The first report shows in which library (etc) the time was spent: @example - CPU_CLK_UNHALT...| - samples| %| - ------------------ - 278341 91.9947 R - 18290 6.0450 libc.so.6 - 2277 0.7526 kallsyms - 1426 0.4713 stats.so - 739 0.2442 libRblas.so - 554 0.1831 libz.so.1.2.11 - 373 0.1233 libm.so.6 - 352 0.1163 libtirpc.so.3.0.0 - 153 0.0506 ld-linux-x86-64.so.2 - 12 0.0040 methods.so + CPU_CLK_UNHALT...| + samples| %| + ------------------ + 278341 91.9947 R + 18290 6.0450 libc.so.6 + 2277 0.7526 kallsyms + 1426 0.4713 stats.so + 739 0.2442 libRblas.so + 554 0.1831 libz.so.1.2.11 + 373 0.1233 libm.so.6 + 352 0.1163 libtirpc.so.3.0.0 + 153 0.0506 ld-linux-x86-64.so.2 + 12 0.0040 methods.so @end example @noindent (@code{kallsyms} is the kernel.) @@ -9303,8 +9311,8 @@ > summary(women) Called from: summary.data.frame(women) Browse[1]> ls() - [1] "digits" "i" "lbs" "lw" "maxsum" "ncw" "nm" "nr" - [9] "nv" "object" "sms" "z" + [1] "digits" "i" "lbs" "lw" "maxsum" "ncw" "nm" "nr" + [9] "nv" "object" "sms" "z" Browse[1]> maxsum [1] 7 Browse[1]> c @@ -9478,7 +9486,7 @@ options(expressions=500) @end example -@noindent +@noindent and re-run the example showing the error. Sometimes there is warning that clearly is the precursor to some later @@ -10178,10 +10186,10 @@ @noindent which causes the first report to be fatal (it always is for the @code{unreachable} and @code{return} suboptions). For more detailed -information on where the runtime error occurs, using +information on where the runtime error occurs, using @example -setenv UBSAN_OPTIONS 'print_stacktrace=1' +setenv UBSAN_OPTIONS 'print_stacktrace=1' @end example @noindent will include a traceback in the report. Beyond that, @R{} can @@ -10659,7 +10667,7 @@ It may be simplest to attach the debugger to a running process (see above). Specifically, run @R{} and when it is at the prompt just before -a command that is to be debugged, at a terminal +a command that is to be debugged, at a terminal @example ps -ef | grep exec/R @@ -10948,7 +10956,7 @@ normally sufficient to cause @R{} to crash. (If it is not present and the call is from the body of a function defined in a package namespace, the shared object loaded by the first (if any) @code{useDynLib} -directive will be used.) +directive will be used.) @c However, prior to @R{} 2.15.2 the detection of the correct namespace is @c unreliable and you are strongly recommended to use the @code{PACKAGE} @c argument for packages to be used with earlier versions of @R{}. @@ -11528,9 +11536,9 @@ @noindent This indicates that there are two relevant entry points. (They may or may not have a leading underscore, as here. Fortran entry points will -have a trailing underscore.) Check in the @R{} code that they are -called by the package and how: in this case they are used by -@code{.Call}. +have a trailing underscore on all current platforms.) Check in the @R{} +code that they are called by the package and how: in this case they are +used by @code{.Call}. Alternatively, examine the package's @R{} code for all @code{.C}, @code{.Fortran}, @code{.Call} and @code{.External} calls. @@ -11611,7 +11619,7 @@ and @code{.Fortran} are all pointers, specifying them as @code{void *} suffices. (For most platforms one can omit all the arguments, although link-time optimization will warn, as will compilers set up to warn on -strict prototypes -- and C23 will require correct arguments.) +strict prototypes -- and C23 requires correct arguments.) Using @option{-fc-prototypes-external} will give a prototype using @code{int_least32_t *lgl} for Fortran @code{LOGICAL LGL}, but this is @@ -11964,7 +11972,7 @@ @file{Makevars.win} and @file{src/Makefile.ucrt} will be used in preference to @file{src/Makefile.win}. For past experiences of building DLLs with a variety of -compilers, see file @samp{README.packages}. +compilers, see file @samp{README.packages}. Under Windows you can supply an exports definitions file called @file{@var{dllname}-win.def}: otherwise all entry points in objects (but not libraries) supplied to @code{R CMD SHLIB} will be exported from the @@ -12130,9 +12138,10 @@ @c distributions. Even fewer external libraries use C++ internally but present a C -interface, such as @CRANpkg{rgeos}. These require the C++ runtime -library to be linked into the package's shared object/DLL, and this is -best done by including a dummy C++ file in the package sources. +interface, such as GEOS used by @CRANpkg{sf} and other packages.. These +require the C++ runtime library to be linked into the package's shared +object/DLL, and this is best done by including a dummy C++ file in the +package sources. There is a trend to link to the C++ interfaces offered by C software such as @pkg{hdf5}, @pkg{pcre} and @pkg{ImageMagick}. Their C @@ -12150,14 +12159,14 @@ warning applies equally to Fortran output to units @code{*} and @code{6}. @xref{Printing from Fortran}, which describes workarounds. -In the past most Fortran compilers implemented I/O on top of the C I/O -system and so the two interworked successfully. This was true of -@command{g77}, but it is less true of @command{gfortran} as used in -@command{gcc} 4 and later. In particular, any package that makes use of -Fortran I/O will when compiled on Windows interfere with C I/O: when the -Fortran I/O support code is initialized (typically when the package is -loaded) the C @code{stdout} and @code{stderr} are switched to @abbr{LF} line -endings. (Function @code{init} in file +When @R{} was first developed, most Fortran compilers implemented I/O on +top of the C I/O system and so the two interworked successfully. This +was true of @command{g77}, but no longer of @command{gfortran} as used +in @command{gcc} 4 and later. In particular, any package that makes use +of Fortran I/O will when compiled on Windows interfere with C I/O: when +the Fortran I/O support code is initialized (typically when the package +is loaded) the C @code{stdout} and @code{stderr} are switched to +@abbr{LF} line endings. (Function @code{init} in file @file{src/modules/lapack/init_win.c} shows how to mitigate this. In a package this would look something like @example @@ -12456,7 +12465,7 @@ structure as a @emph{variant type} that can handle all the usual types of @R{} objects, that is vectors of various modes, functions, environments, language objects and so on. The details are given later -in this section and in +in this section and in @ifset UseExternalXrefs @ref{R Internal Structures, , R Internal Structures, R-ints, R Internals}, @end ifset @@ -12526,8 +12535,8 @@ objects which were protected. The calls to @code{PROTECT} and @code{UNPROTECT} must balance when the user's code returns and should balance in all functions. @R{} will warn about -@code{"stack imbalance in .Call"} (or @code{.External}) if the -housekeeping is wrong. +@code{"stack imbalance in .Call"} (or @code{.External}) if the +housekeeping is wrong. Here is a small example of creating an @R{} numeric vector in C code: @@ -12621,7 +12630,7 @@ @itemize -@item +@item Pointer-protection balance. Calls to @code{PROTECT} and @code{UNPROTECT} should balance in each function. A function may only call @code{UNPROTECT} or @code{REPROTECT} on objects it has itself protected. Note that the pointer @@ -12674,7 +12683,7 @@ vectors (the cases where the elements are themselves @R{} objects). If storage is required for C objects during the calculations this is -best allocating by calling @code{R_alloc}; @pxref{Memory allocation}. +best allocated by calling @code{R_alloc}; @pxref{Memory allocation}. All of these memory allocation routines do their own error-checking, so the programmer may assume that they will raise an error and not return if the memory cannot be allocated. @@ -12712,7 +12721,7 @@ @code{CHARSXP}, @code{PROMSXP}, etc. (@strong{N.B.}: although it is possible to return objects of internal types, it is unsafe to do so as assumptions are made about how they are handled which may be violated at -user-level evaluation.) More details are given in +user-level evaluation.) More details are given in @ifset UseExternalXrefs @ref{R Internal Structures, , R Internal Structures, R-ints, R Internals}. @end ifset @@ -12985,7 +12994,7 @@ @example @group -/* get the list element named str, or return NULL */ +/* get the list element named str (ASCII), or return NULL */ SEXP getListElement(SEXP list, const char *str) @{ @@ -13277,8 +13286,8 @@ @subsubsection Semi-internal convenience functions There is quite a collection of functions that may be used in your C code -@emph{if} you are willing to adapt to rare ``API'' changes. -These typically contain ``workhorses'' of their @R{} counterparts. +@emph{if} you are willing to adapt to rare API changes. +These typically contain the ``workhorses'' of their @R{} counterparts. Functions @code{any_duplicated} and @code{any_duplicated3} are fast versions of @R{}'s @code{any(duplicated(.))}. @@ -13505,7 +13514,7 @@ @findex CAD5R @noindent -provide convenient ways to access the first four arguments. More +provide convenient ways to access the first five arguments. More generally we can use the @findex CAR @findex CDR @@ -13947,7 +13956,7 @@ @example @group -#include <R.h> +#include <R.h> #include <Rinternals.h> #include <float.h> /* for DBL_EPSILON */ @@ -14322,8 +14331,8 @@ on entities without preventing the garbage collection of the entities once they become unreachable. -A weak reference contains a key and a value. The value is reachable is -if it either reachable directly or @emph{via} weak references with reachable +A weak reference contains a key and a value. The value is reachable +if it is either reachable directly or @emph{via} weak references with reachable keys. Once a value is determined to be unreachable during garbage collection, the key and value are set to @code{R_NilValue} and the finalizer will be run later in the garbage collection. @@ -14358,7 +14367,7 @@ @uref{https://homepage.stat.uiowa.edu/~luke/R/references/weakfinex.html}, but that is used to add finalizers to external pointers which can now be done more directly. At the time of writing no @acronym{CRAN} or -Bioconductor package uses weak references. +Bioconductor package used weak references. @menu @@ -14373,7 +14382,7 @@ connections open at once, and the status information for each is stored in a C structure (pointed to by @code{thisHandle} in the code extract below) that is returned @emph{via} an external pointer as part of the -@pkg{RODBC} +@pkg{RODBC} `channel' (as the @code{"handle_ptr"} attribute). The external pointer is created by @@ -14546,7 +14555,7 @@ @end menu There are a large number of entry points in the @R{} executable/DLL that -can be called from C code (and some that can be called from Fortran +can be called from C code (and a few that can be called from Fortran code). Only those documented here are stable enough that they will only be changed with considerable notice. @@ -14577,17 +14586,19 @@ This remapping can cause problems@footnote{Known problems have been defining @code{LENGTH}, @code{error}, @code{length}, @code{match}, @code{vector} and @code{warning}: whether these matter depends on the OS -and toolchain, with many problem reports involving @command{clang++}.}, +and toolchain, with many problem reports involving Apple or LLVM +@command{clang++}.}, @c As from @I{LLVM} @command{clang} 13.0.0, the remapping of @code{match} @c breaks the subsequent inclusion of @file{omp.h}. -and can be eliminated by defining @code{R_NO_REMAP} (before including -any @R{} headers) and prepending @samp{Rf_} to @emph{all} the function -names used from @file{Rinternals.h} and @file{R_ext/Error.h}. These -problems can usually be avoided by including other headers (such as -system headers and those for external software used by the package) -before any @R{} headers. (Headers from other packages may include @R{} -headers directly or @emph{via} inclusion from further packages, and may -define @code{R_NO_REMAP} with or without including @file{Rinternals.h}.) +and can be eliminated by defining @code{R_NO_REMAP}@footnote{this will +become the default for C++ code in @R{} 4.5.0.} (before including any +@R{} headers) and prepending @samp{Rf_} to @emph{all} the function names +used from @file{Rinternals.h} and @file{R_ext/Error.h}. These problems +can usually be avoided by including other headers (such as system +headers and those for external software used by the package) before any +@R{} headers. (Headers from other packages may include @R{} headers +directly or @emph{via} inclusion from further packages, and may define +@code{R_NO_REMAP} with or without including @file{Rinternals.h}.) Some of these entry points are declared in header @file{Rmath.h}, most of which are remapped there. That remapping can be eliminated by @@ -14766,8 +14777,9 @@ @findex Free @c The R_ forms were introduced in 2016-09, hence for R 3.4.0 Historically the macros @code{Calloc}, @code{Free} and @code{Realloc} -were used, and these remain available unless @code{STRICT_R_HEADERS} -was defined prior to the inclusion of the header. +were used, and these remain available prior to @R{} 4.5.0 unless +@code{STRICT_R_HEADERS} was defined prior to the inclusion of the +header. @findex CallocCharBuf @findex Memcpy @@ -14881,11 +14893,12 @@ These essentially read in (or create) @code{.Random.seed} and write it out after use. -These are defined in header @file{R_ext/Random.h}. +These are defined in header @file{R_ext/Random.h}. These functiosns are +never remapped. The random number generator is private to @R{}; there is no way to -select the kind of RNG nor set the seed except by evaluating calls to the -@R{} functions. +select the kind of RNG nor set the seed except by evaluating calls to +the @R{} functions which do so. The C code behind @R{}'s @code{r@var{xxx}} functions can be accessed by including the header file @file{Rmath.h}; @xref{Distribution functions}. @@ -14901,7 +14914,7 @@ It was explained earlier that Fortran random-number generators should not be used in @R{} packages, not least as packages cannot safely -initialize them. Rather a package should call @R{}'s built in +initialize them. Rather a package should call @R{}'s built-in generators: one way to do so is to use C wrappers like @example #include <R_ext/RS.h> @@ -14945,7 +14958,7 @@ end subroutine putRNGseed end interface end module rngfuncs - + subroutine testit use rngfuncs double precision X @@ -14990,7 +15003,7 @@ @code{isfinite}. Currently in C code @code{ISNAN} is a macro calling @code{isnan}. -(Since this gives problems on some C++ systems, if the @R{} headers is +(Since this gives problems on some C++ systems, if the @R{} headers are called from C++ code a function call is used.) You can check for @code{Inf} or @code{-Inf} by testing equality to @@ -15116,7 +15129,7 @@ @c to access a Fortran common block from C @end table -On most current platforms these are all the same, but it is unwise to +On current platforms these are the same, but it is unwise to rely on this. Note that names containing underscores were not legal in Fortran 77, and are not portably handled by the above macros. (Also, all Fortran names for use by @R{} are lower case, but this is not @@ -15168,20 +15181,16 @@ @example init.c:10:13: warning: type of 'vsom_' does not match original declaration [-Wlto-type-mismatch] - extern void F77_NAME(vsom)(void *, void *, void *, void *, + extern void F77_NAME(vsom)(void *, void *, void *, void *, void *, void *, void *, void *, void *); vsom.f90:20:33: note: type mismatch in parameter 9 subroutine vsom(neurons,dt,dtrows,dtcols,xdim,ydim,alpha,train) vsom.f90:20:33: note: 'vsom' was previously declared here @end example +@noindent shows that a subroutine has been registered with 9 arguments (as that is what the @code{.Fortran} call used) but only has 8. -@menu -* Fortran character strings:: -* Fortran LOGICAL:: -* Passing functions:: -@end menu @node Fortran character strings, Fortran LOGICAL, Calling C from Fortran and vice versa, Calling C from Fortran and vice versa @subsection Fortran character strings @@ -15223,7 +15232,7 @@ @example void rmsg_ (char *msg, size_t msg_len); @end example -@noindent +@noindent (where @code{size_t} applies to version 8 and later). We could re-write that portably in C as @example @@ -15237,7 +15246,7 @@ char cmsg[msg_len+1]; strncpy(cmsg, msg, msg_len); cmsg[msg_len] = '\0'; // nul-terminate the string, to be sure - // do something with 'cmsg' + // do something with 'cmsg' @} @end example @noindent @@ -15257,12 +15266,12 @@ char cmsg[msg_len+1]; strncpy(cmsg, msg, msg_len); cmsg[msg_len] = '\0'; - // do something with 'cmsg' + // do something with 'cmsg' @} #else void F77_NAME(rmsg)(char *msg) @{ - // do something with 'msg' + // do something with 'msg' @} #endif @end example @@ -15347,7 +15356,7 @@ # define FCONE #endif ... - F77_CALL(dgemm)("N", "T", &nrx, &ncy, &ncx, &one, x, + F77_CALL(dgemm)("N", "T", &nrx, &ncy, &ncx, &one, x, &nrx, y, &nry, &zero, z, &nrx FCONE FCONE); @end example @noindent @@ -15367,7 +15376,7 @@ @code{int_least32_t *}: `Link-Time Optimization' will report @code{int *} as a mismatch. It is possible to use @code{iso_c_binding} in Fortran 2003 to map LOGICAL variables to the C99 type @code{_Bool}, but it is -usually simpler to pass integers to and fro. +usually simpler to pass integers. @node Passing functions, , Fortran LOGICAL, Calling C from Fortran and vice versa @subsection Passing functions @@ -15409,7 +15418,7 @@ for example numerical linear algebra computations and special functions. The header files @file{R_ext/BLAS.h}, @file{R_ext/Lapack.h} and -@file{R_ext/Linpack.h} contains declarations of the BLAS, LAPACK and +@file{R_ext/Linpack.h} contain declarations of the BLAS, LAPACK and LINPACK linear algebra functions included in @R{}. These are expressed as calls to Fortran subroutines, and they will also be usable from users' Fortran code. Although not part of the official @acronym{API}, @@ -15421,6 +15430,10 @@ C interfaces to the code behind @R{} functions, so the @R{} function documentation may give further details. +If @code{R_NO_REMAP_RMATH} most of these will need to be prefixed by +@code{Rf_}: see the header file for which ones. + + @menu * Distribution functions:: * Mathematical functions:: @@ -15538,7 +15551,7 @@ @end example @noindent where @code{K = length(prob)}, -@iftex +@iftex @tex $\pi :=$ @code{prob[]}, @end tex @@ -15555,6 +15568,7 @@ @code{signrank_free()} for the signed rank functions. @findex wilcox_free @findex signrank_free +@c wilcox_free and signrank_free are never remapped. Since @code{wilcox_free()} and @code{signrank_free()} were only added to @file{Rmath.h} in @R{}@tie{} 4.2.0, their use requires something like @example @@ -15607,7 +15621,7 @@ @code{trigamma(x) == psigamma(x,1)}, etc. The underlying workhorse, @code{dpsifn()}, is useful, e.g., when several derivatives of @eqn{\log\Gamma=, log Gamma=}@code{lgammafn} are desired. It computes and -returns in @code{ans[]} the length-@var{m} sequence +returns in @code{ans[]} the length-@var{m} sequence @eqn{(-1)^{k+1} / \Gamma(k+1) * \psi^{(k)}(x), (-1)^(k+1) / gamma(k+1) * psi(k;x)} for @eqn{k = n \ldots n+m-1, k = n ... n+m-1}, where @eqn{\psi^{(k)}(x), psi(k;x)} is the @I{k-th} derivative of @eqn{\psi(x), Psi(x)}, i.e., @@ -15657,7 +15671,7 @@ missing or infinite or @code{NaN}. @code{pow1p(@var{x}, @var{y})} computes @code{(1 + @var{x})^@var{y}}, accurately -even for small @var{x}, i.e., @eqn{|x| \ll 1, |x| << 1}. +even for small @var{x}, i.e., @eqn{|x| \ll 1, |x| << 1}. @end deftypefun @deftypefun double log1p (double @var{x}) @@ -15703,6 +15717,7 @@ accurately even for small @var{x}, i.e., @eqn{0 < x < 0.5, 0 < x < 0.5}. @end deftypefun +@c cospi sinpi tanpi are never remapped. @deftypefun double cospi (double @var{x}) Computes @code{cos(pi * x)} (where @code{pi} is 3.14159...), accurately, notably for half integer @var{x}. @@ -15837,10 +15852,11 @@ @end quotation For compatibility with @Sl{} this file defines the constant @code{PI} -(unless @code{STRICT_R_HEADERS} is defined): this is deprecated and -should be replaced by @code{M_PI}. @file{Constants.h} includes either C -header @file{float.h} or C++ header @file{cfloat}, which provide -constants such as @code{DBL_MAX}. +(priot to @R{} 4.5.0 and unless @code{STRICT_R_HEADERS} is defined): +this is deprecated and should be replaced by +@code{M_PI}. @file{Constants.h} includes either C header @file{float.h} +or C++ header @file{cfloat}, which provide constants such as +@code{DBL_MAX}. @findex TRUE @findex FALSE @@ -15880,6 +15896,7 @@ is provided for finite-differencing, nor for approximating the Hessian at the result. +@c None of these are remapped. The interfaces (defined in header @file{R_ext/Applic.h}) are @itemize @bullet @@ -16157,15 +16174,16 @@ the return value is dynamically allocated and should be freed using @code{R_free_tmpnam} when no longer needed (unlike the system call @code{tmpnam}). Freeing the result using @code{free} is no -longer recommended. +longer recommended. @end deftypefun -@deftypefun void R_atof (const char* @var{str}) -@deftypefunx void R_strtod (const char* @var{str}, char ** @var{end}) +@deftypefun double R_atof (const char* @var{str}) +@deftypefunx double R_strtod (const char* @var{str}, char ** @var{end}) Implementations of the C99/POSIX functions @code{atof} and @code{strtod} -which guarantee platform-dependent behaviour, including always using the -period as the decimal point @emph{aka} `@I{radix character}' and converting -@code{"NA"} to R's @code{NA_REAL_} . +which guarantee platform- and locale-independent behaviour, including +always using the period as the decimal point @emph{aka} `@I{radix +character}' and returning R's @code{NA_REAL_} for all unconverted +strings, including @code{"NA"}. @end deftypefun @@ -16234,14 +16252,14 @@ #include <Rinternals.h> SEXP R_tryCatchError(SEXP (*fun)(void *data), void *data, - SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata); + SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata); SEXP R_tryCatch(SEXP (*fun)(void *data), void *data, - SEXP, - SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata, - void (*clean)(void *cdata), void *cdata); + SEXP, + SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata, + void (*clean)(void *cdata), void *cdata); SEXP R_withCallingErrorHandler(SEXP (*fun)(void *data), void *data, - SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata) + SEXP (*hndlr)(SEXP cond, void *hdata), void *hdata) @end example @findex R_tryCatchError @findex R_tryCatch @@ -16492,7 +16510,7 @@ The visibility mechanism is not available on Windows, but there is an equally effective way to control which entry points are visible, by supplying a definitions file -@file{@var{pkgnme}/src/@var{pkgname}-win.def}: only entry points +@file{@var{pkgname}/src/@var{pkgname}-win.def}: only entry points listed in that file will be visible. Again using @pkg{stats} as an example, it has @@ -16571,7 +16589,7 @@ @item @file{Rversion.h} @tab @R{} version information @item @file{Rinterface.h} @tab for add-on front-ends (Unix-alikes only) @item @file{Rembedded.h} @tab for add-on front-ends -@item @file{R_ext/Applic.h} @tab optimization and integration +@item @file{R_ext/Applic.h} @tab optimization, integration and some LAPACK ones) @item @file{R_ext/BLAS.h} @tab C definitions for BLAS routines @item @file{R_ext/Callbacks.h} @tab C (and R function) top-level task handlers @@ -16627,8 +16645,8 @@ be used in system headers, or (preferably) to define @code{R_NO_REMAP}. Setting the environment variable @env{_R_CXX_USE_NO_REMAP_} to a true value allows the need for this to be tested, as it causes @command{R CMD -INSTALL} to compile C++ code defining @code{R_NO_REMAP}. This is -planned to become the default in future. +INSTALL} to compile C++ code defining @code{R_NO_REMAP}. This will become +the default as from @R{} 4.5.0. @node Generic functions and methods, Linking GUIs and other front-ends to R, The R API, Top @chapter Generic functions and methods @@ -17035,7 +17053,7 @@ myfe.o: myfe.c $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c myfe.c -o $@@ -## replace $(LIBR) $(LIBS) by $(STATIC_LIBR) if R was build with a static libR +## replace $(LIBR) $(LIBS) by $(STATIC_LIBR) if R was built with a static libR myfe: myfe.o $(MAIN_LINK) -o $@@ myfe.o $(LIBR) $(LIBS) @end example @@ -17058,7 +17076,7 @@ all: $(MAKE) -f "$@{R_HOME@}/etc$@{R_ARCH@}/Makeconf" -f Makefile.inner @end example - + Additional flags which @code{$(MAIN_LINK)} includes are, amongst others, those to select @abbr{OpenMP} and @option{--export-dynamic} for the GNU linker on some platforms. In principle @code{$(LIBS)} is not needed @@ -17576,7 +17594,7 @@ Rp->ShowMessage = askok; Rp->YesNoCancel = askyesnocancel; Rp->Busy = myBusy; - + Rp->R_Quiet = TRUE; /* Default is FALSE */ Rp->R_Interactive = FALSE; /* Default is TRUE */ Rp->RestoreAction = SA_RESTORE; diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/base/R/kappa.R R-patched/src/library/base/R/kappa.R --- R-release-orig/src/library/base/R/kappa.R 2024-03-27 00:02:03.000000000 +0100 +++ R-patched/src/library/base/R/kappa.R 2024-11-11 15:37:29.000000000 +0100 @@ -1,7 +1,7 @@ # File src/library/base/R/kappa.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1998-2023 The R Core Team +# Copyright (C) 1998-2024 The R Core Team # Copyright (C) 1998 B. D. Ripley # # This program is free software; you can redistribute it and/or modify @@ -73,8 +73,8 @@ nNorm <- is.null(norm) if(exact) { if(nNorm || norm == "2") { - s <- svd(z, nu = 0L, nv = 0L)$d - max(s)/min(s[s > 0]) + s <- svd(z, nu = 0L, nv = 0L)$d # decreasing, non-negative + if(s[1]) s[1]/s[length(s)] else Inf # when s is all zero } else { if(nNorm) norm <- "1" @@ -115,8 +115,9 @@ return(0) if(exact) { if(is.null(norm) || identical("2", norm)) { # 2-norm : *not* assuming 'triangular' + ## identically to kappa.default(z, exact=TRUE) : s <- svd(z, nu = 0L, nv = 0L)$d - max(s)/min(s[s > 0]) ## <==> kappa.default(z, exact=TRUE) + if(s[1]) s[1]/s[length(s)] else Inf } else norm(z, type=norm) * norm(solve(z), type=norm) # == kappa.default(z, exact=TRUE, norm=norm,..) } diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/base/man/Dates.Rd R-patched/src/library/base/man/Dates.Rd --- R-release-orig/src/library/base/man/Dates.Rd 2024-03-27 00:02:04.000000000 +0100 +++ R-patched/src/library/base/man/Dates.Rd 2024-11-11 15:37:29.000000000 +0100 @@ -66,6 +66,12 @@ For the many methods see \code{methods(class = "Date")}. Several are documented separately, see below. } +\section{Warning}{ + Do not use \code{\link{identical}()} on objects of class \code{"Date"}. + Their \code{\link{storage.mode}} may be \code{"dpuble"} or + \code{"integer"}, and which is chosen has depended on the version of + \R used to create the object. +} \seealso{ \code{\link{Sys.Date}} for the current date. diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/base/man/kappa.Rd R-patched/src/library/base/man/kappa.Rd --- R-release-orig/src/library/base/man/kappa.Rd 2024-03-27 00:02:04.000000000 +0100 +++ R-patched/src/library/base/man/kappa.Rd 2024-11-11 15:37:29.000000000 +0100 @@ -1,6 +1,6 @@ % File src/library/base/man/kappa.Rd % Part of the R package, https://www.R-project.org -% Copyright 1995-2023 R Core Team +% Copyright 1995-2024 R Core Team % Copyright 2008-2010 The R Foundation % Distributed under GPL 2 or later @@ -203,5 +203,15 @@ kappa(m79, exact=TRUE, norm="1", inv_z = iX) kappa(m79, exact=TRUE, norm="M", inv_z = iX) kappa(m79, exact=TRUE, norm="I", inv_z = iX) + +## Using a more "accurate" than default inv_z [example by Cleve Moler]: +A <- rbind(c(4.1, 2.8), + c(9.676, 6.608)) +kappa(A) # -> Inf +kappa(A, exact=TRUE) # 8.675057e+15 ( 2-norm ) + +## now for the 1-norm : +try(kappa(A, exact=TRUE, norm = "1")) #-> Error: computationally singular + kappa(A, exact=TRUE, norm = "1", inv_z = solve(A, tol = 1e-19)) ## 5.22057e16 } \keyword{math} diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/base/man/strptime.Rd R-patched/src/library/base/man/strptime.Rd --- R-release-orig/src/library/base/man/strptime.Rd 2024-03-27 00:02:04.000000000 +0100 +++ R-patched/src/library/base/man/strptime.Rd 2024-11-20 17:45:06.000000000 +0100 @@ -39,7 +39,8 @@ methods is \code{"\%Y-\%m-\%d \%H:\%M:\%S"} if any element has a time component which is not midnight, and \code{"\%Y-\%m-\%d"} - otherwise. If \code{\link{options}("digits.secs")} is set, up to + otherwise. If \code{digits} is not \code{NULL}, i.e., by default when + \code{\link{options}("digits.secs")} is set, up to the specified number of digits will be printed for seconds.} \item{\dots}{further arguments to be passed from or to other methods.} \item{usetz}{logical. Should the time zone abbreviation be appended @@ -235,11 +236,10 @@ Specific to \R is \code{\%OSn}, which for output gives the seconds truncated to \code{0 <= n <= 6} decimal places (and if \code{\%OS} is - not followed by a digit, it uses the setting of - \code{\link{getOption}("digits.secs")}, or if that is unset, \code{n = - 0}). Further, for \code{strptime} \code{\%OS} will input seconds - including fractional seconds. Note that \code{\%S} does not read - fractional parts on output. + not followed by a digit, it uses \code{digits} unless that is + \code{NULL}, when \code{n = 0}). Further, for \code{strptime} + \code{\%OS} will input seconds including fractional seconds. Note that + \code{\%S} does not read fractional parts on output. The behaviour of other conversion specifications (and even if other character sequences commencing with \code{\%} \emph{are} conversion @@ -307,7 +307,7 @@ year. (On some platforms this works better after conversion to \code{"POSIXct"}. Some platforms only recognize hour or half-hour offsets for output.)%% strftime in macOS 13. - + Using \code{\%z} for input makes most sense with \code{tz = "UTC"}. } @@ -426,7 +426,8 @@ ## time with fractional seconds z3 <- strptime("20/2/06 11:16:16.683", "\%d/\%m/\%y \%H:\%M:\%OS") \donttest{ -z3 # prints without fractional seconds by default, digits.sec = NULL ("= 0")} +z3 # prints without fractional seconds by default, digits.sec = NULL ("= 0") +print(z3, digits = 3) # shows extra digits} op <- options(digits.secs = 3) \donttest{z3 # shows the 3 extra digits} as.character(z3) # ditto diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/datasets/man/sunspot.month.Rd R-patched/src/library/datasets/man/sunspot.month.Rd --- R-release-orig/src/library/datasets/man/sunspot.month.Rd 2024-03-27 00:02:04.000000000 +0100 +++ R-patched/src/library/datasets/man/sunspot.month.Rd 2024-11-11 15:37:29.000000000 +0100 @@ -1,43 +1,63 @@ % File src/library/datasets/man/sunspot.month.Rd % Part of the R package, https://www.R-project.org -% Copyright 1995-2014 R Core Team +% Copyright 1995-2024 R Core Team % Distributed under GPL 2 or later \name{sunspot.month} +\title{Monthly Sunspot Data, from 1749 to "Present"} \docType{data} +\encoding{UTF-8} \alias{sunspot.month} -\title{Monthly Sunspot Data, from 1749 to "Present"} \description{ Monthly numbers of sunspots, as from the World Data Center, aka \abbr{SIDC}. This is the version of the data that will occasionally be updated when - new counts become available.%% ~/R/MM/MISC/read-sunspots.R + new counts become available (or the numbers are recalibrated).\cr % ~/R/MM/MISC/read-sunspots.R + For strict reproducibility, hence use the \code{\link{sunspots}} data instead! } \usage{ sunspot.month } \format{ The univariate time series \code{sunspot.year} and - \code{sunspot.month} contain 289 and 2988 observations, respectively. - The objects are of class \code{"ts"}. + \code{sunspot.month} contain 289 and + 3177 + observations, respectively, where the latter will increase over time. + The objects are of class \code{"\link{ts}"}. } \seealso{ - \code{sunspot.month} is a longer version of \code{\link{sunspots}}; + \code{sunspot.month} is a more up-to-date and hence also longer version of + \code{\link{sunspots}}; the latter runs until 1983 and is kept fixed (for reproducibility as example dataset). } \source{ \I{WDC-SILSO}, Solar Influences Data Analysis Center (\abbr{SIDC}), Royal Observatory of Belgium, Av. Circulaire, 3, B-1180 BRUSSELS - Currently at \url{http://www.sidc.be/silso/datafiles}% was http://sidc.oma.be/sunspot-data/ + Currently at \url{https://www.sidc.be/SILSO/datafiles}% was + % http://www.sidc.be/silso/datafiles, and http://sidc.oma.be/sunspot-data/ + + From around 2015, expert astronomers decided to recalibrate historical sunspot + numbers, see the \sQuote{References}. + This is \emph{not yet} visible in current \code{sunspot.month} but + may well change by the next release of \R. +} +\references{ + Clette, \enc{Frédéric}{Frederic} and \enc{Lefèvre}{Lefevre}, Laure (2016) + The New Sunspot Number: Assembling All Corrections. + \emph{Solar Physics} \bold{291}, 2629--2651. \doi{10.1007/s11207-016-1014-y} + + Clette, F., \enc{Lefèvre}{Lef`evre}, L., Chatzistergos, T. et al. (2023) + Recalibration of the Sunspot-Number: Status Report. + \emph{Solar Physics} \bold{298}: 44. \doi{10.1007/s11207-023-02136-3} } \author{ - R + R Core Team. } \examples{ require(stats); require(graphics) ## Compare the monthly series plot (sunspot.month, - main="sunspot.month & sunspots [package'datasets']", col=2) + main="sunspot.month & sunspots [package 'datasets']", col=2) lines(sunspots) # -> faint differences where they overlap ## Now look at the difference : @@ -60,5 +80,6 @@ ssm0 <- sunspot.month[1:2988] with(as.data.frame(.sunspot.diff), ssm0[i] <<- ssm0[i] - res10/10) sunspot.month.0 <- ts(ssm0, start = 1749, frequency = 12) +stopifnot(length(sunspot.month.0) == 2988) } \keyword{datasets} diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/datasets/man/sunspot.year.Rd R-patched/src/library/datasets/man/sunspot.year.Rd --- R-release-orig/src/library/datasets/man/sunspot.year.Rd 2024-03-27 00:02:04.000000000 +0100 +++ R-patched/src/library/datasets/man/sunspot.year.Rd 2024-11-11 15:37:29.000000000 +0100 @@ -1,6 +1,6 @@ % File src/library/datasets/man/sunspot.year.Rd % Part of the R package, https://www.R-project.org -% Copyright 1995-2007 R Core Team +% Copyright 1995-2024 R Core Team % Distributed under GPL 2 or later \name{sunspot.year} @@ -30,16 +30,16 @@ Regularly updated yearly sunspot numbers are available from \I{WDC-SILSO}, Royal Observatory of Belgium, at - \url{http://www.sidc.be/silso/datafiles} + \url{https://www.sidc.be/SILSO/datafiles}% was http://www.sidc.be/silso/datafiles } \examples{ utils::str(sm <- sunspots)# the monthly version we keep unchanged utils::str(sy <- sunspot.year) ## The common time interval (t1 <- c(max(start(sm), start(sy)), 1)) # Jan 1749 -(t2 <- c(min( end(sm)[1],end(sy)[1]), 12)) # Dec 1983 +(t2 <- c(min( end(sm)[1],end(sy)[1]), 12)) # Dec 1983 (will not be updated!) s.m <- window(sm, start=t1, end=t2) -s.y <- window(sy, start=t1, end=t2[1]) # {irrelevant warning} +s.y <- window(sy, start=t1, end=t2[1]) stopifnot(length(s.y) * 12 == length(s.m), ## The yearly series *is* close to the averages of the monthly one: all.equal(s.y, aggregate(s.m, FUN = mean), tolerance = 0.0020)) Binary files R-release-orig/src/library/grid/inst/doc/displaylist.pdf and R-patched/src/library/grid/inst/doc/displaylist.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/frame.pdf and R-patched/src/library/grid/inst/doc/frame.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/grid.pdf and R-patched/src/library/grid/inst/doc/grid.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/grobs.pdf and R-patched/src/library/grid/inst/doc/grobs.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/interactive.pdf and R-patched/src/library/grid/inst/doc/interactive.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/locndimn.pdf and R-patched/src/library/grid/inst/doc/locndimn.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/moveline.pdf and R-patched/src/library/grid/inst/doc/moveline.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/nonfinite.pdf and R-patched/src/library/grid/inst/doc/nonfinite.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/plotexample.pdf and R-patched/src/library/grid/inst/doc/plotexample.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/rotated.pdf and R-patched/src/library/grid/inst/doc/rotated.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/saveload.pdf and R-patched/src/library/grid/inst/doc/saveload.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/sharing.pdf and R-patched/src/library/grid/inst/doc/sharing.pdf differ Binary files R-release-orig/src/library/grid/inst/doc/viewports.pdf and R-patched/src/library/grid/inst/doc/viewports.pdf differ Binary files R-release-orig/src/library/parallel/inst/doc/parallel.pdf and R-patched/src/library/parallel/inst/doc/parallel.pdf differ diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/tools/R/dynamicHelp.R R-patched/src/library/tools/R/dynamicHelp.R --- R-release-orig/src/library/tools/R/dynamicHelp.R 2024-03-27 00:02:07.000000000 +0100 +++ R-patched/src/library/tools/R/dynamicHelp.R 2024-11-22 01:31:06.000000000 +0100 @@ -389,7 +389,7 @@ demosRegexp <- "^/library/([^/]*)/demo/([^/]*)$" DemoRegexp <- "^/library/([^/]*)/Demo/([^/]*)$" ExampleRegexp <- "^/library/([^/]*)/Example/([^/]*)$" - newsRegexp <- "^/library/([^/]*)/NEWS$" + newsRegexp <- "^/library/([^/]*)/NEWS([.](Rd|md))?$" figureRegexp <- "^/library/([^/]*)/(help|html)/figures/([^/]*)$" sessionRegexp <- "^/session/" packageIndexRegexp <- "^/library/([^/]*)$" diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/library/tools/R/install.R R-patched/src/library/tools/R/install.R --- R-release-orig/src/library/tools/R/install.R 2024-03-27 00:02:07.000000000 +0100 +++ R-patched/src/library/tools/R/install.R 2024-11-22 01:31:06.000000000 +0100 @@ -2856,10 +2856,13 @@ if (file.exists(file.path(outDir, "demo"))) cat('<li><a href="../demo">Code demos</a>. Use <a href="../../utils/help/demo">demo()</a> to run them.</li>\n', sep = "", file=conn) - if (any(file.exists(file.path(outDir, - c("NEWS", "NEWS.Rd", "NEWS.md"))))) - cat('<li><a href="../NEWS">Package NEWS</a>.</li>\n', - sep = "", file=conn) + for(nfile in c("NEWS", "NEWS.Rd", "NEWS.md")) { + if(file.exists(file.path(outDir, nfile))) { + cat('<li><a href="../', nfile, '">Package NEWS</a>.</li>\n', + sep = "", file=conn) + break + } + } cat('</ul>\n\n<h2>Help Pages</h2>\n\n\n', sep ="", file = conn) Binary files R-release-orig/src/library/utils/inst/doc/Sweave.pdf and R-patched/src/library/utils/inst/doc/Sweave.pdf differ diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/main/eval.c R-patched/src/main/eval.c --- R-release-orig/src/main/eval.c 2024-10-01 00:15:01.000000000 +0200 +++ R-patched/src/main/eval.c 2024-11-11 15:37:30.149339031 +0100 @@ -5851,12 +5851,15 @@ return PRVALUE(value); else { /**** R_isMissing is inefficient */ - if (keepmiss && R_isMissing(symbol, rho)) - return R_MissingArg; - else { - forcePromise(value); - return PRVALUE(value); + if (keepmiss) { + PROTECT(value); + Rboolean miss = R_isMissing(symbol, rho); + UNPROTECT(1); + if (miss) + return R_MissingArg; } + forcePromise(value); + return PRVALUE(value); } } else { diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/main/gram.c R-patched/src/main/gram.c --- R-release-orig/src/main/gram.c 2024-10-31 00:18:00.000000000 +0100 +++ R-patched/src/main/gram.c 2024-11-11 15:37:30.212044172 +0100 @@ -70,7 +70,7 @@ /* * R : A Computer Language for Statistical Data Analysis - * Copyright (C) 1997--2023 The R Core Team + * Copyright (C) 1997--2024 The R Core Team * Copyright (C) 2009--2011 Romain Francois * Copyright (C) 1995--1997 Robert Gentleman and Ross Ihaka * @@ -4929,7 +4929,8 @@ YYTEXT_PUSH(c, yyp); if (nd == 0) return ERROR; } - if (seendot && !seenexp) return ERROR; +// ?NumericComstants says exponent is optional (as does C99) +// if (seendot && !seenexp) return ERROR; if (c == 'L') /* for getParseData */ { // seenexp will be checked later diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/main/gram.y R-patched/src/main/gram.y --- R-release-orig/src/main/gram.y 2024-03-27 00:02:08.000000000 +0100 +++ R-patched/src/main/gram.y 2024-11-11 15:37:30.256286066 +0100 @@ -2,7 +2,7 @@ %{ /* * R : A Computer Language for Statistical Data Analysis - * Copyright (C) 1997--2023 The R Core Team + * Copyright (C) 1997--2024 The R Core Team * Copyright (C) 2009--2011 Romain Francois * Copyright (C) 1995--1997 Robert Gentleman and Ross Ihaka * @@ -2620,7 +2620,8 @@ YYTEXT_PUSH(c, yyp); if (nd == 0) return ERROR; } - if (seendot && !seenexp) return ERROR; +// ?NumericComstants says exponent is optional (as does C99) +// if (seendot && !seenexp) return ERROR; if (c == 'L') /* for getParseData */ { // seenexp will be checked later diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/src/main/util.c R-patched/src/main/util.c --- R-release-orig/src/main/util.c 2024-09-10 16:18:10.000000000 +0200 +++ R-patched/src/main/util.c 2024-11-11 15:37:30.271142891 +0100 @@ -2081,9 +2081,9 @@ R_strtod5 is used by type_convert(numerals=) (utils/src/io.c) The parser uses R_atof (and handles non-numeric strings itself). - That is the same as R_strtod but ignores endptr. - Also used by gnuwin32/windlgs/src/ttest.c, - exported and in Utils.h (but not in R-exts). + That is the same as R_strtod but ignores endptr. Also used by + gnuwin32/windlgs/src/ttest.c, exported and in Utils.h (and + documeented in R-exts only since R 4.4.1 ) */ double R_strtod5(const char *str, char **endptr, char dec, @@ -2126,6 +2126,12 @@ int n, expn = 0; if(strlen(p) > 2 && p[0] == '0' && (p[1] == 'x' || p[1] == 'X')) { // Hexadecimal "0x....." + /* Prior to 4.5.0 this did not allow forms such as 0x1.234 + without an exponent.: C99 allow this and implicitly + appends "p0"". + + Changed following PR#18805 + */ int exph = -1; /* This will overflow to Inf if appropriate */ @@ -2150,16 +2156,18 @@ } \ } strtod_EXACT_CLAUSE; + /* Binary exponent, if any */ if (*p == 'p' || *p == 'P') { int expsign = 1; - double p2 = 2.0; switch(*++p) { case '-': expsign = -1; case '+': p++; default: ; } #define MAX_EXPONENT_PREFIX 9999 - /* exponents beyond ca +1024/-1076 over/underflow */ + /* exponents beyond ca +1024/-1076 over/underflow + Limit exponent from PR#16358. + */ int ndig = 0; for (n = 0; *p >= '0' && *p <= '9'; p++, ndig++) n = (n < MAX_EXPONENT_PREFIX) ? n * 10 + (*p - '0') : n; @@ -2168,28 +2176,29 @@ p = str; /* back out */ goto done; } - if (ans != 0.0) { /* PR#15976: allow big exponents on 0 */ - LDOUBLE fac = 1.0; - expn += expsign * n; - if(exph > 0) { - if (expn - exph < -122) { /* PR#17199: fac may overflow below if expn - exph is too small. - 2^-122 is a bit bigger than 1E-37, so should be fine on all systems */ - for (n = exph, fac = 1.0; n; n >>= 1, p2 *= p2) - if (n & 1) fac *= p2; - ans /= fac; - p2 = 2.0; - } else - expn -= exph; - } - if (expn < 0) { - for (n = -expn, fac = 1.0; n; n >>= 1, p2 *= p2) + expn += expsign * n; + } + if (ans != 0.0) { /* PR#15976: allow big exponents on 0 */ + LDOUBLE fac = 1.0; + double p2 = 2.0; + if(exph > 0) { + if (expn - exph < -122) { /* PR#17199: fac may overflow below if expn - exph is too small. + 2^-122 is a bit bigger than 1E-37, so should be fine on all systems */ + for (n = exph, fac = 1.0; n; n >>= 1, p2 *= p2) if (n & 1) fac *= p2; ans /= fac; - } else { - for (n = expn, fac = 1.0; n; n >>= 1, p2 *= p2) - if (n & 1) fac *= p2; - ans *= fac; - } + p2 = 2.0; + } else + expn -= exph; + } + if (expn < 0) { + for (n = -expn, fac = 1.0; n; n >>= 1, p2 *= p2) + if (n & 1) fac *= p2; + ans /= fac; + } else { + for (n = expn, fac = 1.0; n; n >>= 1, p2 *= p2) + if (n & 1) fac *= p2; + ans *= fac; } } goto done; @@ -2220,7 +2229,7 @@ It's not right if the exponent is very large, but the overflow or underflow below will handle it. 1e308 is already Inf, but negative exponents can go down to -323 - before undeflowing to zero. And people could do perverse things + before undeflowing to zero. And people could do perverse things like 0.00000001e312. */ // C17 §6.4.4.2 requires a non-empty 'digit sequence' diff -ru -P -x .mirror -x ls_lR -x Old R-release-orig/tests/reg-tests-1c.R R-patched/tests/reg-tests-1c.R --- R-release-orig/tests/reg-tests-1c.R 2024-04-03 00:15:02.000000000 +0200 +++ R-patched/tests/reg-tests-1c.R 2024-11-18 17:45:05.598384260 +0100 @@ -1597,18 +1597,31 @@ ## format.POSIXlt() of Jan.1 if 1941 or '42 is involved: tJan1 <- function(n1, n2) strptime(paste0(n1:n2,"/01/01"), "%Y/%m/%d", tz="CET") -wDSTJan1 <- function(n1, n2) - which("CEST" == sub(".* ", '', format(tJan1(n1,n2), usetz=TRUE))) -(w8 <- wDSTJan1(1801, 2300)) -(w9 <- wDSTJan1(1901, 2300)) -stopifnot(identical(w8, 141:142),# exactly 1941:1942 had CEST on Jan.1 - identical(w9, 41: 42)) +f8 <- format(tJan1(1801, 2300), usetz=TRUE) +f9 <- format(tJan1(1901, 2300), usetz=TRUE) +rle8 <- rle(s8 <- sub(".* ",'', f8)) +rle9 <- rle(s9 <- sub(".* ",'', f9)) +w8 <- which(s8 == "CEST") +w9 <- which(s9 == "CEST") +## IGNORE_RDIFF_BEGIN +rle8 +## very platform dependently; originally got +## lengths: int [1:3] 140 2 358 +## values : chr [1:3] "CET" "CEST" "CET" +w8 # 141 142 +w9 # 41 42 +## IGNORE_RDIFF_END +## Debian's tzdata 2024b no longer contains "legacy" (but tzdata-legacy does) +## --> everything "CET" [ <==> !length(w..) ] +stopifnot(!length(w8) || identical(w8, 141:142),# exactly 1941:1942 had CEST on Jan.1 + !length(w9) || identical(w9, 41: 42)) ## for R-devel Jan.2016 to Mar.14 -- *AND* for R 3.2.4 -- the above gave ## integer(0) and c(41:42, 99:100, ..., 389:390) respectively - +## ## the above gives 1:142 and 1:42 respectively on Solaris 10 when not using ## --with-internal-tzcode; R-Admin recommends --with-internal-tzcode. + ## tsp<- did not remove mts class z <- ts(cbind(1:5,1:5)) tsp(z) <- NULL
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor