Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that theentire resulting derived work is distributed under the terms of apermission notice identical to this one.
Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translationapproved by the R Core Team.
DOWNLOAD https://cinurl.com/2yLIfh
If you want the build to be usable by a group of users, set umaskbefore unpacking so that the files will be readable by the target group(e.g., umask 022 to be usable by all users). Keep thissetting of umask whilst building and installing.
If you use a fairly recent GNU version of tar and dothis as a root account (which on Windows includes accounts withadministrator privileges) you may see many warnings about changingownership. In which case you can use
and perhaps also include the option --no-same-permissions.(These options can also be set in the TAR_OPTIONS environmentvariable: if more than one option is included they should be separatedby spaces.)
The tarballs are available from DownloadR-patched.tar.gz or R-devel.tar.gz (or the .tar.bz2versions) and unpack as described in the previous section. They arebuilt in exactly the same way as distributions of R releases.
The Subversion repository does not contain the current sources for therecommended packages, which can be obtained by rsync ordownloaded from CRAN. To use rsync to install theappropriate sources for the recommended packages, run./tools/rsync-recommended from the top-level directory of theR sources.
In addition, binary distributions are available for some common Linuxdistributions (see the FAQ for current details) and formacOS. These are installed in platform-specific ways, so for the restof this chapter we consider only building from the sources.
First review the essential and useful tools and libraries inEssential and useful other programs under a Unix-alike, and installthose youwant or need. Ensure that either the environment variable TMPDIRis either unset (and /tmp exists and can be written in andscripts can be executed from) or points to the absolute path to a validtemporary directory (one from which execution of scripts is allowed)which does not contain spaces.
Choose a directory to install the R tree (R is not just a binary, buthas additional data sets, help files, font metrics etc). Let us callthis place R_HOME. Untar the source code. This should createdirectories src, doc, and several more under a top-leveldirectory: change to that top-level directory (At this point NorthAmerican readers should consult Setting paper size.) Issue thefollowing commands:
Failures are not necessarily problems as they might be caused by missingfunctionality, but you should look carefully at any reporteddiscrepancies. (Some non-fatal errors are expected in locales that donot support Latin-1, in particular in true C locales andnon-UTF-8 non-Western-European locales.) A failure intests/ok-errors.R may indicate inadequate resource limits(see Running R).
see Testing an Installationfor the possibilities of doing this in parallel. Note that these checksare only run completely if the recommended packages are installed. Ifyou have a local CRAN mirror, these checks can be speeded up by eithersetting environment variable R_CRAN_WEB to its URL, or having afile .R/repositories specifying it (see ?setRepositories).
If the configure and make commands executesuccessfully, a shell-script front-end called R will be createdand copied to R_HOME/bin. You can link or copy this scriptto a place where users can invoke it, for example to/usr/local/bin/R. You could also copy the man page R.1 toa place where your man reader finds it, such as/usr/local/man/man1. If you want to install the complete Rtree to, e.g., /usr/local/lib/R, see Installation. Note:you do not need to install R: you can run it from where it wasbuilt.
and so on, as described further below. This has the advantage of alwayskeeping your source tree clean and is particularly recommended when youwork with a version of R from Subversion. (You may needGNU make to allow this, and you will need no spacesin the path to the build directory. It is unlikely to work if thesource directory has previously been used for a build.)
There are many settings which can be customized when building R andmost are described in the file config.site in the top-levelsource directory. This can be edited, but for an installation usingBUILDDIR it is better to put the changed settings in anewly-created file config.site in the build directory.
Note: if you already have R installed, check that where you installedR replaces or comes earlier in your path than the previousinstallation. Some systems are set up to have /usr/bin (thestandard place for a system installation) ahead of /usr/local/bin(the default place for installation of R) in their default path, andsome do not have /usr/local/bin on the default path.
If you need to disable the server and want HTML help, there is theoption to build HTML pages when packages are installed(including those installed with R). This is enabled by theconfigure option --enable-prebuilt-html. WhetherR CMD INSTALL (and hence install.packages) pre-buildsHTML pages is determined by looking at the R installation and isreported by R CMD INSTALL --help: it can be overridden byspecifying one of the INSTALL options --html or--no-html.
The server is disabled by setting the environment variableR_DISABLE_HTTPD to a non-empty value, either before R isstarted or within the R session before HTML help (includinghelp.start) is used. It is also possible that system securitymeasures will prevent the server from being started, for example if theloopback interface has been disabled. See?tools::startDynamicHelp for more details.
There are some issues with making the PDF reference manual,fullrefman.pdf or refman.pdf. The help files contain bothnon-ASCII characters (e.g. in text.Rd) and upright quotes,neither of which are contained in the standard LaTeX Computer Modernfonts. We have provided the following alternatives:
(The default.) Using standard PostScript fonts, Times Roman, Helveticaand Courier. This works well both for on-screen viewing and forprinting. One disadvantage is that the Usage and Examples sections maycome out rather wide: this can be overcome by using in additioneither of the options inconsolata (on a Unix-alike only if foundby configure) or beramono, which replace the Couriermonospaced font by Inconsolata or Bera Sans Mono respectively. (Youwill need the LaTeX package inconsolata6 orbera installed.)
Using the Latin Modern fonts. These are not often installed aspart of a TeX distribution, but can obtained from -archive/fonts/ps-type1/lm/ andmirrors. This uses fonts rather similar to Computer Modern, but is notso good on-screen as times.
Further options, e.g for hyperref, can be included in a fileRd.cfg somewhere on your LaTeX search path. For example, ifyou prefer to hyperlink the text and not the page number in the table ofcontents use
This requires ebook-convert fromCalibre, or frommost Linux distributions. If necessary the path toebook-convert can be set as make macro EBOOK by editingdoc/manual/Makefile (which contains a commented value suitablefor macOS) or using make -e.
where the value should be an absolute path. This causes makeinstall to install the R script to/where/you/want/R/to/go/bin, and so on. The prefix of theinstallation directories can be seen in the status message that isdisplayed at the end of configure. The installation may needto be done by the owner of prefix, often a root account.
The configure or make variables rdocdir andrsharedir can be used to install the system-independentdoc and share directories to somewhere other thanlibdir. The C header files can be installed to the value ofrincludedir: note that as the headers are not installed into asubdirectory you probably want something likerincludedir=/usr/local/include/R-4.4.0.
where prefix is optional, and libdir will give moreprecise control.8 However, you should not installto a directory mentioned in LDPATHS (e.g./usr/local/lib64) if you intend to work with multiple versions ofR, since that directory may be given precedence over the libdirectory of other R installations.
More precise control is possible. For info, the setting used is that ofinfodir (default prefix/info, set by configureoption --infodir). The PDF files are installed into the Rdoc tree, set by the make variable rdocdir.
A staged installation is possible, that it is installing R into atemporary directory in order to move the installed tree to its finaldestination. In this case prefix (and so on) should reflect thefinal destination, and DESTDIR should be used: see _node/DESTDIR.html.
R CMD INSTALL will detect if more than one build is installed andtry to install packages with the appropriate library objects for each.This will not be done if the package has an executable configurescript or a src/Makefile file. In such cases you can install forextra builds by
When sub-architectures are used the version of Rscript ine.g. /usr/bin will be the last installed, butarchitecture-specific versions will be available in e.g./usr/lib64/R/bin/exec$R_ARCH. Normally all installedarchitectures will run on the platform so the architecture ofRscript itself does not matter. The executableRscript will run the R script, and at that time thesetting of the R_ARCH environment variable determines thearchitecture which is run.
There are many other installation options, most of which are listed byconfigure --help. Almost all of those not listed elsewhere inthis manual are either standard autoconf options not relevantto R or intended for specialist uses by the R developers.
One that may be useful when working on R itself is the option--disable-byte-compiled-packages, which ensures that the baseand recommended packages are not byte-compiled. (Alternatively the(make or environment) variable R_NO_BASE_COMPILE can be set to anon-empty value for the duration of the build.)
7fc3f7cf58