diff --git a/.gitignore b/.gitignore index 6be147b..04c3a26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ -/R-3.2.2.tar.gz -/R-3.2.3.tar.gz -/R-3.2.4-revised.tar.gz -/R-3.3.0.tar.gz /xz-5.2.2.tar.bz2 /zlib-1.2.8.tar.gz /bzip2-1.0.6.tar.gz /curl-7.48.0.tar.bz2 /pcre-8.38.tar.bz2 +/R-3.3.1.tar.gz diff --git a/R-FAQ.html b/R-FAQ.html index 92654d7..1fc1de2 100644 --- a/R-FAQ.html +++ b/R-FAQ.html @@ -1,6 +1,6 @@ - + R FAQ @@ -33,9 +33,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} -span.nocodebreak {white-space: nowrap} span.nolinebreak {white-space: nowrap} -span.roman {font-family: serif; font-weight: normal} +span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} body { @@ -129,9 +128,10 @@ p {

Frequently Asked Questions on R

-

Version 3.2.2015-12-04

+

Version 2016-06-06

Kurt Hornik


+

Table of Contents

@@ -249,6 +249,7 @@ p {
  • 7.41 Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?
  • 7.42 Why is R apparently not releasing memory?
  • 7.43 How can I enable secure https downloads in R?
  • +
  • 7.44 How can I get CRAN package binaries for outdated versions of R?
  • 8 R Programming
  • 6.4 Updating packages
  • 6.5 Removing packages
  • @@ -294,14 +294,11 @@ p {
  • C.3 OS X
  • C.4 Solaris
  • C.5 AIX
  • C.6 FreeBSD
  • -
  • C.7 OpenBSD
  • +
  • C.7 OpenBSD
  • C.8 Cygwin
  • C.9 New platforms
  • @@ -338,9 +335,9 @@ Next:   [This is a guide to installation and administration for R.

    -

    This manual is for R, version 3.2.3 (2015-12-10). +

    This manual is for R, version 3.3.1 (2016-06-21).

    -

    Copyright © 2001–2015 R Core Team +

    Copyright © 2001–2016 R Core Team

    Permission is granted to make and distribute verbatim copies of this @@ -1029,13 +1026,13 @@ specified on the make install command line (at least for libdir. The C header files can be installed to the value of rincludedir: note that as the headers are not installed into a subdirectory you probably want something like -rincludedir=/usr/local/include/R-3.2.3. +rincludedir=/usr/local/include/R-3.3.1.

    If you want the R home to be something other than libdir/R, use rhome: for example

    -
    make install rhome=/usr/local/lib64/R-3.2.3
    +
    make install rhome=/usr/local/lib64/R-3.3.1
     

    will use a version-specific R home on a non-Debian Linux 64-bit @@ -1207,8 +1204,8 @@ architecture which is run.

    Sub-architectures are also used on Windows, but by selecting executables within the appropriate bin directory, R_HOME/bin/i386 or R_HOME/bin/x64. For -backwards compatibility with R < 2.12.0, there are executables -R_HOME/bin/R.exe or R_HOME/bin/Rscript.exe: +backwards compatibility there are executables +R_HOME/bin/R.exe and R_HOME/bin/Rscript.exe: these will run an executable from one of the subdirectories, which one being taken first from the @@ -1231,12 +1228,12 @@ Previous:

    2.6.1 Multilib

    -

    On Linux9, there is an alternative mechanism for mixing 32-bit and 64-bit -libraries known as multilib. If a Linux distribution supports -multilib, then parallel builds of R may be installed in the -sub-directories lib (32-bit) and lib64 (64-bit). The -build to be run may then be selected using the setarch -command. For example, a 32-bit build may be run by +

    For some Linux distributions9, there is an alternative mechanism for mixing +32-bit and 64-bit libraries known as multilib. If the Linux +distribution supports multilib, then parallel builds of R may be +installed in the sub-directories lib (32-bit) and lib64 +(64-bit). The build to be run may then be selected using the +setarch command. For example, a 32-bit build may be run by

    setarch i686 R
    @@ -1253,8 +1250,8 @@ sessions in which packages are to be installed, even if that is the only
     version of R installed (since this tells the package installation
     code the architecture needed).
     

    -

    At present there is a potential problem with packages using Java, as -the post-install for a ‘i686’ RPM on ‘x86_64’ Linux +

    There is a potential problem with packages using Java, as the +post-install for a ‘i686’ RPM on ‘x86_64’ Linux reconfigures Java and will find the ‘x86_64’ Java. If you know where a 32-bit Java is installed you may be able to run (as root)

    @@ -1288,10 +1285,9 @@ to 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 base -and recommended packages are lazyloaded but not byte-compiled. -(Alternatively the (make or environment) variable -R_NO_BASE_COMPILE can be set to a non-empty value for the duration -of the build.) +and recommended packages are not byte-compiled. (Alternatively the +(make or environment) variable R_NO_BASE_COMPILE can be set to a +non-empty value for the duration of the build.)

    Option --with-internal-tzcode makes use of R’s own code and copy of the Olson database for managing timezones. This will be @@ -1319,8 +1315,8 @@ Previous: , U

    2.7.1 OpenMP Support

    By default configure searches for suitable -options11 for OpenMP support for the C, C++98, FORTRAN -77 and Fortran compilers. +options11 for OpenMP support for the C, C++98, FORTRAN 77 and +Fortran compilers.

    Only the C result is currently used for R itself, and only if MAIN_LD/DYLIB_LD were not specified. This can be @@ -1342,10 +1338,10 @@ SHLIB_OPENMP_FFLAGS

    Setting to an empty value will disable OpenMP for that compiler (and configuring with --disable-openmp will disable all detection of -OpenMP). Note that the configure detection test is to compile -and link a standalone OpenMP 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. +OpenMP). The configure detection test is to compile and link +a standalone OpenMP 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.


    @@ -1356,7 +1352,8 @@ Previous: , U

    2.8 Testing an Installation

    -

    Full testing is possible only if the test files have been installed with +

    Full post-installation testing is possible only if the test files have +been installed with

    make install-tests
    @@ -1421,10 +1418,6 @@ by
     
    testInstalledBasic("internet")
     
    -

    (On Windows that runs the tests using whichever of internal or WinInet -internet functions has been selected for that session: to test both run -this twice selecting both options using setInternet2.) -

    These tests work best if diff (in Rtools*.exe for Windows users) is in the path.

    @@ -1459,10 +1452,12 @@ from CRAN to run on 32- or 64-bit Windows (XP or later) on ‘ix86’ and ‘x86_64CPUs.

    Your file system must allow long file names (as is likely except -perhaps for some network-mounted systems). +perhaps for some network-mounted systems). If it doesn’t also support +conversion to short name equivalents (a.k.a. DOS 8.3 names), then R +must be installed in a path that does not contain spaces.

    Installation is via the installer -R-3.2.3-win.exe. Just double-click on the icon and +R-3.3.1-win.exe. Just double-click on the icon and follow the instructions. When installing on a 64-bit version of Windows the options will include 32- or 64-bit versions of R (and the default is to install both). You can uninstall R from the Control Panel. @@ -1571,12 +1566,12 @@ Next:

    The following additional item is normally installed by -Rtools31.exe. If instead you choose to do a completely manual +Rtools*.exe. If instead you choose to do a completely manual build you will also need

      -
    • The Tcl/Tk support files are contained in Rtools31.exe and +
    • The Tcl/Tk support files are contained in Rtools*.exe and available as .zip files from https://www.stats.ox.ac.uk/pub/Rtools. Please make sure you install the right version: there is a 32-bit version and a 64-bit @@ -1929,7 +1925,7 @@ source tree) in src/gnuwin32/installer run installation (in double quotes if it contains spaces or backslashes).

      Both methods create an executable with a standard name such as -R-3.2.3-win.exe, so please rename it to indicate that +R-3.3.1-win.exe, so please rename it to indicate that it is customized. If you intend to distribute a customized installer please do check that license requirements are met – note that the installer will state that the contents are distributed under GPL @@ -1992,21 +1988,21 @@ make msi

    which will result in a file with a name like -R-3.2.3-win32.msi. This can be double-clicked to be +R-3.3.1-win32.msi. This can be double-clicked to be installed, but those who need it will know what to do with it (usually by running msiexec /i with additional options). Properties that users might want to set from the msiexec command line include ‘ALLUSERS’, ‘INSTALLDIR’ (something like -c:\Program Files\R\R-3.2.3) and ‘RMENU’ (the path +c:\Program Files\R\R-3.3.1) and ‘RMENU’ (the path to the ‘R’ folder on the start menu) and ‘STARTDIR’ (the starting directory for R shortcuts, defaulting to something like c:\Users\name\Documents\R).

    The MSI installer can be built both from a 32-bit build of R -(R-3.2.3-win32.msi) and from a 64-bit build of R -(R-3.2.3-win64.msi, optionally including 32-bit files +(R-3.3.1-win32.msi) and from a 64-bit build of R +(R-3.3.1-win64.msi, optionally including 32-bit files by setting the macro HOME32, when the name is -R-3.2.3-win.msi). Unlike the main installer, a 64-bit +R-3.3.1-win.msi). Unlike the main installer, a 64-bit MSI installer can only be run on 64-bit Windows.

    Thanks to David del Campo (Dept of Statistics, University of Oxford) @@ -2086,19 +2082,12 @@ Next: , Previous: The front page of a CRAN site has a link ‘Download R for OS -X’. Click on that, then download the file R-3.2.3.pkg +X’. Click on that, then download the file R-3.3.1.pkg and install it. This runs on OS X 10.9 and later (Mavericks, Yosemite, -El Capitan13, …). -

    -

    There may be14 a -separate installer package R-3.2.3-snowleopard.pkg, -which runs on OS X 10.6 and later (Snow Leopard, Lion, Mountain Lion, -Mavericks, Yosemite, …); it is a 64-bit (‘x86_64’) build -which should run on all Macs from mid-2008 on. +El Capitan, …).

    Installers for R-patched and R-devel are usually available from -https://r.research.att.com, including a -R-3-2-branch-snowleopard-signed.pkg build for R-patched. +https://r.research.att.com.

    For some older versions of the OS you can in principle (it is little tested) install R from the sources. @@ -2165,11 +2154,12 @@ its user manual is currently part of the OS X FAQ at can be viewed from R.APP’s ‘Help’ menu.

    -

    You can run command-line R from a Terminal15 so these -can be typed as commands like 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 ~/Library/R, +

    You can run command-line R and Rscript from a +Terminal13 so these can be +typed as commands like 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 ~/Library/R, e.g. ~/Library/R/3.3/library), and that warnings, messages and other output to stderr are highlighted in bold.

    @@ -2177,21 +2167,15 @@ other output to stderr are highlighted in bold. preferences are stored, so if it fails when launched for the very first time, try it again (the first attempt will store some preferences).

    -

    Users of R.APP under Mavericks and later need to be aware of the ‘App -Nap’ feature +

    Users of R.APP need to be aware of the ‘App Nap’ feature (https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html) which can cause R tasks to appear to run very slowly when not -producing output in the console. Here are three ways to avoid it: +producing output in the console. Here are ways to avoid it:

    So, for speed you may want to use a 32-bit build (especially on a @@ -3379,7 +3427,7 @@ Next: 9 The standalone Rmath library

    The routines supporting the distribution and -special28 functions in R +special27 functions in R and a few others are declared in C header file Rmath.h. These can be compiled into a standalone library for linking to other applications. (Note that they are not a separate library when R is @@ -3391,7 +3439,7 @@ is the current working directory (in the build directory tree on a Unix-alike if that is separate from the sources).

    Rmath.h contains ‘R_VERSION_STRING’, which is a character -string containing the current R version, for example "3.2.0". +string containing the current R version, for example "3.3.0".

    There is full access to R’s handling of NaN, Inf and -Inf via special versions of the macros and functions @@ -3484,7 +3532,7 @@ test the process (via make test). Note that you will probably not be able to run it unless you add the directory containing libRmath.so to the LD_LIBRARY_PATH environment variable -(libRmath.dylib, DYLD_LIBRARY_PATH on OS X). +(libRmath.dylib, DYLD_FALLBACK_LIBRARY_PATH on OS X).

    The targets

    @@ -3521,7 +3569,7 @@ Previous:

    9.2 Windows

    -

    You need to set up29 almost all the +

    You need to set up28 almost all the tools to make R and then run (in a Unix-like shell)

    @@ -3548,7 +3596,7 @@ make -f Makefile.win
    make -f Makefile.win shared implib
     
    -

    To use the routines in your own C or C++ programs using MinGW, include +

    To use the routines in your own C or C++ programs using MinGW-w64, include

    #define MATHLIB_STANDALONE
    @@ -3561,7 +3609,7 @@ order, so the result depends on which files are present.  You should be
     able to force static or dynamic linking  via
     

    -
    -Wl,-Bstatic -lRmath -Wl,dynamic
    +
    -Wl,-Bstatic -lRmath -Wl,Bdynamic
     -Wl,-Bdynamic -lRmath
     
    @@ -3571,7 +3619,7 @@ is dynamically linked, and test-static.exe, which is statically linked).

    It is possible to link to Rmath.dll using other compilers, either -directly or via an import library: if you make a MinGW import library as +directly or via an import library: if you make a MinGW-w64 import library as above, you will create a file Rmath.def which can be used (possibly after editing) to create an import library for other systems such as Visual C++. @@ -3585,7 +3633,7 @@ such as Visual C++.

    to ensure that the constants like NA_REAL are linked correctly. -(Auto-import will probably work with MinGW, but it is better to be +(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.)

    @@ -3628,45 +3676,69 @@ Next:

    Using FORTRAN). Your C compiler should be -ISO/IEC 6005930, POSIX 1003.1 and C99-compliant.31 R tries to choose suitable flags for +ISO/IEC 6005929, POSIX 1003.1 and C99-compliant.30 R tries to choose suitable flags for the C compilers it knows about, but you may have to set CC or CFLAGS suitably. For many versions of gcc with glibc this means including --std=gnu9932. If the compiler is detected as -gcc 4.x, -std=gnu99 will be appended to -CC unless it conflicts with a setting of CFLAGS. (Note -that options essential to run the compiler even for linking, such as -those to set the architecture, should be specified as part of CC -rather than in CFLAGS.) +-std=gnu9931. (Note that options essential to +run the compiler even for linking, such as those to set the +architecture, should be specified as part of CC rather than in +CFLAGS.)

    Unless you do not want to view graphs on-screen (or use OS X) you need ‘X11’ installed, including its headers and client libraries. For -recent Fedora distributions it means (at least) RPMs ‘libX11’, -‘libX11-devel’, ‘libXt’ and ‘libXt-devel’. On Debian we -recommend the meta-package ‘xorg-dev’. If you really do not want -these you will need to explicitly configure R without X11, using ---with-x=no. +recent Fedora/RedHat distributions it means (at least) RPMs +‘libX11’, ‘libX11-devel’, ‘libXt’ and ‘libXt-devel’. +On Debian/Ubuntu we recommend the meta-package ‘xorg-dev’. If you +really do not want these you will need to explicitly configure R +without X11, using --with-x=no.

    The command-line editing (and command completion) depends on the -GNU readline library: version 4.2 or later is needed -for all the features to be enabled. Otherwise you will need to -configure with --with-readline=no (or equivalent). +GNU readline library (including its headers): version +4.2 or later is needed for all the features to be enabled. Otherwise +you will need to configure with --with-readline=no (or +equivalent).

    A suitably comprehensive iconv function is essential. The R usage requires iconv to be able to translate between "latin1" and "UTF-8", to recognize "" (as the current encoding) and "ASCII", and to translate to and from the Unicode wide-character formats "UCS-[24][BL]E" — this is true -by default for glibc33 but not of most commercial Unixes. However, you +by default for glibc32 but not of most commercial Unixes. However, you can make use of GNU libiconv (as used on OS X: see https://www.gnu.org/software/libiconv/).

    -

    The OS needs to have enough support34 for wide-character +

    The OS needs to have enough support33 for wide-character types: this is checked at configuration. A small number of POSIX -functions35 are essential, and others36 will be used if available. +functions34 are essential, and others35 will be used if available. +

    +

    Installations of zlib (version 1.2.5 or later), libbz2 +(version 1.0.6 or later: called bzip2-libs/bzip2-devel or +libbz2-1.0/libbz2-dev by some Linux distributions), +liblzma36 version 5.0.3 or +later are required. +

    +

    PCRE37 (version 8.32 or later, although versions 8.10–8.31 will +be accepted with a deprecation warning) is required (or just its library +and headers if packaged separately). PCRE must be built with UTF-8 +support (not the default, and checked by configure) and +support for Unicode properties is assumed by some R packages. JIT +support is desirable for the best performance: support for this and +Unicode properties can be checked at run-time by calling +pcre_config(). If building PCRE for use with R a suitable +configure command might be +

    +
    /configure --enable-utf --enable-unicode-properties --enable-jit --disable-cpp
    +
    +

    The --enable-jit flag is supported for most common CPUs. +

    +

    Library libcurl (version 7.28.0 or later) is required. +Information on libcurl is found from the curl-config +script: if that is missing or needs to be overridden38 there are macros to do so described in file +config.site.

    A tar program is needed to unpack the sources and packages -(including the recommended packages). A version37 that can +(including the recommended packages). A version39 that can automagically detect compressed archives is preferred for use with untar(): the configure script looks for gtar and gnutar before @@ -3686,10 +3758,15 @@ make PDF versions of the manuals you will also need file texinfo.tex installed (which is part of the GNU texinfo distribution but is often made part of the TeX package in re-distributions) as well as -texi2dvi.38 +texi2dvi.40 Further, the versions of texi2dvi and texinfo.tex need to be compatible: we have seen problems with older TeX distributions.

    + +

    If you want to build from the R Subversion repository then +texi2any is highly recommended as it is used to create files +which are in the tarball but not stored in the Subversion repository. +

    The PDF documentation (including doc/NEWS.pdf) and building vignettes needs pdftex and pdflatex. We require @@ -3704,19 +3781,13 @@ kept up-to-date. A number of standard LaTeX packages are required may need to change R’s defaults: see Making the manuals). Note that package hyperref (currently) requires packages kvoptions, ltxcmds and refcount. For distributions -based on TeXLive the simplest approach may be to install collections +based on TeX Live the simplest approach may be to install collections collection-latex, collection-fontsrecommended, collection-latexrecommended, collection-fontsextra and collection-latexextra (assuming they are not installed by default): Fedora uses names like texlive-collection-fontsextra and Debian/Ubuntu like texlive-fonts-extra.

    - - -

    If you want to build from the R Subversion repository then -texi2any is highly recommended as it is used to create files -in the tarball but not under Subversion. -

    The essential programs should be in your PATH at the time configure is run: this will capture the full paths. @@ -3745,18 +3816,18 @@ earliest version we have tested. (For Fedora users we believe the ‘pangocairo’ package is installed (and if not, ‘cairo’) and if additional flags are needed for the ‘cairo-xlib’ package, then if suitable code can be compiled. These tests will fail if -pkg-config is not installed39, and are likely to fail if cairo was built +pkg-config is not installed41, and are likely to fail if cairo was built statically (unusual). Most systems with Gtk+ 2.8 or later installed will have suitable libraries

    For the best font experience with these devices you need suitable fonts installed: Linux users will want the urw-fonts package. On platforms which have it available, the msttcorefonts -package40 provides +package42 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 -https://fedorahosted.org/liberation-fonts/,41 which cover the Latin, Greek and Cyrillic alphabets +https://fedorahosted.org/liberation-fonts/,43 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 (https://en.wikipedia.org/wiki/Liberation_fonts). Then there @@ -3783,17 +3854,6 @@ needed). Recent versions allow several other libraries to be linked into libtiff such as lzma, jbig and jpeg12, and these may need also to be present.

    -

    If you have them installed (including the appropriate headers and of -suitable versions), system versions of zlib (version 1.2.5 or -later),, libbz2 (version 1.0.6 or later: called -bzip2-libs/bzip2-devel or libbz2-1.0/libbz2-dev -by some Linux distributions) and PCRE (version 8.10 or later, preferably -8.32 or later42): will be used, -otherwise versions in the R sources will be compiled in. The -external versions can be avoided by configure options ---without-system-zlib, --without-system-bzlib and ---without-system-pcre. -

    Option --with-system-tre is also available: it needs a recent version of TRE. (The current sources are in the git repository at https://github.com/laurikari/tre/, but at the time of writing @@ -3832,15 +3892,6 @@ or icu4c. It will be used by default where available: should a very old or broken version of ICU be found this can be suppressed by --without-ICU.

    -

    If libcurl version 7.28.0 or later is available (including its -development files), it will be linked in to support -curlGetHeaders and the "libcurl" methods of -download.file and url. This is recommended as it gives -access to ‘https://’ and ‘ftps://’ URLs. Information on -libcurl is found from the curl-config script: if that -is missing or needs to be overridden43 -there are macros described in file config.site. -

    The bitmap and dev2bitmap devices and function embedFonts() use ghostscript (http://www.ghostscript.com/). This should either be in your @@ -3890,7 +3941,7 @@ the Tcl and Tk libraries and for finding the tcl.h and versions of Tcl/Tk installed, specifying the paths to the correct config files may be necessary to avoid confusion between them.

    -

    Versions of Tcl/Tk up to 8.5.18 and 8.6.4 have been tested (including +

    Versions of Tcl/Tk up to 8.5.19 and 8.6.4 have been tested (including most versions of 8.4.x, but not recently).

    Note that the tk.h header includes44 X11 headers, so you will need X11 and its @@ -3921,16 +3972,17 @@ a sub-architecture-specific version). A typical setting for ‘x86_64’ Linux is

    -
    JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-4.b16.fc21.x86_64/jre
    +
    JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre
     R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server
     
    -

    Note that this unfortunately depends on the exact version of the JRE/JDK +

    Unfortunately this depends on the exact version of the JRE/JDK installed, and so may need updating if the Java installation is updated. This can be done by running R CMD javareconf which updates -settings in both etc/Makeconf and +settings in both R_HOME/etc/Makeconf and R_HOME/etc/ldpaths. See R CMD javareconf --help for -details. +details: note that this needs to be done by the account owning the R +installation.

    Another way of overriding those settings is to set the environment variable @@ -3943,7 +3995,7 @@ Java-using packages. For example

    It may be possible to avoid this by specifying an invariant link as the -path. For example, on that system any of +path when configuring. For example, on that system any of

    JAVA_HOME=/usr/lib/jvm/java
    @@ -4048,9 +4100,9 @@ position-independent code), and that is not checked.
     

    Some enhanced BLASes are compiler-system-specific (sunperf on Solaris45, libessl on IBM, -Accelerate on OS X). The correct incantation for -these is usually found via --with-blas with no value on -the appropriate platforms. +Accelerate on OS X). The correct incantation for these is often +found via --with-blas with no value on the appropriate +platforms.

    Some of the external BLASes are multi-threaded. One issue is that R profiling (which uses the SIGPROF signal) may cause @@ -4535,7 +4587,8 @@ anything.) The system headers for valgrind can be requested by option --with-system-valgrind-headers: they will be used if present (on Linux they may be in a separate package such as valgrind-devel). Note though that there is no guarantee that the -code in R will be compatible with future valgrind headers. +code in R will be compatible with very old48 or future valgrind +headers.

    If you need to re-configure R with different options you may need to run make clean or even make distclean before doing so. @@ -4784,7 +4837,7 @@ is to search for epcf90, g77, f77, xlf, frt, pgf77, cf77, fort77, fl32, -af77 (in that order)48, and use whichever is found first; if none is found, +af77 (in that order)49, and use whichever is found first; if none is found, R cannot be compiled. However, if CC is gcc, the matching FORTRAN compiler (g77 for gcc 3 and gfortran for @@ -4813,7 +4866,7 @@ pointer. This is checked during the configuration process.

    Some of the FORTRAN code makes use of COMPLEX*16 variables, which is a Fortran 90 extension. This is checked for at configure -time49, but you may need to avoid +time50, but you may need to avoid compiler flags asserting FORTRAN 77 compliance.

    Compiling the version of LAPACK in the R sources also requires some @@ -5038,9 +5091,11 @@ Windows: _WIN32, _WIN64 • FreeBSD:   -• Cygwin:   +• OpenBSD:   -• New platforms:   +• Cygwin:   + +• New platforms:   @@ -5066,7 +5121,7 @@ selection issues, they are more amenable than the issues with

    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 reporting50 missing font sizes, especially larger ones, it is likely +is reporting51 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 @@ -5188,7 +5243,7 @@ significant performance improvements on recent CPUs (especially for the best possible performance on the machine on which R is being installed: if the compilation is for a site-wide installation, it may still be desirable to use something like --mtume=core2.51 It is also possible to increase the +-mtume=core2.52 It is also possible to increase the optimization levels to -O3: however for many versions of the compilers this has caused problems in at least one CRAN package. @@ -5276,7 +5331,7 @@ project (http://libcxx.llvm.org/) has also R packages only the variant using libcxxabi was successful.

    Most builds of clang have no OpenMP support. Builds of -version 3.7.0 or later may.52 +version 3.7.0 or later may.53


    @@ -5387,42 +5442,39 @@ Next: , Previous: C.3 OS X -

    To build R you need to have installed Apple’s ‘Command Line Tools’ -(on some versions installing Xcode suffices). You also need -readline (or to configure using --without-readline), and -a Fortran compiler. Those and other binary components are available -from https://r.research.att.com/libs. +

    The instructions here are for ‘x86_64’ builds on 10.9 +(Mavericks) or later. In principle54 R can be +built for 10.6 to 10.8 but these has not been tested recently.

    -

    An X sub-system is required unless configuring using ---without-x: see https://xquartz.macosforge.org/. (Note -that XQuartz will likely need to be re-installed after an OS upgrade.) -To build R you need Apple’s ‘Command Line Tools’: these can be +

    To build R you need Apple’s ‘Command Line Tools’: these can be (re-)installed by xcode-select --install. (If you have a fresh OS installation, running e.g. make 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 will need to be reinstalled when OS X is upgraded, as upgrading partially removes them.)

    -

    The instructions here are for ‘x86_64’ builds on 10.6 (Snow -Leopard) or later. In principle R can be built for 10.4.x, 10.5.x -and for PowerPC or 32-bit Intel Macs but these has not been tested -recently. +

    You need readline55 and a Fortran compiler. Those and other binary +components are available from https://r.research.att.com/libs: +you are likely to need pcre and xz (recent OS X provides +libraries but not headers for these). +

    +

    An X sub-system is required unless configuring using +--without-x: see https://xquartz.macosforge.org/.

    To use the quartz() graphics device you need to configure with --with-aqua (which is the default): quartz() then becomes the default device when running R at the console and X11 would only be used for the command-line-R data editor/viewer and one -version of Tcl/Tk. (This needs an Objective-C compiler53 which can compile the source code of +version of Tcl/Tk. (This needs an Objective-C compiler56 which can compile the source code of quartz().)

    Use --without-aqua if you want a standard Unix-alike build: apart from disabling quartz() and the ability to use the build with R.APP, it also changes the default location of the personal -library (see ?.libPaths). Also use ---disable-R-framework to install in the standard layout. +library (see ?.libPaths).

    -

    Various compilers can be used. The current CRAN ‘Mavericks’ -distribution of R is built using +

    Various compilers can be used. The current CRAN distribution +of R is built using

    CC=clang
    @@ -5439,46 +5491,7 @@ FCFLAGS=$F77FLAGS
     
     

    with clang and clang++ from the ‘Command Line Tools’ and the Fortran compiler from -https://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2.54 Apple’s builds of clang -currently have no OpenMP support. -

    -

    The CRAN ‘Snow Leopard’ distribution of R was built using -

    - - -

    To use these, have in config.site something like -

    -
    -
    CC="llvm-gcc-4.2"
    -CXX="llvm-g++-4.2"
    -F77="gfortran-4.2 -arch x86_64"
    -FC=$F77
    -OBJC="clang"
    -
    - -

    Full names help to ensure that the intended compilers are used. In -particular gcc is a copy of llvm-gcc-4.2 for Xcode < -5 but of clang in Xcode 5. The recommended Fortran compiler -defaults to 32-bit, so -arch x86_64 is needed. (For a 32-bit -build, use -arch i386 for all compiler commands.) -

    -

    The OpenMP support in this version of gcc is problematic, so -the CRAN build is configured with --disable-openmp. +https://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2.57

    Other builds of gfortran are available: see https://gcc.gnu.org/wiki/GFortranBinaries and @@ -5489,20 +5502,14 @@ or path in a personal or site Makevars file (see http://llvm.org/releases/. In particular, these include support for the ‘Address Sanitizer’ (not included by Apple until -Xcode 7) and for OpenMP55 in version 3.7.0 and later. +Xcode 7) and for OpenMP58 in version 3.7.0 and later.

    Pre-compiled versions of many of the Useful libraries and programs are available from https://r.research.att.com/libs/. You will -most likely want at least pcre, xz, jpeg -and readline (and perhaps tiff). -pkg-config is not provided by Apple and useful for many packages: -it will also be used if present when configuring the X11() -device. -

    -

    Recent versions of OS X ship with zlib version 1.2.8 and -bzlib version 1.0.6, sufficient for the default -configure checks. Mavericks has a recent enough version of -libcurl: Snow Leopard does not. +most likely want at least jpeg and tiff. +pkg-config is not provided by Apple and used for many packages: +it will also be used if present when configuring the X11() and +bitmap devices.

    Support for cairo (without Pango) can be enabled in two ways: both need pkg-config available. XQuartz ships cairo @@ -5527,18 +5534,17 @@ Otherwise the binary libraries at

    to provide potentially higher-performance versions of the BLAS -and LAPACK routines. (Use of Accelerate with ---with-lapack does not work on Snow Leopard: it may work there -without.)56 +and LAPACK routines.59

    Looking at the top of /Library/Frameworks/R.framework/Resources/etc/Makeconf will show the compilers and configuration options used for the -CRAN binary package for R: at the time of writing +CRAN binary package for R: at the time of writing the +non-default options

    -
    --enable-memory-profiling
    +
    --enable-memory-profiling --enable-R-framework
     
    -

    was used for ‘Mavericks’. +

    were used.

    Configure option --with-internal-tzcode is the default on OS X, as the system implementation of time zones does not work correctly for @@ -5564,152 +5570,29 @@ versions. and may need to re-install XQuartz and Java (this has been needed for some upgrades but not others).

    + - - - - - - - - -
    - -
    -

    -Next: , Previous: , Up: OS X   [Contents][Index]

    -
    - -

    C.3.1 Mavericks and later

    - -

    For these versions Apple makes available compilers based on -clang, and C++ headers and runtime are from LLVM’s -‘libc++’ project, as part of the ‘Command Line Tools’ (sometimes -called ‘Command Line Developer Tools’) and of Xcode (you only need one -or the other). -

    -

    These tools can be (re-)installed by xcode-select --install. -(If you have a fresh installation of Mavericks or later, running e.g. -make in a terminal will offer the installation of the -command-line tools, or perhaps use the versions from Xcode. However, -after an OS update, you are advised to re-install them.) -

    -

    To use the compilers from the command-line tools with the recommended -Fortran compiler, have in config.site something like -

    -
    -
    CC=clang
    -CXX=clang++
    -F77=gfortran-4.8
    -FC=$F77
    -OBJC=clang
    -
    - -

    More recent and complete distributions of clang are usually -available from http://llvm.org/releases/. In particular, these -include support for the ‘Address Sanitizer’ (not included by Apple until -Xcode 7) and for OpenMP in versions 3.7.0 and later. -

    - -

    See the comments under Mountain Lion about X11 and GTK. -

    -

    If you upgrade the OS you should re-install any of XQuartz, the ‘Command -Line Tools’ and Java which you have installed. (Upgrading may partially -remove previous versions which can be confusing.) -

    -

    There are some warnings using the recommended gfortran build -under Yosemite. -

    - -
    - -
    -

    -Next: , Previous: , Up: OS X   [Contents][Index]

    -
    - -

    C.3.2 Lion and Mountain Lion

    - -

    ‘Command-line Tools for Xcode’ used to be part of the Apple Developer -Tools (‘Xcode’) but for these versions needs to be installed separately. -They can be downloaded from -http://developer.apple.com/devcenter/mac/ (you will need to -register there: that allows you to download older versions available for -your OS) or from within some versions of Xcode you can install the -command-line tools from the ‘Downloads’ pane in the -‘Preferences’. -

    -

    The X11 system used with Mountain Lion is XQuartz (see above): Lion -included an X11 system. -

    -

    To build the graphics devices depending on cairographics, the XQuartz -path for pkg-config files needs to be known to -pkg-config when configure is run: this usually means -adding it to the PKG_CONFIG_PATH environment variable, e.g. -

    -
    -
    export PKG_CONFIG_PATH= \
    -  /opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
    -
    - -

    or putting -

    -
    PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
    -
    - -

    in config.site. -

    -

    For some pre-compiled software, for example the GTK framework, -/opt/X11/include may need to be added to the include paths. -

    -

    If you install the command-line tools for Xcode 4.6.3 you will get the -compilers used for the CRAN binary distribution: those for Xcode 5 can -be installed afterwards. -

    - -
    - -
    -

    -Next: , Previous: , Up: OS X   [Contents][Index]

    -
    - -

    C.3.3 Snow Leopard

    - -

    A quirk on Snow Leopard is that the X11 libraries are not in the default -linking path, so something like ‘LIBS=-L/usr/X11/lib’ may be -required in config.site, or you can use the configure -options --x-includes=/usr/X11/include ---x-libraries=/usr/X11/lib . -

    -

    The CRAN binaries were built using Xcode 4.2, a version -available only to subscribing developers. It is believed that 3.2.6 (the -last public free version for Snow Leopard) will work. -


    -

    C.3.4 El Capitan

    +

    C.3.1 El Capitan

    - -

    El Capitan was released at the end of September 2015, and experience to -date is with systems which have been updated from Yosemite or earlier. -Upgraded systems need the Command Line Tools reinstalled. -

    There are problems resulting from the new-to-El-Capitan restriction that only Apple is allowed to install software under /usr: this affects inter alia MacTeX and XQuartz. For @@ -5728,7 +5611,6 @@ includes /usr/X11R6, /usr/texbin, /usr/bin/Ralthough the linked versions under /usr/X11 will be found (if the link is present).

    -
    @@ -5736,7 +5618,7 @@ link is present). Next: , Previous: , Up: OS X   [Contents][Index]

    -

    C.3.5 Tcl/Tk headers and libraries

    +

    C.3.2 Tcl/Tk headers and libraries

    If you plan to use the tcltk package for R, you need to install a distribution of Tcl/Tk. There are two alternatives. If you @@ -5751,17 +5633,16 @@ This may need

    --with-tcl-config=/usr/local/lib/tclConfig.sh 
     --with-tk-config=/usr/local/lib/tkConfig.sh
     
    -

    Note that this requires a fully-updated X11 installation (XQuartz for -Mountain Lion and later). +

    Note that this requires a matching XQuartz installation.

    There is also a native (‘Aqua’) version of Tcl/Tk which produces widgets in the native OS X style: this will not work with R.APP because of conflicts over the OS X menu, but for those only using command-line R this provides a much more intuitive interface to Tk for experienced Mac users. Most versions of OS X come with Aqua Tcl/Tk libraries, but these -are not recent versions of Tcl/Tk (8.5.9 in Mountain Lion and later). -It is better to install Tcl/Tk 8.6.x from the sources or a binary -distribution from +are not at all recent versions of Tcl/Tk (8.5.9 in El Capitan, which is +not even the latest patched version in that series). It is better to +install Tcl/Tk 8.6.x from the sources or a binary distribution from https://www.activestate.com/activetcl/downloads. Configure R with

    @@ -5786,20 +5667,19 @@ tclvalue(.Tcl("tk windowingsystem")) # "x11" or "aqua& Next: , Previous: , Up: OS X   [Contents][Index]

    -

    C.3.6 Java

    +

    C.3.3 Java

    -

    The situation with Java support on OS X is messy.57 +

    The situation with Java support on OS X is messy.60

    -

    Snow Leopard and Lion shipped with a Java 6 runtime (JRE). Mountain -Lion and later do not come with an installed JRE, and an OS X upgrade -removes one if already installed: it is intended to be installed at -first use. Check if a JRE is installed by running java +

    OS X no longer comes with an installed Java runtime (JRE), and an OS X +upgrade removes one if already installed: it is intended to be installed +at first use. Check if a JRE is installed by running java -version in a Terminal window: if Java is not installed this should prompt you to install it. You can also install directly the latest Java from Oracle (currently from http://www.oracle.com/technetwork/java/javase/downloads/index.html).

    -

    You may need to install what Apple calls ‘legacy Java’58 to suppress pop-up messages +

    You may need to install what Apple calls ‘legacy Java’61 to suppress pop-up messages even if you have a current version installed.

    To see what compatible versions of Java are currently installed, run @@ -5824,7 +5704,7 @@ JAVA_LIBS="-framework JavaVM"

    The Oracle JDK can be specified explicitly by something like

    -
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home
    +
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home
     JAVA_CPPFLAGS="-I/${JAVA_HOME}/include -I/${JAVA_HOME}/include/darwin"
     JAVA_LD_LIBRARY_PATH="${JAVA_HOME}/jre/lib/server"
     JAVA_LIBS="-L/${JAVA_HOME}/jre/lib/server -ljvm" 
    @@ -5842,17 +5722,17 @@ to 1 to install many of the Java-using packages.
     Next: , Previous: , Up: OS X   [Contents][Index]

    -

    C.3.7 Frameworks

    +

    C.3.4 Frameworks

    The CRAN build of R is installed as a framework, which is -selected by the default option +selected by the option

    ./configure --enable-R-framework
     

    (This is intended to be used with an Apple toolchain: other compilers may -not support frameworks correctly.) +not support frameworks correctly. It was the default prior to R 3.3.0.)

    It is only needed if you want to build R for use with the R.APP console, and implies --enable-R-shlib to build R as a @@ -5860,7 +5740,8 @@ dynamic library. This option configures R to be built and installed as a framework called R.framework. The default installation path for R.framework is /Library/Frameworks but this can be changed at configure time by specifying the flag ---enable-R-framework[=DIR] or at install time as +--enable-R-framework[=DIR] (or --prefix) or at +install time via

    make prefix=/where/you/want/R.framework/to/go install
    @@ -5878,7 +5759,7 @@ to pkg-config).
     Previous: , Up: OS X   [Contents][Index]

    -

    C.3.8 Building R.app

    +

    C.3.5 Building R.app

    Note that building the R.APP GUI console is a separate project, using Xcode. Before compiling R.APP make sure the current version of R @@ -5936,9 +5817,7 @@ found in /usr/xpg4/bin and /usr/xpg6/bin.

    A large selection of Open Source software can be installed from https://www.opencsw.org, by default installed under /opt/csw. Solaris 10 ships with bzlib version 1.0.6 -(sufficient for the default --with-system-bzlib) but -zlib version 1.2.3 (too old for --with-system-zlib): -OpenCSW has 1.2.8. +(sufficient) but zlib version 1.2.3 (too old): OpenCSW has 1.2.8.

    You will need GNU libiconv and readline: the Solaris version of iconv is not sufficiently powerful. @@ -5968,7 +5847,7 @@ option --with-internal-tzcode is recommended, and required if you find time-zone abbreviations being given odd values (as has been seen on 64-bit builds without it).

    -

    When using the Oracle compilers59 do not specify -fast, as this +

    When using the Oracle compilers62 do not specify -fast, as this disables IEEE arithmetic and make check will fail.

    It has been reported that some Solaris installations need @@ -6177,7 +6056,7 @@ FC="/opt/csw/gcc4/bin/gfortran -m32" LDFLAGS="-L/opt/csw/gcc4/lib -L/opt/csw/lib -L/usr/local/lib" -

    (-L/opt/csw/lib is needed since TeXLive was built using +

    (-L/opt/csw/lib is needed since TeX Live was built using 32-bit gcc, and we need /opt/csw/lib in R_LD_LIBRARY_PATH.)

    @@ -6347,7 +6226,7 @@ environment can be found in the “R on AIX” project on R-Forge

    -Next: , Previous: , Up: Platform notes   [Contents][Index]

    +Next: , Previous: , Up: Platform notes   [Contents][Index]

    C.6 FreeBSD

    @@ -6359,17 +6238,16 @@ Next: , Previous: -
    MAIN_LDFLAGS=-Wl,--export-dynamic
    -
    -

    for R releases up to 3.2.2. -

    Use of ICU for collation and the configure option --with-internal-tzcode are desirable workarounds.

    +
    +
    +

    +Next: , Previous: , Up: Platform notes   [Contents][Index]

    +
    +

    C.7 OpenBSD

    @@ -6382,59 +6260,16 @@ on x86_64 FreeBSD 10.2 for R 3.2.2.

    -Next: , Previous: , Up: Platform notes   [Contents][Index]

    +Next: , Previous: , Up: Platform notes   [Contents][Index]

    C.8 Cygwin

    -

    The Cygwin emulation layer on Windows can be treated as a Unix-alike OS. -This is unsupported, but experiments have been conducted and a few -workarounds added. Cygwin has not been tested for R 3.0.0 or later. +

    The 32-bit version has never worked well enough to pass R’s +make check, and residual support from earlier experiments was +removed in R 3.3.0.

    -

    The 64-bit version is completely unsupported. The 32-bit version has -never worked well enough to pass R’s make check. -

    -

    R requires C99 complex type support, which is available as from -Cygwin 1.7.8 (March 2011). However, the (then) implementation of -cacos gave incorrect results, so we undefine HAVE_CACOS -in src/main/complex.c on that platform. It has been reported -that some C99 long double mathematical functions are missing, so -configuring with --disable-long-double was required. -

    -

    Only building as a shared library can possibly work,60 so use e.g. -

    -
    -
    ./configure --disable-nls --enable-R-shlib FLIBS=-lgfortran
    -make
    -
    - -

    Enabling NLS does work if required, although adding ---with-included-gettext is preferable. You will see many -warnings about the use of auto-import. Setting ‘FLIBS’ explicitly -seems needed currently as the auto-detection gives an incorrect value. -

    -

    You will need the tetex-extra Cygwin package to build -NEWS.pdf and the vignettes. -

    -

    Note that this gives you a command-line application using readline -for command editing. The ‘X11’ graphics device will work if a -suitable X server is running, and the standard Unix-alike ways of -installing source packages work. There was a bug in the -/usr/lib/tkConfig.sh script in the version we looked at, which -needs to have -

    -
    -
    TK_LIB_SPEC='-ltk84'
    -
    - -

    The overhead of using shell scripts makes this noticeably slower than a -native build of R on Windows. -

    -

    Even when R could be built, not all the tests passed: there were -incorrect results from wide-character regular expressions code and from -sourcing CR-delimited files. -

    -

    Do not use Cygwin’s BLAS library: it is known to give incorrect results. +

    The 64-bit version is completely unsupported.


    @@ -6521,7 +6356,7 @@ will not need to build add-on packages from source; see 61 The build process for add-on packages is somewhat more +even to the choice of particular versions of the tools.63 The build process for add-on packages is somewhat more forgiving, but we recommend using the exact toolset at first, and only substituting other tools once you are familiar with the process.

    @@ -6530,10 +6365,10 @@ here as a result of bitter experience. Please do not report problems to the R mailing lists unless you have followed all the prescriptions.

    We have collected most of the necessary tools (unfortunately not all, -due to license or size limitations) into an executable installer -named62 Rtools31.exe, -available from https://CRAN.R-project.org/bin/windows/Rtools/. You -should download and run it, choosing the default “Package authoring +due to license or size limitations) into an executable installer named +Rtools*.exe, available from +https://CRAN.R-project.org/bin/windows/Rtools/. You should +download and run it, choosing the default “Package authoring installation” to build add-on packages, or the “full installation” if you intend to build R.

    @@ -6574,7 +6409,7 @@ use filepaths containing spaces: you can always use the short forms

    It is essential that the directory containing the command line tools comes first or second in the path: there are typically like-named -tools63 in other directories, and they will not +tools64 in other directories, and they will not work. The ordering of the other directories is less important, but if in doubt, use the order above.

    @@ -6625,7 +6460,7 @@ Manager.

    The Rtools*.exe installer does not include any version of LaTeX.

    -

    It is also possible to use the TeXLive distribution from +

    It is also possible to use the TeX Live distribution from https://www.tug.org/texlive/.

    @@ -6643,7 +6478,7 @@ Next:

    D.2 The Inno Setup installer

    -

    To make the installer package (R-3.2.3-win.exe) we +

    To make the installer package (R-3.3.1-win.exe) we currently require the Unicode version of Inno Setup 5.3.7 or later from http://jrsoftware.org/. This is not included in Rtools*.exe. @@ -6703,13 +6538,13 @@ Next:

    64 -m32 and -m64 +default) and 64-bit compilation are selected by the flags65 -m32 and -m64 respectively. The tools are all 32-bit Windows executables and should be able to run on any current version of Windows—however you do need a 64-bit version of Windows to build 64-bit R as the build process runs @@ -6750,7 +6585,7 @@ to the qpdf installation in file MkRules.local.

    There is a version of the file command that identifies the type of files, and is used by Rcmd check if available. The -binary distribution is included in Rtools31.exe. +binary distribution is included in Rtools*.exe.

    The file xzutils.zip contains the program xz which can be used to (de)compress files with that form of compression. @@ -6889,7 +6724,7 @@ Next:


    O Obtaining RObtaining R -OpenBSDFreeBSD +OpenBSDOpenBSD OS XInstalling R under Unix-alikes OS XInstalling R under OS X OS XOS X @@ -6983,6 +6818,8 @@ Previous: , U Index Entry  Section
    B +BINPREFWindows packages +BINPREF64Windows packages BLAS_LIBSBLAS
    C @@ -7122,140 +6959,141 @@ sub-architecture is to be installed.

    with possible values ‘i386’, ‘x64’, ‘32’ and ‘64’.

    (9)

    -

    mainly on RedHat and Fedora, whose layout is described -here.

    +

    mainly on RedHat and Fedora, whose +layout is described here.

    (10)

    How to prepare such a directory is described in file src/extra/tzone/Notes in the R sources.

    (11)

    for example, -fopenmp, -xopenmp or --qopenmp. This includes for 2015 versions of clang -and the Intel C compiler.

    +-qopenmp. This includes for clang 3.7.x and the +Intel C compiler.

    (12)

    Suitable distributions include Strawberry Perl, http://strawberryperl.com/ and ActivePerl, https://www.activestate.com/activeperl.

    (13)

    -

    for R 3.2.1 and earlier, the installer will -attempt unsuccessfully to install R and Rscript in -/usr/bin.

    +

    The installer as puts links to R and +Rscript in /usr/bin (Mavericks, Yosemite) or +/usr/local/bin (El Capitan and later). If these are missing, you +can run directly the versions in +/Library/Frameworks/R.framework/Resources/.

    (14)

    -

    There was for R 3.2.1 but not for R 3.2.2.

    -

    (15)

    -

    The installer as -from R 3.2.2 puts links to R and Rscript in -/usr/bin (Mavericks, Yosemite) or /usr/local/bin (El -Capitan and later). If these are missing, you can run directly the -versions in /Library/Frameworks/R.framework/Resources/.

    -

    (16)

    unless they were excluded in the build.

    -

    (17)

    +

    (15)

    its binding is locked once the startup files have been read, so users cannot easily change it.

    -

    (18)

    +

    (16)

    If a proxy needs to be set, see ?download.file.

    -

    (19)

    +

    (17)

    for a small number of CRAN packages where this is known to be safe and is needed by the autobuilder this is the default. Look at the source of tools:::.install_packages for the list. It can also be specified in the package’s DESCRIPTION file.

    +

    (18)

    +

    or by adding it in a file such as +etc/i386/Makevars.site, which does not exist by default.

    +

    (19)

    +

    They need to have been +created using -headerpad_max_install_names, which is the +default for an R package.

    (20)

    -

    or by adding it in -a file such as etc/i386/Makevars.site, which does not exist by -default.

    -

    (21)

    ‘X/Open Portability Guide’, which has had several versions.

    -

    (22)

    +

    (21)

    On some systems setting LC_ALL or LC_MESSAGES to ‘C’ disables LANGUAGE.

    -

    (23)

    +

    (22)

    If you try changing from French to Russian except in a UTF-8 locale, you will most likely find messages change to English.

    -

    (24)

    +

    (23)

    the language written in England: some people living in the USA appropriate this name for their language.

    -

    (25)

    +

    (24)

    with Americanisms.

    -

    (26)

    +

    (25)

    also known as IEEE 754

    -

    (27)

    +

    (26)

    at least when storing quantities: the on-FPU precision is allowed to vary

    -

    (28)

    +

    (27)

    e.g. Bessel, beta and gamma functions

    -

    (29)

    +

    (28)

    including copying MkRules.dist to MkRule.local and selecting the architecture.

    -

    (30)

    +

    (29)

    also known as IEEE 754

    -

    (31)

    +

    (30)

    Note that C11 compilers need not be C99-compliant: R requires support for double complex and variable-length arrays which are optional in C11 but is mandatory in C99.

    -

    (32)

    +

    (31)

    -std=c99 excludes POSIX functionality, but config.h will turn on all GNU extensions to include the POSIX functionality. The default mode for GCC -5 is -std=gnu11.

    -

    (33)

    +5.1 and later is -std=gnu11.

    +

    (32)

    However, it is possible to break the default behaviour of glibc by re-specifying the gconv modules to be loaded.

    -

    (34)

    +

    (33)

    specifically, the C99 functionality of headers wchar.h and wctype.h, types wctans_t and mbstate_t and functions mbrtowc, mbstowcs, wcrtomb, wcscoll, wcstombs, wctrans, wctype, and iswctype.

    -

    (35)

    +

    (34)

    including the opendir, readdir, closedir, popen, stat, glob, access, getcwd and chdir system calls, and either putenv or setenv.

    -

    (36)

    +

    (35)

    such as realpath, symlink.

    +

    (36)

    +

    most often distributed as part of xz: +possible names in Linux distributions include +xz-devel/xz-libs and liblzma-dev.

    (37)

    +

    sometimes known as PCRE1, and not PCRE2 which started at +version 10.0.

    +

    (38)

    +

    for +example to specify static linking with a build which has both shared and +static libraries.

    +

    (39)

    Such as GNU tar 1.15 or later, bsdtar (from https://github.com/libarchive/libarchive/, as used by FreeBSD and OS X 10.6 and later) or tar from the Heirloom Toolchest (http://heirloom.sourceforge.net/tools.html).

    -

    (38)

    +

    (40)

    texi2dvi is normally a shell script. Some versions (including that from texinfo 5.2 and 6.0) -need to be run under bash rather than a Bourne shell.

    -

    (39)

    +need to be run under bash rather than a Bourne shell, +especially on Solaris. Some of the issues which have been observed with +broken versions of texi2dvi can be circumvented by setting the +environment variable R_TEXI2DVICMD to the value emulation.

    +

    (41)

    If necessary the path to pkg-config can be specified by setting PKGCONF in config.site, on the configure command line or in the environment.

    -

    (40)

    +

    (42)

    also known as ttf-mscorefonts-installer in the Debian/Ubuntu world: see also https://en.wikipedia.org/wiki/Core_fonts_for_the_Web.

    -

    (41)

    +

    (43)

    ttf-liberation in Debian/Ubuntu.

    -

    (42)

    -

    sometimes known as PCRE1, and not PCRE2, which -started at version 10.0. PCRE must be built with UTF-8 support (not the -default, and checked by configure) and support for Unicode -properties is assumed by some R packages. JIT support is desirable -for the best performance: support for this and Unicode properties can be -checked at run-time by calling pcre_config().

    -

    (43)

    -

    for example to specify -static linking with a build which has both shared and static libraries.

    (44)

    This is true even for the ‘Aqua’ version of Tk on OS X, but distributions of that include a @@ -7270,61 +7108,66 @@ versions.

    We have measured 15–20% on ‘i686’ Linux and around 10% on ‘x86_64’ Linux.

    (48)

    +

    We believe that +versions 3.4.0 to 3.10.1 are compatible.

    +

    (49)

    On HP-UX fort77 is the POSIX compliant FORTRAN compiler, and comes after g77.

    -

    (49)

    +

    (50)

    as well as its equivalence to the Rcomplex structure defined in R_ext/Complex.h.

    -

    (50)

    +

    (51)

    for example, X11 font at size 14 could not be loaded.

    -

    (51)

    +

    (52)

    or -mtune=corei7 for Intel Core i3/15/17 with gcc >= 4.6.0.

    -

    (52)

    +

    (53)

    This also needs the OpenMP runtime, which is usually distributed separately, e.g. at http://llvm.org/releases.

    -

    (53)

    +

    (54)

    +

    It will be necessary to +install later versions of software such as libcurl.

    +

    (55)

    +

    Apple provides a partial emulation of +GNU readline 4.2 based on the NetBSD editline library. That is +not recommended but for the time being R’s installation scripts will +make use of it.

    +

    (56)

    These days that is defined by Apple’s implementation of clang, so it is strongly recommended to use that.

    -

    (54)

    +

    (57)

    This is a tarball which needs to be unpacked in the Terminal by e.g. sudo tar -zxf gfortran-4.8.2-darwin13.tar.bz2 -C /. It does not run on Core 2 Duo Macs.

    -

    (55)

    +

    (58)

    This also needs the OpenMP runtime, which is distributed separately at that site.

    -

    (56)

    -

    It is reported that for some non-Apple toolchains -CPPFLAGS needed to contain -D__ACCELERATE__.

    -

    (57)

    +

    (59)

    +

    It is reported that for some non-Apple +toolchains CPPFLAGS needed to contain -D__ACCELERATE__.

    +

    (60)

    For more details see http://www.macstrategy.com/article.php?3.

    -

    (58)

    +

    (61)

    e.g. Java For OS X 2015-001 from https://support.apple.com/kb/DL1572.

    -

    (59)

    +

    (62)

    including gcc for Sparc from Oracle.

    -

    (60)

    -

    Windows -DLLs need to have all links resolved at build time and so cannot resolve -against R.bin.

    -

    (61)

    +

    (63)

    For example, the Cygwin version of make 3.81 fails to work correctly.

    -

    (62)

    -

    for R 3.0.0 and later.

    -

    (63)

    +

    (64)

    such as sort, find and perhaps make.

    -

    (64)

    +

    (65)

    these flags apply to the compilers: some of the tools use different flags. 32-bit builds are the default.

    diff --git a/R-data.html b/R-data.html index 53f6521..8cfe7c5 100644 --- a/R-data.html +++ b/R-data.html @@ -1,8 +1,8 @@ - - + R Data Import/Export @@ -51,9 +51,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} -span.nocodebreak {white-space: nowrap} span.nolinebreak {white-space: nowrap} -span.roman {font-family: serif; font-weight: normal} +span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} body { @@ -241,9 +240,9 @@ Next:

    This is a guide to importing and exporting data to and from R.

    -

    This manual is for R, version 3.2.3 (2015-12-10). +

    This manual is for R, version 3.3.1 (2016-06-21).

    -

    Copyright © 2000–2015 R Core Team +

    Copyright © 2000–2016 R Core Team

    Permission is granted to make and distribute verbatim copies of this @@ -372,13 +371,13 @@ here.

    There are packages to allow functionality developed in languages such as Java, perl and python to be directly integrated with R code, making the use of facilities in these languages even -more appropriate. (See the rJava package from CRAN and -the SJava, RSPerl and RSPython packages from the -Omegahat project, http://www.omegahat.org.) +more appropriate. (See the rJava package from CRAN +and the SJava, RSPerl and RSPython packages from the +Omegahat project, http://www.omegahat.net.)

    - +

    It is also worth remembering that R like S comes from the Unix tradition of small re-usable tools, and it can be rewarding to use tools @@ -428,8 +427,7 @@ on their computers for that purpose). However, this is not always possible, and Importing from other statistical systems discusses what facilities are available to access such files directly from R. For Excel spreadsheets, the available methods are summarized in -Reading Excel spreadsheets. For ODS spreadsheets from Open -Office, see the Omegahat package1 ROpenOffice. +Reading Excel spreadsheets.

    In a few cases, data have been stored in a binary form for compactness and speed of access. One application of this that we have seen several @@ -471,7 +469,7 @@ intro.dat: UTF-8 Unicode (with BOM) text

    Modern Unix-alike systems, including OS X, are likely to produce UTF-8 files. Windows may produce what it calls ‘Unicode’ files -(UCS-2LE or just possibly UTF-16LE2). Otherwise most files will be in a +(UCS-2LE or just possibly UTF-16LE1). Otherwise most files will be in a 8-bit encoding unless from a Chinese/Japanese/Korean locale (which have a wide range of encodings in common use). It is not possible to automatically detect with certainty which 8-bit encoding (although @@ -622,7 +620,7 @@ and write.table has a fileEncoding argument to make th easier.

    The hard part is to know what file encoding to use. For use on Windows, -it is best to use what Windows calls ‘Unicode’3, that is "UTF-16LE". Using UTF-8 is a good way +it is best to use what Windows calls ‘Unicode’2, that is "UTF-16LE". Using UTF-8 is a good way to make portable files that will not easily be confused with any other encoding, but even OS X applications (where UTF-8 is the system encoding) may not recognize them, and Windows applications are most @@ -685,12 +683,9 @@ graphical displays, mathematics and so on.

    although it does not require it.

    The XML package provides general facilities for reading and -writing XML documents within R. A description of the -facilities of the XML package is outside the scope of this -document: see the package’s Web page at -http://www.omegahat.org/RSXML for details and examples. Package -StatDataML on CRAN is one example building on -XML. +writing XML documents within R. +Package StatDataML on CRAN is one example building +on XML.

    NB: XML is available as a binary package for Windows, normally from the ‘CRAN extras’ repository (which is selected by default on @@ -856,7 +851,7 @@ indicate missing cases in a regular layout. columns as character vectors and then tries to select a suitable class for each variable in the data frame. It tries in turn logical, integer, numeric and complex, moving on if any -entry is not missing and cannot be converted.4 +entry is not missing and cannot be converted.3 If all of these fail, the variable is converted to a factor.

    Arguments colClasses and as.is provide greater control. @@ -1490,7 +1485,7 @@ Next: IBM’s DB2; Microsoft SQL Server on Windows) and academic and small-system databases (such as -MySQL5, PostgreSQL, Microsoft +MySQL4, PostgreSQL, Microsoft Access, …), the former marked out by much greater emphasis on data security features. The line is blurring, with MySQL and PostgreSQL having more and more high-end features, and free ‘express’ versions @@ -3014,7 +3009,7 @@ Previous:


    A -AWKIntroduction +awkIntroduction
    B Binary filesBinary files @@ -3163,23 +3158,19 @@ Previous:

    (1)

    -

    Currently not available from -that repository but as a source package for download from -http://www.omegahat.org/ROpenOffice/.

    -

    (2)

    the distinction is subtle, https://en.wikipedia.org/wiki/UTF-16/UCS-2, and the use of surrogate pairs is very rare.

    -

    (3)

    +

    (2)

    Even then, Windows applications may expect a Byte Order Mark which the implementation of iconv used by R may or may not add depending on the platform.

    -

    (4)

    +

    (3)

    This is normally fast as looking at the first entry rules out most of the possibilities.

    -

    (5)

    +

    (4)

    and forks, notably MariaDB.


    diff --git a/R-exts.html b/R-exts.html index 1ea4b62..309ee06 100644 --- a/R-exts.html +++ b/R-exts.html @@ -1,8 +1,8 @@ - - + Writing R Extensions @@ -51,9 +51,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} -span.nocodebreak {white-space: nowrap} span.nolinebreak {white-space: nowrap} -span.roman {font-family: serif; font-weight: normal} +span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} body { @@ -432,9 +431,9 @@ Next: R add-on packages, writing R documentation, R’s system and foreign language interfaces, and the R API.

    -

    This manual is for R, version 3.2.3 (2015-12-10). +

    This manual is for R, version 3.3.1 (2016-06-21).

    -

    Copyright © 1999–2015 R Core Team +

    Copyright © 1999–2016 R Core Team

    Permission is granted to make and distribute verbatim copies of this @@ -680,11 +679,11 @@ section on Package namespaces. -

    The optional files configure and cleanup are (Bourne -shell) script files which are, respectively, executed before and -(provided that option --clean was given) after installation on -Unix-alikes, see Configure and cleanup. The analogues on Windows -are configure.win and cleanup.win. +

    The optional files configure and cleanup are (Bourne) +shell scripts which are, respectively, executed before and (if option +--clean was given) after installation on Unix-alikes, see +Configure and cleanup. The analogues on Windows are +configure.win and cleanup.win.

    For the conventions for files NEWS and ChangeLog in the GNU project see @@ -1008,7 +1007,7 @@ see Package types.

    One can add subject classifications for the content of the package using the fields ‘Classification/ACM’ or ‘Classification/ACM-2012’ (using the Computing Classification System of the Association for -Computing Machinery, http://www.acm.org/class/; the former refers +Computing Machinery, http://www.acm.org/about/class/; the former refers to the 1998 version), ‘Classification/JEL’ (the Journal of Economic Literature Classification System, https://www.aeaweb.org/econlit/jelCodes.php, or @@ -1030,14 +1029,19 @@ language subtags which in essence are 2-letter ISO 639-1 639-3 (https://en.wikipedia.org/wiki/ISO_639-3) language codes.

    -

    As of R 3.2.0, an ‘RdMacros’ field can be used to hold a -comma-separated list of packages from which the current package will import -Rd macro definitions. These will be imported after the system macros, -in the order listed in the ‘RdMacros’ field, before any macro -definitions in the current package are loaded. Macro definitions in -individual .Rd files in the man directory are loaded -last, and are local to later parts of that file. In case of any -duplicates, the last loaded definition will be used8 +

    An ‘RdMacros’ field can be used to hold a comma-separated list of +packages from which the current package will import Rd macro +definitions. These will be imported after the system macros, in the +order listed in the ‘RdMacros’ field, before any macro definitions +in the current package are loaded. Macro definitions in individual +.Rd files in the man directory are loaded last, and are +local to later parts of that file. In case of duplicates, the last +loaded definition will be used8 Both R CMD +Rd2pdf and R CMD Rdconv have an optional flag +--RdMacros=pkglist. The option is also a comma-separated list +of package names, and has priority over the value given in +DESCRIPTION. Packages using Rd macros should depend on +R 3.2.0 or later.

    Note: There should be no ‘Built’ or ‘Packaged’ fields, as these are @@ -1372,6 +1376,12 @@ visible (and if it is, it need not be the one from that namespace: give an error if the suggested package is not available, simply use e.g. rgl::plot3d.

    +

    Note that the recommendation to use suggested packages conditionally in +tests does also apply to packages used to manage test suites: a +notorious example was testthat which in version 1.0.0 contained +illegal C++ code and hence could not be installed on standards-compliant +platforms. +

    As noted above, packages in ‘Enhancesmust be used conditionally and hence objects within them should always be accessed via ::. @@ -1850,7 +1860,7 @@ Next:

    24) shell script configure in your package which (if present) is executed by R CMD INSTALL before any other action is performed. This can be a script created by the Autoconf mechanism, but may also be a script @@ -2016,8 +2026,7 @@ set the value of the LD_LIBRARY_PATH (or equivalent) environment variable, but that the secondary object is automatically resolved. Another example is when a package installs support files that are required at run time, and their location is substituted into an R -data structure at installation time. (This happens with the Java Archive -files in the Omegahat SJava package.) +data structure at installation time. @@ -2133,7 +2142,7 @@ these should be settable by users (sites) through appropriate personal (site-wide) Makevars files. See Customizing package compilation in R Installation and Administration,

    -

    There are some macros24 which are set whilst configuring the +

    There are some macros25 which are set whilst configuring the building of R itself and are stored in R_HOME/etcR_ARCH/Makeconf. That makefile is included as a Makefile after Makevars[.win], and the macros @@ -2155,7 +2164,7 @@ need to be included in PKG_LIBS. Beware that if it is empty then the R executable will contain all the double-precision and double-complex BLAS routines, but no single-precision nor complex routines. If BLAS_LIBS is included, then FLIBS also needs -to be25 included following it, as most BLAS +to be26 included following it, as most BLAS libraries are written at least partially in FORTRAN.

    @@ -2170,8 +2179,10 @@ point to an external LAPACK library, or may be empty if an external BLAS library also contains LAPACK.

    [libRlapack includes all the double-precision LAPACK routines -current in 2003: a list of which routines are included is in file -src/modules/lapack/README.] +which were current in 2003: a list of which routines are included is in +file src/modules/lapack/README. Note that an external LAPACK/BLAS +library need not do so, as some were ‘deprecated’ (and not compiled by +default) in LAPACK 3.6.0 in late 2015.]

    For portability, the macros BLAS_LIBS and FLIBS should always be included after LAPACK_LIBS (and in that order). @@ -2248,13 +2259,19 @@ all: $(SHLIB) $(SHLIB): mylibs mylibs: - (cd subdir; make) + (cd subdir; $(MAKE)) -

    Be careful to create all the necessary dependencies, as there is a no +

    Be careful to create all the necessary dependencies, as there is no guarantee that the dependencies of all will be run in a particular order (and some of the CRAN build machines use -multiple CPUs and parallel makes). +multiple CPUs and parallel makes). In particular, +

    +
    +
    all: mylibs
    +
    + +

    does not suffice.

    Note that on Windows it is required that Makevars[.win] does create a DLL: this is needed as it is the only reliable way to ensure @@ -2353,7 +2370,7 @@ Next: , Pre

    There is some support for packages which wish to use -OpenMP26. The +OpenMP27. The make macros

    @@ -2367,8 +2384,8 @@ SHLIB_OPENMP_FFLAGS Include the appropriate macro in PKG_CFLAGS, PKG_CPPFLAGS and so on, and also in PKG_LIBS. C/C++ code that needs to be conditioned on the use of OpenMP can be used inside #ifdef -_OPENMP: note that some toolchains used for R (including most of -those using clang27) have no OpenMP support at all, not even +_OPENMP: note that some toolchains used for R (including many of +those using clang28) have no OpenMP support at all, not even omp.h.

    For example, a package with C code written for OpenMP should have in @@ -2408,7 +2425,7 @@ have recent versions. OS X currently uses Apple builds of the Windows and earlier Apple OS X implementations have substantial overheads and are only beneficial if quite substantial tasks are run in parallel. Also, on Windows new threads are started with the -default28 FPU control +default29 FPU control word, so computations done on OpenMP threads will not make use of extended-precision arithmetic which is the default for the main process.

    @@ -2429,7 +2446,7 @@ assumption that the R process is entitled to use them all are both dubious assumptions. The best way to limit resources is to limit the overall number of threads available to OpenMP in the R process: this can be done via environment variable OMP_THREAD_LIMIT, where -implemented.29 Alternatively, the +implemented.30 Alternatively, the number of threads per region can be limited by the environment variable OMP_NUM_THREADS or API call omp_set_num_threads, or, better, for the regions in your code as part of their @@ -2478,17 +2495,17 @@ versions of OpenBSD used a different library name).

    POSIX threads are not normally used on Windows, which has its own native concepts of threads. However, there are two projects implementing pthreads on top of Windows, pthreads-w32 and -winpthreads (a recent part of the MinGW-w64 project). +winpthreads (part of the MinGW-w64 project).

    Whether Windows toolchains implement pthreads is up to the -toolchain provider: the currently recommended toolchain does by default -provide it. A make variable SHLIB_PTHREAD_FLAGS is -available: this should be included in both PKG_CPPFLAGS (or the -Fortran or F9x equivalents) and PKG_LIBS. +toolchain provider. A make variable +SHLIB_PTHREAD_FLAGS is available: this should be included in both +PKG_CPPFLAGS (or the Fortran or F9x equivalents) and +PKG_LIBS.

    The presence of a working pthreads implementation cannot be unambiguously determined without testing for yourself: however, that -‘_REENTRANT’ is defined30 in C/C++ code is a good indication. +‘_REENTRANT’ is defined31 in C/C++ code is a good indication.

    See also the comments on thread-safety and performance under OpenMP: on all known R platforms OpenMP is implemented via @@ -2706,7 +2723,7 @@ Next: 31) platforms have no Fortran +rare32) platforms have no Fortran 90/95 support.

    This means that portable packages need to be written in correct @@ -2767,11 +2784,18 @@ support for the C++98 standard (the widely used g++ deviates considerably from the standard). Some compilers have a concept of ‘C++03’ (‘essentially a bug fix’) or ‘C++ Technical Report 1’ (TR1), an optional addition to the ‘C++03’ revision which was published in 2007. -A revised standard was published in 2011 and compilers with fairly +A revised standard was published in 2011 and compilers with pretty much complete implementations are becoming available. C++11 added all of the C99 features which are not otherwise implemented in C++, and C++ -compilers commonly accept C99 extensions to C++98. A minor update to -C++11 (sometimes known as C++14) was approved in August 2014. +compilers commonly accept C99 extensions to C++98. A minor update to +C++11 (often known as C++14) was approved in August 2014. +

    +

    What standard a C++ compiler aims to support can be hard to determine. +As from version 6 (to be released in 2016), g++ will default +to C++14: earlier versions aim to support C++03 with many extensions +(including support for TR1). clang with its +native33 libcxx headers and library +includes many C++11 features, and does not support TR1.

    Since version 3.1.0, R has provided support for C++11 in packages in addition to C++98. This support is not uniform across platforms as it @@ -2815,7 +2839,7 @@ value). Hence this environment variable should be defined when invoking

    Further control over compilation of C++11 code can be obtained by specifying the macros ‘CXX1X’ and ‘CXX1XSTD’ when R is -configured32, or in a personal or site Makevars file. +configured34, or in a personal or site Makevars file. See Customizing package compilation in R Installation and Administration. If C++11 support is not available then these macros are both empty. Otherwise, ‘CXX1X’ defaults to the same value as the C++ @@ -2846,10 +2870,10 @@ known problems mixing C++11 with Fortran.) essential that it selects the correct compiler, via something like

    -
    CXX1X=`"${R_HOME}/bin/R" CMD config CXX11X`
    -CXX1XSTD=`"${R_HOME}/bin/R" CMD config CXX11XSTD`
    +
    CXX1X=`"${R_HOME}/bin/R" CMD config CXX1X`
    +CXX1XSTD=`"${R_HOME}/bin/R" CMD config CXX1XSTD`
     CXX="$(CXX1X) $(CXX1XSTD)"
    -CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXX11XFLAGS`
    +CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXX1XFLAGS`
     AC_LANG(C++)
     
    @@ -2890,7 +2914,7 @@ If you need R_LIBS set (to find packages in a non-standard library) you can set it in the environment: also you can use the check and build environment files (as specified by the environment variables R_CHECK_ENVIRON and R_BUILD_ENVIRON; if unset, -files33 ~/.R/check.Renviron and +files35 ~/.R/check.Renviron and ~/.R/build.Renviron are used) to set environment variables when using these utilities.

    @@ -2943,7 +2967,7 @@ operating system platforms. (Unix-alikes only).
  • The files are checked for binary executables, using a suitable version -of file if available34. (There may be +of file if available36. (There may be rare false positives.)
  • The DESCRIPTION file is checked for completeness, and some of its @@ -3027,7 +3051,7 @@ sections of Rd files are documented in the corresponding
  • The data directory is checked for non-ASCII characters and for the use of reasonable levels of compression. -
  • C, C++ and FORTRAN source and header files35 are +
  • C, C++ and FORTRAN source and header files37 are tested for portable (LF-only) line endings. If there is a Makefile or Makefile.in or Makevars or Makevars.in file under the src directory, it is checked @@ -3038,7 +3062,7 @@ for portable line endings and the correct use of ‘$(BLAS_LIBS)stdout/stderr instead of the console. Note that the latter might give false positives in that the symbols might be pulled in with external libraries and could never -be called. Windows36 users +be called. Windows38 users should note that the Fortran and C++ runtime libraries are examples of such external libraries.

    @@ -3085,7 +3109,7 @@ recorded in the log file). (If the vignette sources are in the deprecated location inst/doc, do mark such target output files to not be installed in .Rinstignore.) -

    If there is an error37 in executing the R code in vignette foo.ext, a log +

    If there is an error39 in executing the R code in vignette foo.ext, a log file foo.ext.log is created in the check directory. The vignette PDFs are re-made in a copy of the package sources in the vign_test subdirectory of the check directory, so for further @@ -3114,7 +3138,7 @@ a set of these customizations similar to those used by CRAN can be selected by the option --as-cran (which works best if Internet access is available). Some Windows users may need to set environment variable R_WIN_NO_JUNCTIONS to a non-empty -value. The test of cyclic declarations38in DESCRIPTION files needs +value. The test of cyclic declarations40in DESCRIPTION files needs repositories (including CRAN) set: do this in ~/.Rprofile, by e.g.

    @@ -3137,8 +3161,8 @@ environment of a function for later use.

    Complete checking of a package which contains a file README.md needs pandoc installed: see http://johnmacfarlane.net/pandoc/installing.html. This -should be reasonably current: CRAN used version 1.12.4.1 to -process these files at the time of writing +should be reasonably current: at the time of writing CRAN used +version 1.12.4.2 to process these files.

    You do need to ensure that the package is checked in a suitable locale if it contains non-ASCII characters. Such packages are likely @@ -3165,7 +3189,7 @@ as R_HOME/etc/i386/Renviron.site. to check the primary sub-architecture, and then to use something like R --arch=x86_64 CMD check --extra-arch or (Windows) /path/to/R/bin/x64/Rcmd check --extra-arch to run for each -additional sub-architecture just the checks39 which differ by sub-architecture. (This +additional sub-architecture just the checks41 which differ by sub-architecture. (This approach is required for packages which are installed by R CMD INSTALL --merge-multiarch.)

    @@ -3213,10 +3237,10 @@ using R CMD check prior to invoking the final build procedure. of exclude patterns in file .Rbuildignore in the top-level source directory. These patterns should be Perl-like regular expressions (see the help for regexp in R for the precise details), one per -line, to be matched case-insensitively40 against the file and directory names relative to the +line, to be matched case-insensitively42 against the file and directory names relative to the top-level package source directory. In addition, directories from -source control systems41 or from eclipse42, directories with names ending .Rcheck or -Old or old and files GNUMakefile43, Read-and-delete-me +source control systems43 or from eclipse44, directories with names ending .Rcheck or +Old or old and files GNUMakefile45, Read-and-delete-me or with base names starting with ‘.#’, or starting and ending with ‘#’, or ending in ‘~’, ‘.bak’ or ‘.swp’, are excluded by default. In addition, those files in the R, @@ -3408,7 +3432,7 @@ components intended to be installed.

    Sweave vignette sources are normally given the file extension .Rnw or .Rtex, but for historical reasons -extensions44 .Snw and +extensions46 .Snw and .Stex are also recognized. Sweave allows the integration of LaTeX documents: see the Sweave help page in R and the Sweave vignette in package utils for details on the @@ -3426,13 +3450,13 @@ re-make the vignettes (such as LaTeX style files, BibTeX input files and files for any figures not created by running the code in the vignette) must be in the vignette source directory.

    -

    R CMD build will automatically45 create the +

    R CMD build will automatically47 create the (PDF or HTML versions of the) vignettes in inst/doc for distribution with the package sources. By including the vignette outputs in the package sources it is not necessary that these can be re-built at install time, i.e., the package author can use private R packages, screen snapshots and LaTeX extensions which are only -available on his machine.46 +available on his machine.48

    By default R CMD build will run Sweave on all Sweave vignette source files in vignettes. If Makefile is found @@ -3445,7 +3469,7 @@ creation of PDF/HTML files and cleaning up afterwards (includ after Sweave), i.e., delete all files that shall not appear in the final package archive. Note that if the make step runs R it needs to be careful to respect the environment values of R_LIBS -and R_HOME47. +and R_HOME49. Finally, if there is a Makefile and it has a ‘clean:’ target, make clean is run.

    @@ -3686,7 +3710,7 @@ from other packages will cause these other packages to be loaded as well (unless they have already been loaded), but they will not be placed on the search path by these implicit loads. Thus code in the package can only depend on objects in its own namespace and its imports -(including the base namespace) being visible48. +(including the base namespace) being visible50.

    Namespaces are sealed once they are loaded. Sealing means that imports and exports cannot be changed and that internal variable @@ -3785,6 +3809,18 @@ package foo are to be imported. Using importFrom selectively rather than import is good practice and recommended notably when importing from packages with more than a dozen exports.

    +

    To import every symbol from a package but for a few exceptions, +pass the except argument to import. The directive +

    +
    +
    import(foo, except=c(bar, baz))
    +
    + +

    imports every symbol from foo except bar and +baz. The value of except should evaluate to something +coercible to a character vector, after substituting each symbol for +its corresponding string. +

    It is possible to export variables from a namespace which it has imported from other namespaces: this has to be done explicitly and not via exportPattern. @@ -3864,7 +3900,7 @@ detached, and unloaded. See help(".onLoad") for more det

    Since loading and attaching are distinct operations, separate hooks are provided for each. These hook functions are called .onLoad and -.onAttach. They both take arguments49 libname and +.onAttach. They both take arguments51 libname and pkgname; they should be defined in the namespace but not exported.

    @@ -3909,14 +3945,14 @@ Next: , Previous: <

    A NAMESPACE file can contain one or more useDynLib directives which allows shared objects that need to be -loaded.50 The directive +loaded.52 The directive

    useDynLib(foo)
     
    -

    registers the shared object foo51 for loading with library.dynam. +

    registers the shared object foo53 for loading with library.dynam. Loading of registered object(s) occurs after the package code has been loaded and before running the load hook function. Packages that would only need a load hook function to load a shared object can use the @@ -4074,8 +4110,6 @@ existing package. For example, package

    @@ -4161,7 +4195,7 @@ Previous: , Up: Some additional steps are needed for packages which make use of formal (S4-style) classes and methods (unless these are purely used internally). The package should have Depends: methods in its -DESCRIPTION file52 and import(methods) or +DESCRIPTION file54 and import(methods) or importFrom(methods, ...) plus any classes and methods which are to be exported need to be declared in the NAMESPACE file. For example, the stats4 package has @@ -4188,7 +4222,7 @@ export(AIC, BIC, nobs)

    All S4 classes to be used outside the package need to be listed in an exportClasses directive. Alternatively, they can be specified -using exportClassPattern53 in the same style as +using exportClassPattern55 in the same style as for exportPattern. To export methods for generics from other packages an exportMethods directive can be used.

    @@ -4216,7 +4250,7 @@ functions, and undoc in package tools will not rep

    If a package uses S4 classes and methods exported from another package, but does not import the entire namespace of the other -package54, it needs +package56, it needs to import the classes and methods explicitly, with directives

    @@ -4302,7 +4336,7 @@ not allowed under Windows which are mentioned above. (aka x11()) which although emulated on Windows may not be available on a Unix-alike (and is not the preferred screen device on OS X). It is rarely necessary for package code or examples to open a new -device, but if essential,55 use dev.new(). +device, but if essential,57 use dev.new().

    Use R CMD build to make the release .tar.gz file.

    @@ -4318,14 +4352,14 @@ actions are needed).
  • If your package has a Makevars or Makefile file, make sure that you use only portable make features. Such files should be -LF-terminated56 (including the final +LF-terminated58 (including the final line of the file) and not make use of GNU extensions. (The POSIX specification is available at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html; anything not documented there should be regarded as an extension to be avoided.) Commonly misused GNU extensions are conditional inclusions (ifeq and the like), ${shell ...} and ${wildcard -...}, and the use of +=57 and :=. Also, the use of $< other than in +...}, and the use of +=59 and :=. Also, the use of $< other than in implicit rules is a GNU extension, as is the $^ macro. Unfortunately makefiles which use GNU extensions often run on other platforms but do not have the intended results. @@ -4336,7 +4370,7 @@ platforms but do not have the intended results.
    PKG_CPPFLAGS = `gsl-config --cflags`
     
    -

    which works in all versions of make known58 to be used with +

    which works in all versions of make known60 to be used with R.

    If you really must require GNU make, declare it in the DESCRIPTION @@ -4346,6 +4380,11 @@ file by

    SystemRequirements: GNU make
     
    +

    and ensure that you use the value of environment variable MAKE +(and not just make) in your scripts. (On some platforms GNU +make is available under a name such as gmake, and there +SystemRequirements is used to set MAKE.) +

    If you only need GNU make for parts of the package which are rarely needed (for example to create bibliography files under vignettes), use a file called GNUmakefile rather than @@ -4356,12 +4395,12 @@ use GNU extensions in files Makevars.win or Makefile.win

  • Bash extensions also need to be avoided in shell scripts, including expressions in Makefiles (which are passed to the shell for processing). -Some R platforms use strict59 Bourne shells: the R toolset on Windows and some -Unix-alike OSes use ash -(https://en.wikipedia.org/wiki/Almquist_shell), a rather -minimal shell with few builtins. Beware of assuming that all the POSIX -command-line utilities are available, especially on Windows where only a -minimal set is provided for use with R. +Some R platforms use strict61 +Bourne shells: the R toolset on Windows and some Unix-alike OSes use +ash (https://en.wikipedia.org/wiki/Almquist_shell), +a rather minimal shell with few builtins. Beware of assuming that all +the POSIX command-line utilities are available, especially on Windows +where only a minimal set is provided for use with R. (See The command line tools in R Installation and Administration.) One particular issue is the use of echo, for which two behaviours are allowed @@ -4401,7 +4440,7 @@ on some R platforms (including 64-bit Windows), but 64-bit on most modern Unix and Linux platforms. It is rather unlikely that the use of long in C code has been thought through: if you need a longer type than int you should use a configure test for a C99 type such -as int_fast64_t (and failing that, long long 60) and typedef your own type +as int_fast64_t (and failing that, long long 62) and typedef your own type to be long or long long, or use another suitable type (such as size_t). @@ -4415,7 +4454,7 @@ and are not required to be implemented by the C99 standard). in C on all R platforms.

  • Under no circumstances should your compiled code ever call abort -or exit61: these terminate the user’s R process, quite possibly +or exit63: these terminate the user’s R process, quite possibly including all his unsaved work. One usage that could call abort is the assert macro in C or C++ functions, which should never be active in production code. The normal way to ensure that is to define @@ -4434,7 +4473,7 @@ calls may come from external software and may never be called, but package authors are often mistaken about that.
  • Compiled code should not call the system random number generators such -as rand, drand48 and random62, but rather use the +as rand, drand48 and random64, but rather use the interfaces to R’s RNGs described in Random numbers. In particular, if more than one package initializes the system RNG (e.g. via srand), they will interfere with each other. @@ -4466,7 +4505,7 @@ sometimes against the copy compiled into R and sometimes against the system dynamic library. The only safe solution is to rename the entry points in the copy in the package. We have even seen problems with entry point name myprintf, which is a system entry -point63 on some Linux systems. +point65 on some Linux systems.
  • Conflicts between symbols in DLLs are handled in very platform-specific ways. Good ways to avoid trouble are to make as many symbols as @@ -4497,14 +4536,14 @@ work as intended. For alternatives, see Suggested in batch mode when checking. So they should behave appropriately in both scenarios, conditioning by interactive() the parts which need an operator or observer. For instance, progress -bars64 are only appropriate in +bars66 are only appropriate in interactive use, as is displaying help pages or calling View() (see below).
  • Be careful with the order of entries in macros such as PKG_LIBS. Some linkers will re-order the entries, and behaviour can differ between dynamic and static libraries. Generally -L options should -precede65 the libraries (typically +precede67 the libraries (typically specified by -l options) to be found from those directories, and libraries are searched once in the order they are specified. Not all linkers allow a space after -L . @@ -4512,14 +4551,18 @@ all linkers allow a space after -L .
  • The ar utility is often used in makefiles to make static libraries. Its modifier u is defined by POSIX but is disabled in GNU ar on some recent Linux distributions which use -‘deterministic mode’. The safe way to make a static library is to first +‘deterministic mode’. The safest way to make a static library is to first remove any existing file of that name then use ar -cr and then ranlib if needed (which is system-dependent: on most -systems66 ar always -maintains a symbol table). +systems68 ar always +maintains a symbol table). The POSIX standard says options should be +preceded by a hyphen (as in -cr), although most OSes accept +them without. +Note that on some systems ar -cr must have at least one file +specified.
  • Some people have a need to set a locale. Locale names are not portable, -and e.g. ‘fr_FR.utf8’ is common used on Linux but not accepted on +and e.g. ‘fr_FR.utf8’ is commonly used on Linux but not accepted on either Solaris or OS X. ‘fr_FR.UTF-8’ is more portable, being accepted on recent Linux, AIX, FreeBSD, OS X and Solaris (at least). However, some Linux distributions micro-package, so locales defined by @@ -4560,7 +4603,7 @@ for routine use. Most R platforms use ‘ix86’ or but not all of their FPU instructions. Thus the achieved precision can depend on the compiler version and optimization flags—our experience is that 32-bit builds tend to be less precise than 64-bit ones. But not -all platforms use those CPUs, and not all67 which use them configure them to +all platforms use those CPUs, and not all69 which use them configure them to allow the use of extended precision. In particular, ARM CPUs do not (currently) have extended precision nor long doubles, and long double was 64-bit on HP/PA Linux. @@ -4569,7 +4612,7 @@ was 64-bit on HP/PA Linux. build R with --disable-long-double and use appropriate compiler flags (such as -ffloat-store and -fexcess-precision=standard for gcc, depending on the -CPU type68) to +CPU type70) to mitigate the effects of extended-precision calculations.

    Tests which involve random inputs or non-deterministic algorithms should @@ -4609,7 +4652,7 @@ done for the R reference manual at excessively high resolution. These are often best re-generated (for example Sweave defaults to 300 ppi, and 100–150 is more appropriate for a package manual). These tools include Adobe Acrobat -(not Reader), Apple’s Preview69 and Ghostscript (which +(not Reader), Apple’s Preview71 and Ghostscript (which converts PDF to PDF by

    @@ -4688,7 +4731,7 @@ possible to mark the encoding used in the DESCRIPTION file and in

    First, consider carefully if you really need non-ASCII text. Many users of R will only be able to view correctly text in their native language group (e.g. Western European, Eastern European, -Simplified Chinese) and ASCII.70. Other characters may not be rendered at all, +Simplified Chinese) and ASCII.72. Other characters may not be rendered at all, rendered incorrectly, or cause your R code to give an error. For .Rd documentation, marking the encoding and including ASCII transliterations is likely to do a reasonable job. The @@ -4718,7 +4761,7 @@ this, make sure you have ‘R (>= 2.10)’ (or later) in

    R sessions running in non-UTF-8 locales will if possible re-encode such strings for display (and this is done by RGui on Windows, for example). Suitable fonts will need to be selected or made -available71 both for the console/terminal and graphics devices such as +available73 both for the console/terminal and graphics devices such as ‘X11()’ and ‘windows()’. Using ‘postscript’ or ‘pdf’ will choose a default 8-bit encoding depending on the language of the UTF-8 locale, and your users would need to be told how @@ -4756,6 +4799,15 @@ functions at http://www.cplusplus. http://en.cppreference.com/w/ and compare what is defined in the various standards.

    +

    Both the compiler and OS (via system header files, which differ +by architecture even for nominally the same OS) affect the compilability +of C/C++ code. Compilers from the GCC, clang, Intel and +Solaris Studio suites are routinely used with R, and both +clang and Solaris have more than one implementation of C++ +headers and library. The range of possibilities makes comprehensive +empirical checking impossible, and regrettably compilers are patchy at +best on warning about non-standard code. +

    • Mathematical functions such as sqrt are defined in C++ for floating-point arguments. It is legitimate in C++ to overload these @@ -4763,13 +4815,21 @@ with versions for types float, double, long doub and possibly more. This means that calling sqrt on an integer type may have ‘overloading ambiguity’ as it could be promoted to any of the supported floating-point types: this is commonly seen on Solaris, -but for pow also seen on OS X. (C++11 requires additional -overloads for integer types.) +but for pow also seen on OS X. (C++98 has an overload for +std::pow(<double>, <int>), but this may not be visible from the +main namespace. C++11 requires additional overloads for integer types, +and ambiguous overloads are more common in C++11 (and later) compiler +modes.)

      A not-uncommonly-seen problem is to mistakenly call floor(x/y) or ceil(x/y) for int arguments x and y. Since x/y does integer division, the result is an int and -‘overloading ambiguity’ may be reported. +‘overloading ambiguity’ may be reported. Some people have (pointlessly) +called floor and ceil on integer arguments, which may have +an ‘overloading ambiguity’. +

      +

      A surprising common misuse is things like pow(10, -3): this +should be the constant 1e-3.

    • Function fabs is defined only for floating-point types, except in C++11 which has overloads for std::fabs in <cmath> for @@ -4777,7 +4837,7 @@ integer types. Function abs is defined in C99’s <stdlib.h> for int and in C++98’s <cstdlib> for integer types, overloaded in <cmath> for floating-point types. C++11 has additional overloads for std::abs in <cmath> for -integer types. The effect of calling abs for a floating-point +integer types. The effect of calling abs with a floating-point type is implementation-specific: it may truncate to an integer.
    • Functions/macros such as isnan, isinf and isfinite @@ -4787,10 +4847,21 @@ way to make use of these functions which works with all C++ compilers currently in use on R platforms: use R’s versions such as ISNAN and R_FINITE instead. +

      If you must use them in C++11, beware that some +compilers74 provide both +std::isnan and ::isnan, so using +

      +
      +
      using namespace std;
      +
      + +

      may cause ‘overloading ambiguity’ and you must use std::isnan +etc explicitly. +

      It is an error (and make little sense, although has been seen) to call these functions for integer arguments.

      -
    • The GNU compilers have a large number of non-portable extensions. For +
    • The GNU compilers support a large number of non-portable extensions. For example, INFINITY (which is in C99 but not C++98), for which R provides the portable R_PosInf (and R_NegInf for -INFINITY). And NAN is just one NaN value: in R code @@ -4801,17 +4872,22 @@ available. https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html and https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Extensions.html.

      -
    • Including C headers in C++ code is not portable. Including the C -header math.h in C++ code often causes conflicts with -cmath which may be included by other headers. This is -particularly problematic with C++11 compilers, as functions like -sqrt and isnan are defined for double arguments in -math.h and for a range of types including double in -cmath. +
    • Including C-style headers in C++ code is not portable. Including the +legacy header75 math.h in C++ code may conflict with cmath which +may be included by other headers. This is particularly problematic with +C++11 compilers, as functions like sqrt and isnan are +defined for double arguments in math.h and for a range of +types including double in cmath. Similar issues have been +seen for stdlib.h and cstdlib. Historically, including +the C++ version first was a sufficient workaround but for some 2016 +compilers only one can be included.
    • Variable-length arrays are C99, not supported by C++98 nor by the C++ compilers in use with R on some platforms. +
    • The restrict qualifier is C99/C11 but not part of C++11 and not +supported by some C++ compilers used with R. +
    • Be careful to include the headers which define the functions you use. Some compilers/OSes include other system headers in their headers which are not required by the standards, and so code may compile on such @@ -4819,7 +4895,11 @@ systems and not on others. (A prominent example is the C++11 header <random> which is indirectly included by <algorithm> by g++. Another frequent issue is the C header <time.h> which is included by other headers on Linux and Windows but not OS X nor -Solaris.) +Solaris.) Another common issue is that malloc, calloc, +realloc and free are defined by C99 in the header +stdlib.h and (in the std:: namespace) by C++ header +cstdlib. Some earlier implementations used a header +malloc.h, but that is not portable and does not exist on OS X.
    • For C++ code, be careful to specify namespaces where needed. Many functions are defined by the standards to be in the std @@ -4839,7 +4919,9 @@ The most common issue involves the names of the Intel CPU registers such as CS, DS, ES, FS, GS and SS (and more with longer abbreviations) defined on i586/x64 Solaris in <sys/regset.h> and often included indirectly by <stdlib.h> -and other core headers. +and other core headers. Further examples are ERR, zero +and I (which is defined in Solaris’ <complex.h> as a +compiler intrinsic for the imaginary unit).
    • typedefs in OS headers can conflict with those in the package: an example is index_t defined in <sys/types.h> on Solaris. @@ -5226,7 +5308,7 @@ bibentry(bibtype = "Manual",

      Note the way that information that may need to be updated is picked up from object meta, a parsed version of the DESCRIPTION -file72 – it is +file76 – it is tempting to hardcode such information, but it normally then gets outdated. See ?bibentry for further details of the information which can be provided. @@ -5444,7 +5526,7 @@ header is mandatory.

      Information is given within a series of sections with standard names (and user-defined sections are also allowed). Unless otherwise -specified73 these should occur only once in an Rd +specified77 these should occur only once in an Rd file (in any order), and the processing software will retain only the first occurrence of a standard section in the file, with a warning.

      @@ -5520,7 +5602,7 @@ particular, functions) are given in this subsection.
      \name{name}
      -

      name typically74 is the basename of +

      name typically78 is the basename of the Rd file containing the documentation. It is the “name” of the Rd object represented by the file and has to be unique in a package. To avoid problems with indexing the package manual, it may not @@ -5529,7 +5611,7 @@ with the HTML help system it should not contain ‘ (LaTeX special characters are allowed, but may not be collated correctly in the index.) There can only be one \name entry in a file, and it must not contain any markup. Entries in the package manual -will be in alphabetic75 order +will be in alphabetic79 order of the \name entries.

      @@ -5709,7 +5791,7 @@ form

    for each component of the list returned. Optional text may -precede76 this +precede80 this list (see for example the help for rle). Note that \value is implicitly a \describe environment, so that environment should not be used for listing components, just individual \item{}{} @@ -5804,18 +5886,18 @@ info).

    Finally, there is \donttest, used (at the beginning of a separate line) to mark code that should be run by example() but not by -R CMD check (by default: as from R 3.2.0 the option ---run-donttest can be used). This should be needed only -occasionally but can be used for code which might fail in circumstances -that are hard to test for, for example in some locales. (Use -e.g. capabilities() or nzchar(Sys.which("someprogram")) to -test for features needed in the examples wherever possible, and you can -also use try() or tryCatch(). Use interactive() to -condition examples which need someone to interact with.) Note that code -included in \donttest must be correct R code, and any packages -used should be declared in the DESCRIPTION file. It is good -practice to include a comment in the \donttest section explaining -why it is needed. +R CMD check (by default: the option --run-donttest can +be used). This should be needed only occasionally but can be used for +code which might fail in circumstances that are hard to test for, for +example in some locales. (Use e.g. capabilities() or +nzchar(Sys.which("someprogram")) to test for features needed in +the examples wherever possible, and you can also use try() or +tryCatch(). Use interactive() to condition examples which +need someone to interact with.) Note that code included in +\donttest must be correct R code, and any packages used should +be declared in the DESCRIPTION file. It is good practice to +include a comment in the \donttest section explaining why it is +needed.

    @@ -6179,7 +6261,7 @@ a hyperlink in HTML and PDF conversion. Displayed using Web. The argument is handled as ‘verbatim’ text (with percent and braces escaped by backslash), and rendered as a hyperlink in HTML and PDF conversion. Linefeeds are removed, and as from R 3.2.0 leading -and trailing whitespace77 is removed. See Specifying URLs. +and trailing whitespace81 is removed. See Specifying URLs.

    Displayed using typewriter font where possible.

    @@ -6202,7 +6284,7 @@ them.
    \var{metasyntactic_variable}

    Indicate a metasyntactic variable. In some cases this will be rendered -distinctly, e.g. in italic, but not in all78. LaTeX-like. +distinctly, e.g. in italic, but not in all82. LaTeX-like.

    \env{environment_variable}
    @@ -6344,7 +6426,7 @@ given above. bar.html respectively. These are rarely needed, perhaps to refer to not-yet-installed packages (but there the HTML help system will resolve the link at run time) or in the normally undesirable event -that more than one package offers help on a topic79 (in +that more than one package offers help on a topic83 (in which case the present package has precedence so this is only needed to refer to other packages). They are currently only used in HTML help (and ignored for hyperlinks in LaTeX conversions of help pages), and @@ -6447,8 +6529,8 @@ logo in both HTML (using the simple form) and LaTeX (using th expert form), the following could be used:

    -
    \if{html}{\figure{logo.jpg}{Our logo}}
    -\if{latex}{\figure{logo.jpg}{options: width=0.5in}}
    +
    \if{html}{\figure{Rlogo.svg}{options: width=100 alt="R logo"}}
    +\if{latex}{\figure{Rlogo.pdf}{options: width=0.5in}}
     

    The files containing the figures should be stored in the directory @@ -6474,7 +6556,7 @@ Next: , Previous: …’, and \ldots -for ellipsis dots in ordinary text.80 These can be followed by +for ellipsis dots in ordinary text.84 These can be followed by {}, and should be unless followed by whitespace.

    After an unescaped ‘%’, you can put your own comments regarding the @@ -6485,7 +6567,7 @@ of the “help” invisible.

    You can produce a backslash (‘\’) by escaping it by another backslash. (Note that \cr is used for generating line breaks.)

    -

    The “comment” character ‘%’ and unpaired braces81 +

    The “comment” character ‘%’ and unpaired braces85 almost always need to be escaped by ‘\’, and ‘\\’ can be used for backslash and needs to be when there two or more adjacent backslashes). In R-like code quoted strings are handled slightly @@ -6856,7 +6938,7 @@ in finding non-ASCII bytes in the files.)

    For convenience, encoding names ‘latin1’ and ‘latin2’ are always recognized: these and ‘UTF-8’ are likely to work fairly widely. However, this does not mean that all characters in UTF-8 will -be recognized, and the coverage of non-Latin characters82 is fairly low. Using LaTeX +be recognized, and the coverage of non-Latin characters86 is fairly low. Using LaTeX inputenx (see ?Rd2pdf in R) will give greater coverage of UTF-8.

    @@ -7066,12 +7148,12 @@ Next: -

    It is possible to profile R code on Windows and most83 Unix-alike versions of +

    It is possible to profile R code on Windows and most87 Unix-alike versions of R.

    The command Rprof is used to control profiling, and its help page can be consulted for full details. Profiling works by recording -at fixed intervals84 (by default every 20 msecs) +at fixed intervals88 (by default every 20 msecs) which line in which R function is being used, and recording the results in a file (default Rprof.out in the working directory). Then the function summaryRprof or the command-line utility @@ -7109,6 +7191,7 @@ Total run time: 22.52 seconds. Total seconds: time spent in function and callees. Self seconds: time spent in function alone.

    +
     
       %       total       %        self
      total    seconds     self    seconds    name
      100.0     25.22       0.2      0.04     "boot"
    @@ -7126,6 +7209,7 @@ Self seconds: time spent in function alone.
       12.3      3.10       2.7      0.68     "assign"
      ...
     
    +
     
       %        self        %      total
       self    seconds     total   seconds    name
        5.7      1.44       7.5      1.88     "inherits"
    @@ -7681,7 +7765,7 @@ Browse[1]>
     
     

    At the browser prompt one can enter any R expression, so for example ls() lists the objects in the current frame, and entering the -name of an object will85 print it. The following commands are +name of an object will89 print it. The following commands are also accepted

    An alternative is to pipe the output through -asan_symbolize.py93 and perhaps +asan_symbolize.py97 and perhaps then (for compiled C++ code) c++filt. (On OS X, you may need to run dsymutil to get line-number reports.)

    @@ -8326,10 +8410,10 @@ CFLAGS="-fno-omit-frame-pointer -g -O2 -Wall -pedantic -mtune=native" into the R executable. However this check can be enabled on a per-package basis by using a ~/.R/Makevars file like

    -
    CC = gcc-4.9 -std=gnu99 -fsanitize=address -fno-omit-frame-pointer
    -CXX = g++-4.9 -fsanitize=address -fno-omit-frame-pointer
    -F77 = gfortran-4.9 -fsanitize=address
    -FC = gfortran-4.9 -fsanitize=address
    +
    CC = gcc -std=gnu99 -fsanitize=address -fno-omit-frame-pointer
    +CXX = g++ -fsanitize=address -fno-omit-frame-pointer
    +F77 = gfortran -fsanitize=address
    +FC = gfortran -fsanitize=address
     

    (Note that -fsanitize=address has to be part of the compiler specification to ensure it is used for linking. These settings will not @@ -8423,20 +8507,19 @@ packages are attempts to coerce a NaN or infinity to type might be NA_INTEGER.

    ‘UBSanitizer’ is a tool for C/C++ source code selected by --fsanitize=undefined in suitable builds of clang, and -GCC as from 4.9.0. Its (main) runtime library is linked into each -package’s DLL, so it is less often needed to be included in -MAIN_LDFLAGS. +-fsanitize=undefined in suitable builds98 of clang and GCC. Its (main) runtime library is +linked into each package’s DLL, so it is less often needed to be +included in MAIN_LDFLAGS.

    Some versions have greatly increased compilation times on a few -files94. +files99.

    This sanitizer can be combined with the Address Sanitizer by -fsanitize=undefined,address (where both are supported).

    Finer control of what is checked can be achieved by other options: for clang see -http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation.95 +http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation.100 The current set for clang is (on a single line):

    -fsanitize=alignment,bool,bounds,enum,float-cast-overflow,
    @@ -8472,14 +8555,17 @@ that would need to be linked by clang++, not clang: yo
     could try building R with something like
     

    MAIN_LD="clang++ -fsanitize=undefined"
    -R_OPENMP_CFLAGS="-fopenmp=libomp"
     
    -

    or add -lclang_rt.asan_cxx-x86_6496 or similar to LD_FLAGS). +

    and perhaps for clang 3.7.x +

    +
    R_OPENMP_CFLAGS="-fopenmp=libomp"
    +
    +

    or add -lclang_rt.asan_cxx-x86_64101 or similar to LD_FLAGS).

    See https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html (or the manual for your version of GCC, installed or via https://gcc.gnu.org/onlinedocs/) for the options supported by -GCC: 5.2.0 supports +GCC: 5.3 supports

    -fsanitize=alignment,bool,bounds,enum,float-cast-overflow,
     integer-divide-by-zero,non-null-attribute,null,object-size,
    @@ -8495,6 +8581,12 @@ desirable for R uses).  At the time of writing the object-size
     and vptr checks produced many warnings on GCC’s own C++ headers,
     so should be disabled.
     

    +

    GCC 6 will add +

    +
    -fsanitize=bounds-strict
    +
    +

    an extension of bounds to ‘flexible array member-like arrays’. +

    Other useful flags include

    @@ -8553,7 +8645,7 @@ Next:

    http://www.drmemory.org/ is a memory checker for (currently) 32-bit Windows, Linux and OS X with similar aims to -valgrind. It works with unmodified executables97 +valgrind. It works with unmodified executables102 and detects memory access errors, uninitialized reads and memory leaks.


    @@ -8986,7 +9078,7 @@ can be used with other languages which can generate C interfaces, for example C++ (see Interfacing C++ code).

    The first argument to each function is a character string specifying the -symbol name as known98 to C or +symbol name as known103 to C or FORTRAN, that is the function or subroutine name. (That the symbol is loaded can be tested by, for example, is.loaded("cg"). Use the name you pass to .C or .Fortran rather than the translated @@ -9110,7 +9202,7 @@ elements of the C array are copied to create new elements of a character vector. This means that the contents of the character strings of the char ** array can be changed, including to \0 to shorten the string, but the strings cannot be lengthened. It is -possible99 to allocate a new string via +possible104 to allocate a new string via R_alloc and replace an entry in the char ** array by the new string. However, when character vectors are used other than in a read-only way, the .Call interface is much to be preferred. @@ -9384,7 +9476,7 @@ static R_CMethodDef cMethods[] = {

    One can also specify whether each argument is used simply as input, or as output, or as both input and output. The style field in the description of a method is used for this. The purpose is to -allow100 R to transfer values +allow105 R to transfer values more efficiently across the R-C/FORTRAN interface by avoiding copying values when it is not necessary. Typically, one omits this information in the registration data. @@ -9436,8 +9528,6 @@ methods can contain as.integer(m), as.integer(n))$p

    - - @@ -9566,9 +9656,9 @@ needs to declare them as a comma-separated list in the field that the include directories in the installed linked-to packages are added to the include paths for C and C++ code.

    -

    It must specify101 +

    It must specify106Imports’ or ‘Depends’ of those packages, for they have to be -loaded102 prior to this one +loaded107 prior to this one (so the path to their compiled code has been registered).

    @@ -9786,6 +9876,7 @@ Copyright (C) 2012 The R Foundation for Statistical Computing ... Type "q()" to quit R.
    +
     
    R> dyn.load(paste("X", .Platform$dynlib.ext, sep = ""))
     constructor Y
     R> .C("X_main")
    @@ -9808,13 +9899,27 @@ possible.  Examples have been seen where merely loading a DLL that
     contained calls to C++ I/O upset R’s own C I/O (for example by
     resetting buffers on open files).
     

    -

    Most R header files can be included within C++ programs, and they +

    Most R header files can be included within C++ programs but they should not be included within an extern "C" block (as -they include C++ system headers). It may not be possible to include -some R headers as they in turn include C header files that may cause -conflicts—if this happens, define ‘NO_C_HEADERS’ before including -the R headers, and include C++ versions (such as ‘cmath’) of the -appropriate headers yourself before the R headers. +they include system headers108). It may not be possible +to include some R headers as they in turn include system header files +that may cause conflicts—if this happens, try defining +‘NO_C_HEADERS’ before including the R headers, and include C++ +versions (such as ‘cmath’ and ‘cstdlib’) of the appropriate +headers yourself before the R headers. (Headers R.h and +Rmath.h support ‘NO_C_HEADERS’: the legacy header S.h +does not. Header Rinternals.h does as from R 3.3.0.) +

    +

    By default header Rmath.h includes math.h or cmath. +Header R.h includes +

    +
    +
    limits.h math.h stddef.h stdio.h stdlib.h string.h
    +
    + +

    or their C++ equivalents directly or indirectly, and either +stddef.h or cstddef needs to be included before R.h +if ‘NO_C_HEADERS’ is defined.


    @@ -9916,7 +10021,7 @@ PKG_LIBS=-L"$(PKGB_PATH)$(R_ARCH)" -lpackB

    This will work for installation, but very likely not when package packB is loaded, as the path to package packB’s lib -directory is not in the ld.so103 search path. You can arrange to +directory is not in the ld.so109 search path. You can arrange to put it there before R is launched by setting (on some platforms) LD_RUN_PATH or LD_LIBRARY_PATH or adding to the ld.so cache (see man ldconfig). On platforms that @@ -10088,7 +10193,7 @@ the arguments can be extracted.

    In each case the R objects are available for manipulation via a set of functions and macros defined in the header file -Rinternals.h or some S-compatibility macros104 defined +Rinternals.h or some S-compatibility macros110 defined in Rdefines.h. See Interface functions .Call and .External for details on .Call and .External.

    @@ -10107,7 +10212,7 @@ interfaces as read-only.

    To handle R objects from within C code we use the macros and functions that have been used to implement the core parts of R. A -public105 subset of these is defined in the header file +public111 subset of these is defined in the header file Rinternals.h in the directory R_INCLUDE_DIR (default R_HOME/include) that should be available on any R installation. @@ -10119,7 +10224,7 @@ make use of the source code for inspirational examples.

    It is necessary to know something about how R objects are handled in C code. All the R objects you will deal with will be handled with -the type SEXP106, which is a +the type SEXP112, which is a pointer to a structure with typedef SEXPREC. Think of this structure as a variant type that can handle all the usual types of R objects, that is vectors of various modes, functions, @@ -10369,7 +10474,7 @@ object, you can change the type by using

    Protection is needed as a new object is created; the object formerly pointed to by the SEXP is still protected but now -unused.107 +unused.113

    All the coercion functions do their own error-checking, and generate NAs with a warning or stop with an error as appropriate. @@ -10463,6 +10568,7 @@ considerably faster to store the result and index that. SET_VECTOR_ELT(dimnames, 1, getAttrib(y, R_NamesSymbol)); setAttrib(ans, R_DimNamesSymbol, dimnames);

    +
     
        UNPROTECT(3);
         return ans;
     }
    @@ -10593,6 +10699,7 @@ SEXP getListElement(SEXP list, const char *str)
     {
         SEXP elmt = R_NilValue, names = getAttrib(list, R_NamesSymbol);
     
    +
     
        for (int i = 0; i < length(list); i++)
     	if(strcmp(CHAR(STRING_ELT(names, i)), str) == 0) {
     	   elmt = VECTOR_ELT(list, i);
    @@ -10699,7 +10806,7 @@ creates a new binding or changes the value of an existing binding in the
     specified environment frame; it is the analogue of assign(symbol,
     value, envir = rho, inherits = FALSE), but unlike assign,
     defineVar does not make a copy of the object
    -value.108  setVar searches for an existing
    +value.114  setVar searches for an existing
     binding for symbol in rho or its enclosing environments.
     If a binding is found, its value is changed to value.  Otherwise,
     a new binding with the specified value is created in the global
    @@ -11293,6 +11400,7 @@ The C code is
         return ans;
     }
     
    +
     
    double feval(double x, SEXP f, SEXP rho)
     {
         // a version with (too) much PROTECT()ion .. "better safe than sorry"
    @@ -11304,18 +11412,21 @@ The C code is
         return(REAL(eval(f, rho))[0]);
     }
     
    +
     
    SEXP zero(SEXP f, SEXP guesses, SEXP stol, SEXP rho)
     {
         double x0 = REAL(guesses)[0], x1 = REAL(guesses)[1],
     	   tol = REAL(stol)[0];
         double f0, f1, fc, xc;
     
    +
     
        if(tol <= 0.0) error("non-positive tol value");
         f0 = feval(x0, f, rho); f1 = feval(x1, f, rho);
         if(f0 == 0.0) return mkans(x0);
         if(f1 == 0.0) return mkans(x1);
         if(f0*f1 > 0.0) error("x[0] and x[1] have the same sign");
     
    +
     
        for(;;) {
     	xc = 0.5*(x0+x1);
     	if(fabs(x0-x1) < tol) return  mkans(xc);
    @@ -11400,16 +11511,19 @@ SEXP numeric_deriv(SEXP args)
         double tt, xx, delta, eps = sqrt(DOUBLE_EPS), *rgr, *rans;
         int i, start;
     
    +
     
        expr = CADR(args);
         if(!isString(theta = CADDR(args)))
     	error("theta should be of type character");
         if(!isEnvironment(rho = CADDDR(args)))
     	error("rho should be an environment");
     
    +
     
        ans = PROTECT(coerceVector(eval(expr, rho), REALSXP));
         gradient = PROTECT(allocMatrix(REALSXP, LENGTH(ans), LENGTH(theta)));
         rgr = REAL(gradient); rans = REAL(ans);
     
    +
     
        for(i = 0, start = 0; i < LENGTH(theta); i++, start += LENGTH(ans)) {
     	par = PROTECT(findVar(installChar(STRING_ELT(theta, i)), rho));
     	tt = REAL(par)[0];
    @@ -11423,6 +11537,7 @@ SEXP numeric_deriv(SEXP args)
     	UNPROTECT(2); /* par, ans1 */
         }
     
    +
     
        dimnames = PROTECT(allocVector(VECSXP, 2));
         SET_VECTOR_ELT(dimnames, 1,  theta);
         dimnamesgets(gradient, dimnames);
    @@ -11478,7 +11593,7 @@ corresponding to the i’th element of the STRSXP
     theta.  Here, STRING_ELT(theta, i) accesses the
     i’th element of the STRSXP theta.  Macro
     CHAR() extracts the actual character
    -representation109 of it: it returns a pointer.  We then
    +representation115 of it: it returns a pointer.  We then
     install the name and use findVar to find its value.
     

    @@ -11540,7 +11655,7 @@ Next: 110. +R_ext/Parse.h116.

    An example of the usage can be found in the (example) Windows package windlgs included in the R source tree. The essential part is @@ -11839,8 +11954,9 @@ obtained by defining ‘USE_RINTERNALS’ before including that your code compiles without ‘USE_RINTERNALS’ defined, as this provides a stricter test that the accessors have been used correctly. Note too that the use of ‘USE_RINTERNALS’ when the header is -included in C++ code is not supported: doing so uses C99 features which -are not necessarily in C++. +included in C++ code is not supported: doing so may use C99 features +which are not necessarily supported by the C++ compiler. Nor is use +with Rdefines.h supported.


    @@ -11980,19 +12096,8 @@ be changed with considerable notice. there that can be included too, but many of the features they contain should be regarded as undocumented and unstable.

    -

    An alternative is to include the header file S.h, which may be -useful when porting code from S. This includes rather less than -R.h, and has some extra compatibility definitions (for example -the S_complex type from S). -

    -

    The defines used for compatibility with S sometimes causes -conflicts (notably with Windows headers), and the known -problematic defines can be removed by defining STRICT_R_HEADERS. -

    Most of these header files, including all those included by R.h, -can be used from C++ code. Some others need to be included within an -extern "C" declaration, and for clarity this is advisable for all -R header files. +can be used from C++ code.

    Note: Because R re-maps many of its external names to avoid clashes with @@ -12000,7 +12105,7 @@ user code, it is essential to include the appropriate header files when using these entry points.

    -

    This remapping can cause problems111, and can be eliminated by defining R_NO_REMAP and +

    This remapping can cause problems117, and can be eliminated by defining R_NO_REMAP and prepending ‘Rf_’ to all the function names used from Rinternals.h and R_ext/Error.h. These problems can usually be avoided by including other headers (such as system headers @@ -12803,16 +12908,23 @@ accurately even for small x, i.e., 0 < x < 0.5.

    Computes cos(pi * x) (where pi is 3.14159...), accurately, notably for half integer x.

    -

    This might be provided by your platform112, in which case it is not included in Rmath.h, but is -in math.h which Rmath.h includes. +

    This might be provided by your platform118, in which case it is not included in Rmath.h, but is +in math.h which Rmath.h includes. (Ensure that +neither math.h nor cmath is included before +Rmath.h or define +

    +
    #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
    +
    +

    before the first inclusion.)

    Function: double sinpi (double x)

    Computes sin(pi * x) accurately, notably for (half) integer x.

    -

    This might be provided by your platform, in which case it is not included -in Rmath.h, but is in math.h which Rmath.h includes. +

    This might be provided by your platform, in which case it is not +included in Rmath.h, but is in math.h which Rmath.h +includes (but see the comments for cospi).

    @@ -12820,13 +12932,14 @@ in Rmath.h, but is in math.h which Rmath.h

    Computes tan(pi * x) accurately, notably for (half) integer x.

    This might be provided by your platform, in which case it is not included -in Rmath.h, but is in math.h which Rmath.h includes. +in Rmath.h, but is in math.h which Rmath.h includes +(but see the comments for cospi).

    Function: double logspace_add (double logx, double logy)
    Function: double logspace_sub (double logx, double logy)
    -
    Function: double logspace_sum (double* logx, int n)
    +
    Function: double logspace_sum (const double* logx, int n)

    Compute the log of a sum or difference from logs of terms, i.e., “x + y” as log (exp(logx) + exp(logy)) and “x - y” as log (exp(logx) - exp(logy)), @@ -13141,16 +13254,21 @@ The following is declared in header file Rinternals.h.

    Function: void R_orderVector (int* indx, int n, SEXP arglist, Rboolean nalast, Rboolean decreasing)
    +
    Function: void R_orderVector1 (int* indx, int n, SEXP x, Rboolean nalast, Rboolean decreasing)
    -

    This corresponds to R’s order(..., na.last, decreasing). +

    R_orderVector() corresponds to R’s order(..., na.last, decreasing). More specifically, indx <- order(x, y, na.last, decreasing) corresponds to R_orderVector(indx, n, Rf_lang2(x, y), nalast, decreasing) and for three vectors, Rf_lang3(x,y,z) is used as arglist.

    -

    Note that R_orderVector() assumes the vector indx -to be allocated to length >= n. On return, indx[] -contains a permutation of 0:(n-1), i.e., 0-based C indices (and not -1-based R indices, as R’s order()). +

    Both R_orderVector and R_orderVector1 assume the vector +indx to be allocated to length >= n. On return, +indx[] contains a permutation of 0:(n-1), i.e., 0-based C +indices (and not 1-based R indices, as R’s order()). +

    +

    When ordering only one vector, R_orderVector1 is faster and +corresponds (but is 0-based) to R’s indx <- order(x, na.last, +decreasing). It was added in R 3.3.0.

    All other sort routines are declared in header file @@ -13227,6 +13345,7 @@ See R’s help page ?max.col.

    Function: int findInterval (double* xt, int n, double x, Rboolean rightmost_closed, Rboolean all_inside, int ilo, int* mflag)
    +
    Function: int findInterval2(double* xt, int n, double x, Rboolean rightmost_closed, Rboolean all_inside, Rboolean left_open, int ilo, int* mflag)

    Given the ordered vector xt of length n, return the interval or index of x in xt[], typically max(i; 1 <= i <= n & xt[i] <= x) where we use 1-indexing as in R and FORTRAN (but not C). If @@ -13241,6 +13360,12 @@ outside the xt[] range. On return, *mflag eq result of findInterval() and x is a value of a sequence which is increasing or decreasing for subsequent calls.

    +

    findInterval2() is a generalization of findInterval(), +with an extra Rboolean argument left_open. Setting +left_open = TRUE basically replaces all left-closed right-open +intervals t) by left-open ones t], see the help page +of R function findInterval for details. +

    There is also an F77_CALL(interv)() version of findInterval() with the same arguments, but all pointers.

    @@ -13371,14 +13496,10 @@ the code is indeed being used with R.

    Header file Rconfig.h (included by R.h) is used to define platform-specific macros that are mainly for use in other header files. The macro WORDS_BIGENDIAN is defined on -big-endian113 +big-endian119 systems (e.g. most OSes on Sparc and PowerPC hardware) and not on -little-endian systems (such as i686 and x86_64 on all -OSes, and Linux on Alpha and Itanium). It can be useful when -manipulating binary files. The macro SUPPORT_OPENMP is defined -on suitable systems and can be used in conjunction with the -SUPPORT_OPENMP_* macros in packages that want to make use of -OpenMP. +little-endian systems (nowadays all the commoner R platforms). It +can be useful when manipulating binary files.

    Header file Rversion.h (not included by R.h) defines a macro R_VERSION giving the version number encoded as an @@ -13399,8 +13520,8 @@ header file Rversion.h for their format. Note that the minor version includes the patchlevel (as in ‘2.2’).

    Packages which use alloca need to ensure it is defined: as it is -neither C99 nor POSIX there is no standard way to do so. As from R -3.2.2 one can use +part of neither C nor POSIX there is no standard way to do so. As +from R 3.2.2 one can use

    #include <Rconfig.h> // for HAVE_ALLOCA_H
    @@ -13429,11 +13550,11 @@ Next: 
     
    -

    The C99 keyword inline should be recognized by all compilers now -used to build R. Portable code which might be used with earlier -versions of R can be written using the macro R_INLINE (defined -in file Rconfig.h included by R.h), as for example from -package cluster +

    The C99 keyword inline should be recognized by all compilers +nowadays used to build R. Portable code which might be used with +earlier versions of R can be written using the macro R_INLINE +(defined in file Rconfig.h included by R.h), as for +example from package cluster

    #include <R.h>
    @@ -13863,7 +13984,7 @@ Next: 
     

    8.1 Embedding R under Unix-alikes

    -

    R can be built as a shared library114 if configured with --enable-R-shlib. This +

    R can be built as a shared library120 if configured with --enable-R-shlib. This shared library can be used to run R from alternative front-end programs. We will assume this has been done for the rest of this section. Also, it can be built as a static library if configured with @@ -13930,7 +14051,7 @@ and R does look there for system components.)

    The other senses in which this example is too simple are that all the internal defaults are used and that control is handed over to the -R main loop. There are a number of small examples115 in the +R main loop. There are a number of small examples121 in the tests/Embedding directory. These make use of Rf_initEmbeddedR in src/main/Rembedded.c, and essentially use @@ -14435,7 +14556,7 @@ extern uintptr_t R_CStackStart; /* Initial stack address */ defined in R, so your code needs to define HAVE_UINTPTR_T appropriately.

    -

    These will be set116 when Rf_initialize_R is called, to values appropriate to the +

    These will be set122 when Rf_initialize_R is called, to values appropriate to the main thread. Stack-checking can be disabled by setting R_CStackLimit = (uintptr_t)-1 immediately after Rf_initialize_R is called, but it is better to if possible set @@ -14505,9 +14626,9 @@ R graphics window.

    Recent versions have usage restrictions.

    -
  • Another (D)COM server, RDCOMServer, is available from -http://www.omegahat.org/. Its philosophy is discussed in -http://www.omegahat.org/RDCOMServer/Docs/Paradigm.html and is +
  • Another (D)COM server, RDCOMServer, may be available from Omegahat, +http://www.omegahat.net/. Its philosophy is discussed in +http://www.omegahat.net/RDCOMServer/Docs/Paradigm.html and is very different from the purpose of this section.

  • @@ -14700,7 +14821,7 @@ and select.list(). It would be possible to replace all of these, but it seems easier to allow GraphApp to handle most of them.

    It is possible to run R in a GUI in a single thread (as -RGui.exe shows) but it will normally be easier117 to +RGui.exe shows) but it will normally be easier123 to use multiple threads.

    Note that R’s own front ends use a stack size of 10Mb, whereas MinGW @@ -14979,6 +15100,7 @@ Next: , Previ

    + @@ -15124,6 +15246,7 @@ Next: , Previ + @@ -15535,8 +15658,8 @@ required by CRAN, so checked by R CMD check

    But it is checked for Open Source packages by R CMD check --as-cran.

    (8)

    -

    Duplicate -definitions may trigger a warning: see User-defined macros.

    +

    Duplicate definitions may +trigger a warning: see User-defined macros.

    (9)

    even one wrapped in \donttest.

    (10)

    @@ -15605,339 +15728,367 @@ output with the option --timings (and note that case are advised to use .rda as a common error is to refer to abc.RData as abc.Rdata!

    (24)

    +

    The script +should only assume a POSIX-compliant /bin/sh – see +http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html. +In particular bash extensions must not be used, and not all +R platforms have a bash command, let alone one at +/bin/bash. All known shells used with R support the use of +backticks, but not all support ‘$(cmd)’.

    +

    (25)

    in POSIX parlance: GNU make calls these ‘make variables’.

    -

    (25)

    +

    (26)

    at least on Unix-alikes: the Windows build currently resolves such dependencies to a static FORTRAN library when Rblas.dll is built.

    -

    (26)

    +

    (27)

    http://www.openmp.org/, https://en.wikipedia.org/wiki/OpenMP, https://computing.llnl.gov/tutorials/openMP/

    -

    (27)

    -

    Some builds of clang 3.7 -have support for OpenMP 3.1

    (28)

    -

    Windows default, not MinGW-w64 default.

    +

    Some builds of clang +3.7.0 have support for OpenMP 3.1 (this is built by default as from +3.8.0), but even if the compiler has, the libomp library may not +be installed. At the time of writing Apple builds of clang +for OS X had no support.

    (29)

    +

    Windows default, not MinGW-w64 default.

    +

    (30)

    Which it was at the time of writing with GCC, Solaris Studio, Intel and Clang 3.7.x compilers.

    -

    (30)

    -

    some Windows toolchains have the -typo ‘_REENTRANCE’ instead.

    (31)

    +

    some Windows toolchains had the +typo ‘_REENTRANCE’ instead.

    +

    (32)

    Cygwin used g77 up to 2011, and some pre-built versions of R for Unix OSes still do.

    -

    (32)

    +

    (33)

    +

    Some distributions, notably Debian, have supplied a +build of clang with g++’s headers and library. +Conversely, Apple’s command named g++ is based on +clang using libcxx.

    +

    (34)

    For details of these and related macros, see file config.site in the R sources.

    -

    (33)

    +

    (35)

    On systems which use sub-architectures, architecture-specific versions such as ~/.R/check.Renviron.i386 take precedence.

    -

    (34)

    +

    (36)

    A suitable file.exe is part of the Windows toolset: it checks for gfile if a suitable file is not found: the latter is available in the OpenCSW collection for Solaris at http://www.opencsw.org. The source repository is ftp://ftp.astron.com/pub/file/.

    -

    (35)

    +

    (37)

    An exception is made for subdirectories with names starting ‘win’ or ‘Win’.

    -

    (36)

    +

    (38)

    on most other platforms such runtime libraries are dynamic, but static libraries are currently used on Windows because the toolchain is not a standard part of the OS.

    -

    (37)

    +

    (39)

    or if option --use-valgrind is used or environment variable _R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_ is set to a true value or if there are differences from a target output file

    -

    (38)

    +

    (40)

    For example, in early 2014 gdata declared ‘Imports: gtools’ and gtools declared ‘Imports: gdata’.

    -

    (39)

    +

    (41)

    loading, examples, tests, running vignette code

    -

    (40)

    +

    (42)

    on all platforms from R 3.1.0.

    -

    (41)

    +

    (43)

    called CVS or .svn or .arch-ids or .bzr or .git (but not files called .git) or .hg.

    -

    (42)

    +

    (44)

    called .metadata.

    -

    (43)

    +

    (45)

    which is an error: GNU make uses GNUmakefile.

    -

    (44)

    +

    (46)

    and to avoid problems with case-insensitive file systems, lower-case versions of all these extensions.

    -

    (45)

    +

    (47)

    unless inhibited by using ‘BuildVignettes: no’ in the DESCRIPTION file.

    -

    (46)

    +

    (48)

    provided the conditions of the package’s license are met: many, including CRAN, see the omission of source components as incompatible with an Open Source license.

    -

    (47)

    +

    (49)

    R_HOME/bin is prepended to the PATH so that references to R or Rscript in the Makefile do make use of the currently running version of R.

    -

    (48)

    +

    (50)

    Note that lazy-loaded datasets are not in the package’s namespace so need to be accessed via ::, e.g. survival::survexp.us.

    -

    (49)

    +

    (51)

    they will be called with two unnamed arguments, in that order.

    -

    (50)

    +

    (52)

    NB: this will only be read in all versions of R if the package contains R code in a R directory.

    -

    (51)

    +

    (53)

    Note that this is the basename of the shared object, and the appropriate extension (.so or .dll) will be added.

    -

    (52)

    +

    (54)

    This was necessary at least prior to R 3.0.2 as the methods package looked for its own R code on the search path.

    -

    (53)

    +

    (55)

    This defaults to the same pattern as exportPattern: use something like exportClassPattern("^$") to override this.

    -

    (54)

    +

    (56)

    if it does, there will be opaque warnings about replacing imports if the classes/methods are also imported.

    -

    (55)

    +

    (57)

    People use dev.new() to open a device at a particular size: that is not portable but using dev.new(noRStudioGD = TRUE) helps.

    -

    (56)

    +

    (58)

    Solaris make does not accept CRLF-terminated Makefiles; Solaris warns about and some other makes ignore incomplete final lines.

    -

    (57)

    +

    (59)

    This was apparently introduced in SunOS 4, and is available elsewhere provided it is surrounded by spaces.

    -

    (58)

    +

    (60)

    GNU make, BSD make formerly in FreeBSD and OS X, AT&T make as implemented on Solaris, pmake in FreeBSD, ‘Distributed Make’ (dmake), part of Solaris Studio and available in other versions.

    -

    (59)

    +

    (61)

    For example, test options -a and -e are not portable, and not supported -in the AT&T Bourne shell used on Solaris, even though they are in the -POSIX standard.

    -

    (60)

    +in the AT&T Bourne shell used on Solaris 10/11, even though they are in +the 2008 POSIX standard. Nor does Solaris support ‘$(cmd)’.

    +

    (62)

    but note that long long is not a standard C++ type, and C++ compilers set up for strict checking will reject it.

    -

    (61)

    +

    (63)

    or where supported the variants _Exit and _exit.

    -

    (62)

    +

    (64)

    This and srandom are in any case not portable. They are in POSIX but not in the C99 standard, and not available on Windows.

    -

    (63)

    +

    (65)

    in libselinux.

    -

    (64)

    +

    (66)

    except perhaps the simplest kind as used by download.file() in non-interactive use.

    -

    (65)

    +

    (67)

    Whereas the GNU linker reorders so -L options are processed first, the Solaris one does not.

    -

    (66)

    +

    (68)

    some versions of OS X did not.

    -

    (67)

    +

    (69)

    Not doing so is the default on Windows, overridden for the R executables. It is also the default on some Solaris compilers.

    -

    (68)

    +

    (70)

    These are not needed for the default compiler settings on ‘x86_64’ but are likely to be needed on ‘ix86’.

    -

    (69)

    +

    (71)

    Select ‘Save as’, and select ‘Reduce file size’ from the ‘Quartz filter’ menu’: this can be accessed in other ways, for example by Automator.

    -

    (70)

    +

    (72)

    except perhaps some special characters such as backslash and hash which may be taken over for currency symbols.

    -

    (71)

    +

    (73)

    Typically on a Unix-alike this is done by telling fontconfig where to find suitable fonts to select glyphs from.

    -

    (72)

    +

    (74)

    +

    E.g. gcc 5.3 in C++11 mode.

    +

    (75)

    +

    which often is the same as the header included by +the C compiler, but some compilers have wrappers for some of the C +headers.

    +

    (76)

    this object is available since R 2.8.0, so the ‘Depends’ field in the DESCRIPTION file should contain something at least as restrictive as ‘R (>= 2.8’.

    -

    (73)

    +

    (77)

    e.g. \alias, \keyword and \note sections.

    -

    (74)

    +

    (78)

    There can be exceptions: for example Rd files are not allowed to start with a dot, and have to be uniquely named on a case-insensitive file system.

    -

    (75)

    +

    (79)

    in the current locale, and with special treatment for LaTeX special characters and with any ‘pkgname-package’ topic moved to the top of the list.

    -

    (76)

    +

    (80)

    Text between or after list items is discouraged.

    -

    (77)

    +

    (81)

    as defined by the R function trimws.

    -

    (78)

    +

    (82)

    Currently it is rendered differently only in HTML conversions, and LaTeX conversion outside ‘\usage’ and ‘\examples’ environments.

    -

    (79)

    +

    (83)

    a common example in CRAN packages is \link[mgcv]{gam}.

    -

    (80)

    +

    (84)

    There is only a fine distinction between \dots and \ldots. It is technically incorrect to use \ldots in code blocks and tools::checkRd will warn about this—on the other hand the current converters treat them the same way in code blocks, and elsewhere apart from the small distinction between the two in LaTeX.

    -

    (81)

    +

    (85)

    See the examples section in the file Paren.Rd for an example.

    -

    (82)

    +

    (86)

    R 2.9.0 added support for UTF-8 Cyrillic characters in LaTeX, but on some OSes this will need Cyrillic support added to LaTeX, so environment variable _R_CYRILLIC_TEX_ may need to be set to a non-empty value to enable this.

    -

    (83)

    +

    (87)

    R has to be built to enable this, but the option --enable-R-profiling is the default.

    -

    (84)

    +

    (88)

    For Unix-alikes these are intervals of CPU time, and for Windows of elapsed time.

    -

    (85)

    +

    (89)

    With the exceptions of the commands listed below: an object of such a name can be printed via an explicit call to print.

    -

    (86)

    +

    (90)

    at the time of writing mainly for 10.9 with some support for 10.8, none for the current 10.10.

    -

    (87)

    +

    (91)

    Those in some numeric, logical, integer, raw, complex vectors and in memory allocated by R_alloc.

    -

    (88)

    +

    (92)

    including using the data sections of R vectors after they are freed.

    -

    (89)

    +

    (93)

    small fixed-size arrays by default in gfortran, for example.

    -

    (90)

    +

    (94)

    currently only on ‘ix86’/‘x86_64’ Linux -and OS X (including the builds in Xcode 7 beta but not earlier Apple -releases). On some platforms, e.g. Fedora, the runtime library, -libasan, needs to be installed separately. OS X users can install -a suitable clang from the sources, -http://llvm.org/releases/ or possibly distributions such as -MacPorts or Homebrew.

    -

    (91)

    +and OS X (including the builds in Xcode 7 but not earlier Apple +releases). On some platforms the runtime library, libasan, needs +to be installed separately, and for checking C++ you may also need +libubsan.

    +

    (95)

    part of the LLVM project and in distributed in llvm RPMs and .debs on Linux. It is not currently shipped by Apple.

    -

    (92)

    +

    (96)

    as Ubuntu does.

    -

    (93)

    +

    (97)

    installed on some Linux systems as asan_symbolize, and obtainable from https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py: it makes use of llvm-symbolizer if available.

    -

    (94)

    +

    (98)

    +

    On some +platforms the runtime library, libubsan, needs to be installed +separately.

    +

    (99)

    e.g. src/main/dotcode.c and parts of the -Matrix sources with clang 3.7.0).

    -

    (95)

    +Matrix sources with clang 3.7.0 amd later.

    +

    (100)

    or the user manual for your version of clang, e.g. http://llvm.org/releases/3.6.2/tools/docs/UsersManual.html.

    -

    (96)

    +

    (101)

    This includes the C++ UBSAN handlers, despite its name.

    -

    (97)

    +

    (102)

    but works better if inlining and frame pointer optimizations are disabled.

    -

    (98)

    +

    (103)

    possibly after some platform-specific translation, e.g. adding leading or trailing underscores.

    -

    (99)

    +

    (104)

    Note that this is then not checked for over-runs by option CBoundsCheck = TRUE.

    -

    (100)

    +

    (105)

    but this is not currently done.

    -

    (101)

    +

    (106)

    whether or not ‘LinkingTo’ is used.

    -

    (102)

    +

    (107)

    so there needs to be a corresponding import or importFrom entry in the NAMESPACE file.

    -

    (103)

    +

    (108)

    +

    Even including C system headers in +such a block has caused compilation errors.

    +

    (109)

    dyld on OS X, and DYLD_LIBRARY_PATHS below.

    -

    (104)

    +

    (110)

    That is, similar to those defined in S version 4 from the 1990s: these are -not kept up to date and are not recommended for new projects.

    -

    (105)

    +not kept up to date and are not recommended for new projects. Prior to +R 3.3.0 it was not compatible with defining R_NO_REMAP.

    +

    (111)

    see The R API: note that these are not all part of the API.

    -

    (106)

    +

    (112)

    SEXP is an acronym for Simple EXPression, common in LISP-like language syntaxes.

    -

    (107)

    +

    (113)

    If no coercion was required, coerceVector would have passed the old object through unchanged.

    -

    (108)

    +

    (114)

    You can assign a copy of the object in the environment frame rho using defineVar(symbol, duplicate(value), rho)).

    -

    (109)

    +

    (115)

    see Character encoding issues for why this might not be what is required.

    -

    (110)

    +

    (116)

    This is only guaranteed to show the current interface: it is liable to change.

    -

    (111)

    +

    (117)

    Known problems are redefining LENGTH, error, length, vector and warning

    -

    (112)

    +

    (118)

    It is an optional C11 extension.

    -

    (113)

    +

    (119)

    https://en.wikipedia.org/wiki/Endianness.

    -

    (114)

    +

    (120)

    In the parlance of OS X this is a dynamic library, and is the normal way to build R on that platform.

    -

    (115)

    +

    (121)

    but these are not part of the automated test procedures and so little tested.

    -

    (116)

    +

    (122)

    at least on platforms where the values are available, that is having getrlimit and on Linux or having sysctl supporting KERN_USRSTACK, including FreeBSD and OS X.

    -

    (117)

    +

    (123)

    An attempt to use only threads in the late 1990s failed to work correctly under Windows 95, the predominant version of Windows at that time.

    diff --git a/R-intro.html b/R-intro.html index fbf480d..34dacf4 100644 --- a/R-intro.html +++ b/R-intro.html @@ -1,6 +1,6 @@ - - + An Introduction to R @@ -59,9 +59,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} -span.nocodebreak {white-space: nowrap} span.nolinebreak {white-space: nowrap} -span.roman {font-family: serif; font-weight: normal} +span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} body { @@ -404,13 +403,13 @@ analysis, classification, clustering, ...).

    This manual provides information on data types, programming elements, statistical modelling and graphics.

    -

    This manual is for R, version 3.2.3 (2015-12-10). +

    This manual is for R, version 3.3.1 (2016-06-21).

    Copyright © 1990 W. N. Venables
    Copyright © 1992 W. N. Venables & D. M. Smith
    Copyright © 1997 R. Gentleman & R. Ihaka
    Copyright © 1997, 1998 M. Maechler
    -Copyright © 1999–2015 R Core Team +Copyright © 1999–2016 R Core Team

    Permission is granted to make and distribute verbatim copies of this @@ -7425,8 +7424,8 @@ are designed to complement textbooks. Some (the recommended packages) are distributed with every binary distribution of R. Most are available for download from CRAN (https://CRAN.R-project.org/ and its mirrors) and other -repositories such as Bioconductor (https://www.bioconductor.org/) -and Omegahat (http://www.omegahat.org/). The R FAQ +repositories such as Bioconductor (https://www.bioconductor.org/). +and Omegahat (http://www.omegahat.net/). The R FAQ contains a list of CRAN packages current at the time of release, but the collection of available packages changes very frequently.

    @@ -8604,15 +8603,15 @@ used by the inbuilt command line editor: this used to happen on OS X. file README.Rterm for command-line editing under Rterm.exe.

    -

    When using R with readline capabilities, the functions -described below are available, as well as others (probably) documented -in man readline or info readline on your system. +

    When using R with GNU28 readline capabilities, the functions described +below are available, as well as others (probably) documented in +man readline or info readline on your system.

    Many of these use either Control or Meta characters. Control characters, such as Control-m, are obtained by holding the CTRL down while you press the m key, and are written as C-m below. Meta characters, such as Meta-b, are typed by -holding down META28 and pressing b, and written as M-b +holding down META29 and pressing b, and written as M-b in the following. If your terminal does not have a META key enabled, you can still type Meta characters using two-character sequences starting with ESC. Thus, to enter M-b, you could @@ -8620,6 +8619,9 @@ type ESCb. The ESC charact allowed on terminals with real Meta keys. Note that case is significant for Meta characters.

    +

    Some but not all versions30 of readline +will recognize resizing of the terminal window so this is best avoided. +

    C.2 Editing actions

    @@ -8654,7 +8656,8 @@ re-submitted.

    Go to the next command (forwards in the history).

    C-r text
    -

    Find the last command with the text string in it. +

    Find the last command with the text string in it. This can be +cancelled by C-g (and on some versions of R by C-c).

    @@ -9589,9 +9592,17 @@ on most 64-bit versions of Windows.

    ‘Emacs Speaks Statistics’ package; see the URL http://ESS.R-project.org

    (28)

    +

    It is possible to build R using an +emulation of GNU readline, such as one based on NetBSD’s +editline, it which case only a subset of the capabilities may +be provided.

    +

    (29)

    On a PC keyboard this is usually the Alt key, occasionally the ‘Windows’ key. On a Mac keyboard normally no meta key is available.

    +

    (30)

    +

    In particular, not versions 6.3 or +later: this is worked around as from R 3.4.0.


    diff --git a/R-ints.html b/R-ints.html index 2abe19c..fe9053a 100644 --- a/R-ints.html +++ b/R-ints.html @@ -1,8 +1,8 @@ - - + R Internals @@ -51,9 +51,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} -span.nocodebreak {white-space: nowrap} span.nolinebreak {white-space: nowrap} -span.roman {font-family: serif; font-weight: normal} +span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} body { @@ -288,9 +287,9 @@ Next:

    http://www.omegahat.org/RObjectTables/. +at http://www.omegahat.net/RObjectTables/.

    @@ -961,7 +960,7 @@ Next: , Previous: <

    Namespaces are environments associated with packages (and once again the base package is special and will be considered separately). A -package pkg with a namespace defines two environments +package pkg defines two environments namespace:pkg and package:pkg: it is package:pkg that can be attached and form part of the search path. @@ -1867,21 +1866,21 @@ Next:

    1.12.3 S4 methods

    -

    Details of methods are stored in S4 objects of class -"MethodsList". They have a non-syntactic name of the form -.__M__generic:package for all methods defined in the -current environment for the named generic derived from a specific -package (which might be .GlobalEnv). -

    -

    There is also environment .__T__generic:package which -has names the signatures of the methods defined, and values the -corresponding method functions. This is often referred to as a ‘methods -table’. -

    -

    When a package without a namespace is attached these objects become -visible on the search path. library calls -methods:::cacheMetaData to update the internal tables. +

    Details of the methods are stored in environments (typically hidden in the +respective namespace) with a non-syntactic name of the form +.__T__generic:package containing objects of class +MethodDefinition for all methods defined in the current environment +for the named generic derived from a specific package (which might be .GlobalEnv). +This is sometimes referred to as a ‘methods table’.

    +

    For example, +

    +
     length(nM <- asNamespace("Matrix") )                    # 941 for Matrix 1.2-6
    + length(meth <- grep("^[.]__T__", names(nM), value=TRUE))# 107 generics with methods
    + length(meth.Ops <- nM$`.__T__Ops:base‘) # 71 methods for the ’Ops' (group)generic
    + head(sort(names(meth.Ops))) ## "abIndex#abIndex" ... "ANY#ddiMatrix" "ANY#ldiMatrix" "ANY#Matrix"
    +
    +

    During an R session there is an environment associated with each non-primitive generic containing objects .AllMTable, .Generic, .Methods, .MTable, .SigArgs and @@ -1895,8 +1894,8 @@ directive exportMethods will export all the methods defined in the namespace for a specified generic: the code also adds to the list of generics any that are exported directly. For generics which are listed via exportMethods or exported themselves, the -corresponding "MethodsList" and environment are exported and so -will appear (as hidden objects) in the package environment. +corresponding environment is exported and so +will appear (as hidden object) in the package environment.

    Methods for primitives which are internally S4 generic (see below) are always exported, whether mentioned in the NAMESPACE file or not. @@ -1910,7 +1909,7 @@ methods defined on generics in other packages. Since methods for a generic could be imported from several different packages, the methods tables are merged.

    -

    When a package with a namespace is attached +

    When a package is attached methods:::cacheMetaData is called to update the internal tables: only the visible methods will be cached.

    @@ -1939,7 +1938,7 @@ space there will be two functions called myfn on the search paths, and which will be called depends on which search path is in use. This is starkest for functions in the base namespace, where the original will be found ahead of the newly created function from any -other package with a namespace. +other package.

    Primitive functions are treated quite differently, for efficiency reasons: this results in different semantics. setGeneric is @@ -2527,6 +2526,7 @@ following groups of functions:

    abs     sign    sqrt
     floor   ceiling
     
    +
     
    exp     expm1
     log2    log10   log1p
     cos     sin     tan
    @@ -2535,10 +2535,13 @@ cosh    sinh    tanh
     acosh   asinh   atanh
     cospi   sinpi   tanpi
     
    +
     
    gamma   lgamma  digamma trigamma
     
    +
     
    cumsum  cumprod cummax  cummin
     
    +
     
    Im  Re  Arg  Conj  Mod
     
    @@ -4510,8 +4513,8 @@ Default: -1.

    If set to a non-empty value, a space-separated list of repositories to -use to determine known packages. Default: empty, when the CRAN, -Omegahat and Bioconductor repositories known to R is used. +use to determine known packages. Default: empty, when the CRAN +and Bioconductor repositories known to R is used.

    _R_CHECK_SRC_MINUS_W_IMPLICIT_ @@ -4617,13 +4620,15 @@ Default: false (but true for CRAN submission checks).

    By default the output from running the R code in the vignettes is -kept only if there is an error. +kept only if there is an error. As from R 3.2.4 this also applies to +the build_vignettes.log log from the re-building of vignettes. Default: false.

    _R_CHECK_CLEAN_VIGN_TEST_
    -

    Should the vign_test directory be removed if the test is successful? +

    Should the vign_test directory be removed if the test is +successful? Default: true.

    _R_CHECK_REPLACING_IMPORTS_ @@ -4633,7 +4638,7 @@ Default: true. from auto-generated NAMESPACE files in other packages, but most often from importing the whole of a namespace rather than using importFrom. -Default: false (but true for CRAN submission checks). +Default: true.

    _R_CHECK_UNSAFE_CALLS_ @@ -4835,6 +4840,14 @@ suggests and enhances. Default: true (and true for CRAN submission checks).

    +
    _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_ + +
    +

    If set, check code usage (via codetools) with only the base +package attached. +Default: true. +

    +
    _R_CHECK_EXIT_ON_FIRST_ERROR_
    @@ -5346,6 +5359,7 @@ Next: , Previ
    + diff --git a/R-lang.html b/R-lang.html index f72546c..d4b14ef 100644 --- a/R-lang.html +++ b/R-lang.html @@ -1,8 +1,8 @@ - - + R Language Definition @@ -51,9 +51,8 @@ pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} -span.nocodebreak {white-space: nowrap} span.nolinebreak {white-space: nowrap} -span.roman {font-family: serif; font-weight: normal} +span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} body { @@ -342,9 +341,9 @@ Next:   [ parsing, object oriented programming, computing on the language, and so forth.

    -

    This manual is for R, version 3.2.3 (2015-12-10). +

    This manual is for R, version 3.3.1 (2016-06-21).

    -

    Copyright © 2000–2015 R Core Team +

    Copyright © 2000–2016 R Core Team

    Permission is granted to make and distribute verbatim copies of this @@ -1780,10 +1779,8 @@ Next: , Previous: 3 They are for, while and repeat. The two built-in constructs, next and -break, provide additional control over the evaluation. Each of -the three statements returns the value of the last statement that was -evaluated. It is possible, although uncommon, to assign the result of -one of these statements to a symbol. R provides other functions for +break, provide additional control over the evaluation. +R provides other functions for implicit looping such as tapply, apply, and lapply. In addition many operations, especially arithmetic ones, are vectorized so you may not need to use a loop. diff --git a/R.spec b/R.spec index e4a75a1..f2d797b 100644 --- a/R.spec +++ b/R.spec @@ -81,8 +81,8 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: R -Version: 3.3.0 -Release: 10%{?dist} +Version: 3.3.1 +Release: 1%{?dist} Summary: A language for data analysis and graphics URL: http://www.r-project.org Source0: ftp://cran.r-project.org/pub/R/src/base/R-3/R-%{version}.tar.gz @@ -256,7 +256,7 @@ Provides: R-Matrix = 1.2.6 Obsoletes: R-Matrix < 0.999375-7 Provides: R-methods = %{version} Provides: R-mgcv = 1.8.12 -Provides: R-nlme = 3.1.127 +Provides: R-nlme = 3.1.128 Provides: R-nnet = 7.3.12 Provides: R-parallel = %{version} Provides: R-rpart = 4.1.10 @@ -264,7 +264,7 @@ Provides: R-spatial = 7.3.11 Provides: R-splines = %{version} Provides: R-stats = %{version} Provides: R-stats4 = %{version} -Provides: R-survival = 2.39.2 +Provides: R-survival = 2.39.4 Provides: R-tcltk = %{version} Provides: R-tools = %{version} Provides: R-utils = %{version} @@ -1006,6 +1006,7 @@ R CMD javareconf \ %{_libdir}/R/library/nlme/html/ %{_libdir}/R/library/nlme/INDEX %{_libdir}/R/library/nlme/libs/ +%{_libdir}/R/library/nlme/LICENCE %{_libdir}/R/library/nlme/Meta/ %{_libdir}/R/library/nlme/mlbook/ %{_libdir}/R/library/nlme/NAMESPACE @@ -1136,6 +1137,9 @@ R CMD javareconf \ %{_libdir}/libRmath.a %changelog +* Tue Jul 5 2016 Tom Callaway - 3.3.1-1 +- update to 3.3.1 + * Sat Jun 11 2016 Tom Callaway - 3.3.0-10 - fix CAPABILITIES pathing diff --git a/sources b/sources index 47b3fd6..16a67af 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ -5a7506c8813432d1621c9725e86baf7a R-3.3.0.tar.gz f90c9a0c8b259aee2234c4e0d7fd70af xz-5.2.2.tar.bz2 44d667c142d7cda120332623eab69f40 zlib-1.2.8.tar.gz 00b516f4704d4a7cb50a1d97e6e8e15b bzip2-1.0.6.tar.gz d42e0fc34a5cace5739631cc040974fe curl-7.48.0.tar.bz2 00aabbfe56d5a48b270f999b508c5ad2 pcre-8.38.tar.bz2 +f50a659738b73036e2f5635adbd229c5 R-3.3.1.tar.gz