Skip to content

Commit

Permalink
some modernization
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@82176 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Apr 14, 2022
1 parent c48082a commit e92cabd
Showing 1 changed file with 80 additions and 102 deletions.
182 changes: 80 additions & 102 deletions doc/manual/R-FAQ.texi
Expand Up @@ -395,8 +395,8 @@ R distribution contains a brief introduction, and the ``R Installation
and Administration'' guide (@pxref{What documentation exists for R?})
has full details.

Note that you need a @FORTRAN{} compiler or perhaps @command{f2c} in
addition to a C compiler to build R.
Note that you need a @FORTRAN{} 90 compiler as well as a C compiler to
build R.

In the simplest case, untar the R source code, change to the directory
thus created, and issue the following commands (at the shell prompt):
Expand Down Expand Up @@ -463,11 +463,10 @@ respectively.

The @file{bin/windows} directory of a @CRAN{} site contains binaries for
a base distribution and add-on packages from @CRAN{} to run on 64-bit
versions of Windows 7 and later on x86_64 chips (R 4.1.3 was the last version
of R to support 32-bit Windows).
The Windows version of R was created by Robert Gentleman and
Guido Masarotto, Brian D. Ripley and Duncan Murdoch made substantial
contributions and it is now being maintained by
versions of Windows 7 and later on x86_64 chips (R 4.1.3 was the last
version of R to support 32-bit Windows). The Windows version of R was
created by Robert Gentleman and Guido Masarotto; Brian Ripley and Duncan
Murdoch made substantial contributions and it is now being maintained by
other members of the R Core team.

The same directory has links to snapshots of the r-patched and r-devel
Expand All @@ -480,20 +479,19 @@ See the @url{https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html,
@subsection How can R be installed (Mac)

The @file{bin/macosx} directory of a @CRAN{} site contains a standard
Apple installer package to run on macOS 10.13 (`High Sierra') and later.
Once downloaded and executed, the installer will install the current
release of R and R.app, the macOS @acronym{GUI}. This port of R for macOS
is maintained by @email{Simon.Urbanek@@R-project.org, Simon Urbanek}
(and previously by Stefano Iacus). The
Apple installer packagea to run on macOS 10.13 (`High Sierra') or later,
and another which runs only on `Apple Silicon' Macs under macOS 11 (`Big
Sur') or later. Once downloaded and executed, the installer will
install the current release of R and R.app, the macOS @acronym{GUI}.
This port of R for macOS is maintained by
@email{Simon.Urbanek@@R-project.org, Simon Urbanek} (and previously by
Stefano Iacus). The
@url{https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for
macOS @acronym{FAQ}''} has more details.

Snapshots of the r-patched and r-devel versions of R are available as
Apple installer packages at @uref{https://mac.R-project.org}.

As from R 4.1.0 there are separate builds for ARM-based Macs (also
known as `M1' or `Apple Silicon') running macOS 11 (`Big Sur') or later.

@node Are there Unix-like binaries for R?, What documentation exists for R?, How can R be installed?, R Basics
@section Are there Unix-like binaries for R?

Expand All @@ -518,6 +516,10 @@ known as `M1' or `Apple Silicon') running macOS 11 (`Big Sur') or later.
@c Precise Pangolin (12.04; LTS)
@c Lucid Lynx (10.04; LTS)

Binary distributions of R are available on many Unix-like OSes: only
some can be mentioned here so check your OS's search facilities to see
if one is available for yours.

The @file{bin/linux} directory of a @CRAN{} site contains the following
packages.

Expand Down Expand Up @@ -558,7 +560,7 @@ configured for use with Java. The R RPM also installs the standalone R
math library (@code{libRmath} and @code{libRmath-devel}), although this
is not necessary to use R. When a new version of R is released, there
may be a delay of up to 2 weeks until the Fedora RPM becomes publicly
available, as it must pass through the statutory Fedora review process.
available, as it must pass through the Fedora review process.
RPMs for a selection of R packages are also provided by Fedora. The
Extra Packages for Enterprise Linux (EPEL) project
(@url{https://fedoraproject.org/wiki/EPEL}) provides ports of the Fedora
Expand Down Expand Up @@ -719,8 +721,7 @@ This list is for questions and discussion about code development in R.
@c pre-testing of new versions. It is meant for those who maintain an
@c active position in the development of R.
@item R-package-devel
A list which provides a forum for learning about the R package
development process.
A list which provides a forum for those developing R packages.
@end table

@noindent
Expand Down Expand Up @@ -785,7 +786,7 @@ sites which carry identical material, consisting of the R
distribution(s), the contributed extensions, documentation for R, and
binaries.

The @CRAN{} master site at WU (Wirtschaftsuniversit@"at Wien) in Austria
The @CRAN{} main site at WU (Wirtschaftsuniversit@"at Wien) in Austria
can be found at the @acronym{URL}

@quotation
Expand Down Expand Up @@ -974,7 +975,7 @@ for further information on the ``Evolution of the S Language''.
@node What is S-PLUS?, What are the differences between R and S?, What is S?, R and S
@section What is @sc{S-Plus}?

@SPLUS{} is a value-added version of S currently sold by
@SPLUS{} is a value-added version of S sold by
@url{https://www.tibco.com/, TIBCO Software Inc} as `TIBCO Spotfire S+'.
See @url{https://en.wikipedia.org/wiki/S-PLUS} for more information.

Expand Down Expand Up @@ -1617,13 +1618,13 @@ Tools for package development and administration.
@item utils
R utility functions.
@end table
These ``base packages'' were substantially reorganized in R 1.9.0. The
former @pkg{base} was split into the four packages @pkg{base},
@pkg{graphics}, @pkg{stats}, and @pkg{utils}. Packages @pkg{ctest},
@pkg{eda}, @pkg{modreg}, @pkg{mva}, @pkg{nls}, @pkg{stepfun} and
@pkg{ts} were merged into @pkg{stats}, package @pkg{lqs} returned to the
recommended package @CRANpkg{MASS}, and package @pkg{mle} moved to
@pkg{stats4}.
@c These ``base packages'' were substantially reorganized in R 1.9.0. The
@c former @pkg{base} was split into the four packages @pkg{base},
@c @pkg{graphics}, @pkg{stats}, and @pkg{utils}. Packages @pkg{ctest},
@c @pkg{eda}, @pkg{modreg}, @pkg{mva}, @pkg{nls}, @pkg{stepfun} and
@c @pkg{ts} were merged into @pkg{stats}, package @pkg{lqs} returned to the
@c recommended package @CRANpkg{MASS}, and package @pkg{mle} moved to
@c @pkg{stats4}.

@node Add-on packages from CRAN, Add-on packages from Bioconductor, Add-on packages in R, Which add-on packages exist for R?
@subsection Add-on packages from @acronym{CRAN}
Expand All @@ -1641,22 +1642,22 @@ the book ``Kernel Smoothing'' by M. P. Wand and M. C. Jones, 1995.
@item MASS
Functions and datasets from the main package of Venables and Ripley,
``Modern Applied Statistics with S''.
(Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@c (Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@item Matrix
A Matrix package.
(Recommended for R 2.9.0 or later.)
Support for spares and dense matrices
@c (Recommended for R 2.9.0 or later.)
@item boot
Functions and datasets for bootstrapping from the book ``Bootstrap
Methods and Their Applications'' by A. C. Davison and D. V. Hinkley,
1997, Cambridge University Press.
@item class
Functions for classification (@math{k}-nearest neighbor and LVQ).
(Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@c (Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@item cluster
Functions for cluster analysis.
@item codetools
Code analysis tools.
(Recommended for R 2.5.0 or later.)
@c (Recommended for R 2.5.0 or later.)
@item foreign
Functions for reading and writing data stored by statistical software
like Minitab, S, SAS, SPSS, Stata, Systat, etc.
Expand All @@ -1670,13 +1671,13 @@ Fit and compare Gaussian linear and nonlinear mixed-effects models.
@item nnet
Software for single hidden layer perceptrons (``feed-forward neural
networks''), and for multinomial log-linear models.
(Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@c (Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@item rpart
Recursive PARTitioning and regression trees.
@item spatial
Functions for kriging and point pattern analysis from ``Modern Applied
Statistics with S'' by W. Venables and B. Ripley.
(Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@c (Contained in the @file{VR} bundle for R versions prior to 2.10.0.)
@item survival
Functions for survival analysis, including penalized likelihood.
@end table
Expand Down Expand Up @@ -1729,10 +1730,10 @@ complete taxonomy via BioC Views.
@node Other add-on packages, , Add-on packages from Bioconductor, Which add-on packages exist for R?
@subsection Other add-on packages

Many more packages are available from places other than the three
default repositories discussed above (@CRAN{}, Bioconductor and
Omegahat). In particular, R-Forge provides a @CRAN{} style repository
at @url{https://R-Forge.R-project.org/}.
Many more packages are available from places other than the default
repositories discussed above (@CRAN{} and Bioconductor). In particular,
R-Forge provides a @CRAN{} style repository at
@url{https://R-Forge.R-project.org/}.

More code has been posted to the R-help mailing list, and can be
obtained from the mailing list archive.
Expand All @@ -1741,9 +1742,8 @@ obtained from the mailing list archive.
@section How can add-on packages be installed?

(Unix-like only.) The add-on packages on @CRAN{} come as gzipped tar
files named @code{@var{pkg}_@var{version}.tar.gz}, which may in fact be
``bundles'' containing more than one package. Let @var{path} be the
path to such a package file. Provided that @command{tar} and
files named @code{@var{pkg}_@var{version}.tar.gz}. Let @var{path} be
the path to such a package file. Provided that @command{tar} and
@command{gzip} are available on your system, type

@example
Expand Down Expand Up @@ -1819,12 +1819,14 @@ mystuff My own R functions, nicely packaged but not documented
Packages in `/usr/local/lib/R/library':
KernSmooth Functions for kernel smoothing for Wand & Jones (1995)
MASS Main Package of Venables and Ripley's MASS
MASS Support Functions and Datasets for Venables and Ripley's MASS
Matrix Sparse and Dense Matrix Classes and Methods
base The R Base package
boot Bootstrap R (S-Plus) Functions (Canty)
boot Bootstrap Functions (Originally by Angelo Canty for S)
class Functions for Classification
cluster Functions for clustering (by Rousseeuw et al.)
cluster "Finding Groups in Data": Cluster Analysis Extended
Rousseeuw et al.
codetools Code Analysis Tools for R
datasets The R Datasets Package
foreign Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat,
Expand Down Expand Up @@ -1887,8 +1889,9 @@ $ R CMD REMOVE @var{pkg_1} @dots{} @var{pkg_n}
@noindent
to remove the packages @var{pkg_1}, @dots{}, @var{pkg_n} from the
library tree rooted at the first directory given in @env{R_LIBS} if this
is set and non-null, and from the default library otherwise. (Versions
of R prior to 1.3.0 removed from the default library by default.)
is set and non-null, and from the default library otherwise.

@c (Versions of R prior to 1.3.0 removed from the default library by default.)

To remove from library @var{lib}, do

Expand Down Expand Up @@ -2264,6 +2267,8 @@ somerows <- mat[index, , drop = FALSE]
@node How does autoloading work?, How should I set options?, Why do my matrices lose dimensions?, R Miscellanea
@section How does autoloading work?

Autoloading is rarwly used since packages became lazy-loaded.

R has a special environment called @code{.AutoloadEnv}. Using
@kbd{autoload(@var{name}, @var{pkg})}, where @var{name} and
@var{pkg} are strings giving the names of an object and the package
Expand Down Expand Up @@ -2329,17 +2334,19 @@ can also replace @samp{\} by @samp{/} (@code{"c:/data/money.dat"}).
@node Why does plotting give a color allocation error?, How do I convert factors to numeric?, How do file names work in Windows?, R Miscellanea
@section Why does plotting give a color allocation error?

This is about a problem rarely seen with modern X11 installations.

On an X11 device, plotting sometimes, e.g., when running
@code{demo("image")}, results in ``Error: color allocation error''.
This is an X problem, and only indirectly related to R. It occurs when
applications started prior to R have used all the available colors.
(How many colors are available depends on the X configuration; sometimes
only 256 colors can be used.)

One application which is notorious for ``eating'' colors is Netscape.
If the problem occurs when Netscape is running, try (re)starting it with
either the @option{-no-install} (to use the default colormap) or the
@option{-install} (to install a private colormap) option.
@c One application which is notorious for ``eating'' colors is Netscape.
@c If the problem occurs when Netscape is running, try (re)starting it with
@c either the @option{-no-install} (to use the default colormap) or the
@c @option{-install} (to install a private colormap) option.

You could also set the @code{colortype} of @code{X11()} to
@code{"pseudo.cube"} rather than the default @code{"pseudo"}. See the
Expand Down Expand Up @@ -2491,10 +2498,9 @@ in the language:
@enumerate
@item
A @emph{syntactic name} is a string the parser interprets as this type
of expression. It consists of letters, numbers, and the dot and (for
versions of R at least 1.9.0) underscore characters, and starts with
either a letter or a dot not followed by a number. Reserved words are
not syntactic names.
of expression. It consists of letters, numbers, and the dot and
underscore characters, and starts with either a letter or a dot not
followed by a number. Reserved words are not syntactic names.
@item
An @emph{object name} is a string associated with an object that is
assigned in an expression either by having the object name on the left
Expand Down Expand Up @@ -2664,9 +2670,10 @@ PDF file then converts it to any bitmap format supported by Ghostscript.
On some installations this produces ugly output, on others it is
perfectly satisfactory. Many systems now come with Xvfb from
@url{https://www.x.org/, X.Org} (possibly as an optional
install), which is an X11 server that does not require a screen; and
there is the @CRANpkg{GDD} package from @CRAN{}, which produces PNG,
JPEG and GIF bitmaps without X11.
install), which is an X11 server that does not require a screen.

@c ; and there is the @CRANpkg{GDD} package from @CRAN{}, which produces
@c PNG, JPEG and GIF bitmaps without X11.

@node How can I get command line editing to work?, How can I turn a string into a variable?, How do I produce PNG graphics in batch mode?, R Miscellanea
@section How can I get command line editing to work?
Expand Down Expand Up @@ -3270,42 +3277,13 @@ actually used memory as well as unused memory that cannot be released.
@node How can I enable secure https downloads in R?, How can I get CRAN package binaries for outdated versions of R?, Why is R apparently not releasing memory?, R Miscellanea
@section How can I enable secure https downloads in R?

From R 4.2.0, @code{"libcurl"} download method is always available and used
for @acronym{HTTPS} by default on all platforms. No specific setup from the
user is needed and the following only refers to older versions of R.

When R transfers files over @acronym{HTTP} (e.g., using the
@code{install.packages()} or @code{download.file()} function), a
download method is chosen based on the @option{download.file.method}
option.
From R 4.2.0, @code{"libcurl"} download method is always available and
used for @acronym{HTTPS} by default on all platforms. It has been used
since R 3.3.0 everywhere but Windows where the default method
@code{"wininet"} also supported @acronym{HTTPS}.

R versions 3.2.0 supported two download methods (@code{"libcurl"} and
@code{"wininet"}) that both supported @acronym{HTTPS} connections, but one
had to choose them explicitly, which could be done by adding this code to
@file{.Rprofile} or @file{Rprofile.site}:

@example
options(download.file.method = "wininet", url.method = "wininet")
@r{(Windows)}
options(download.file.method = "libcurl", url.method = "libcurl")
@r{(Linux and macOS)}
@end example

@noindent
The default behavior if no option was explicitly specified was to use R's
internal @acronym{HTTP} implementation. In most circumstances this internal
method did not support @acronym{HTTPS} URLs and hence that explicit override
was needed, but this was done automatically for such URLs as from R 3.2.2.
Method @code{"wininet"} was the default on Windows as from R 3.2.2.

Note that the @code{"libcurl"} method may or may not have been compiled
in. In the case that it was not, i.e.@: @code{capabilities("libcurl") ==
FALSE}, we recommended method @code{"wget"} on Linux and @code{"curl"} on
macOS. It is possible that system versions of @code{"libcurl"},
@command{wget} or @command{curl} may have been compiled without
@acronym{HTTPS} support, but this is unlikely. As from R 3.3.0
@code{"libcurl"} with @acronym{HTTPS} support is required except on
Windows. As from R 4.2.0, it is required also on Windows.
So nothing needs to be done to access @samp{https://} websites in recent
versions of R.

@node How can I get CRAN package binaries for outdated versions of R?, , How can I enable secure https downloads in R?, R Miscellanea
@section How can I get CRAN package binaries for outdated versions of R?
Expand Down Expand Up @@ -3397,17 +3375,17 @@ Administration}.
R Installation and Administration}.
@end ifset

For earlier versions of R, you could change the file
@file{@var{R_HOME}/etc/Makeconf} to reflect your preferences, or (at
least for systems using @acronym{GNU} Make) override them by the
environment variable @env{MAKEFLAGS}.
@ifclear UseExternalXrefs
See section ``Creating shared objects'' in @cite{Writing R Extensions}.
@end ifclear
@ifset UseExternalXrefs
@xref{Creating shared objects, , Creating shared objects, R-exts,
Writing R Extensions}.
@end ifset
@c For earlier versions of R, you could change the file
@c @file{@var{R_HOME}/etc/Makeconf} to reflect your preferences, or (at
@c least for systems using @acronym{GNU} Make) override them by the
@c environment variable @env{MAKEFLAGS}.
@c @ifclear UseExternalXrefs
@c See section ``Creating shared objects'' in @cite{Writing R Extensions}.
@c @end ifclear
@c @ifset UseExternalXrefs
@c @xref{Creating shared objects, , Creating shared objects, R-exts,
@c Writing R Extensions}.
@c @end ifset

@node How can I debug S4 methods?, , How can I change compilation flags?, R Programming
@section How can I debug S4 methods?
Expand Down

0 comments on commit e92cabd

Please sign in to comment.