\input texinfo
@c %**start of header
@setfilename R-FAQ.info
@settitle R FAQ
@setchapternewpage on
@set FAQ_YEAR 2009
@set FAQ_DATE @value{FAQ_YEAR}-06-25
@set REL_YEAR 2009
@set REL_MAJOR 2
@set REL_MINOR 9
@set REL_PATCHLEVEL 1
@set REL_VERSION @value{REL_MAJOR}.@value{REL_MINOR}.@value{REL_PATCHLEVEL}
@set FAQ_VERSION @value{REL_MAJOR}.@value{REL_MINOR}.@value{FAQ_DATE}

@c <COMMENT>
@c ISBNs for R 1.x.
@c @set FAQ_ISBN 3-900051-01-1
@c @set R_ISBN 3-900051-00-3
@c </COMMENT>
@set FAQ_ISBN 3-900051-08-9
@set R_ISBN 3-900051-07-0
@documentlanguage en
@documentencoding ISO-8859-1
@c %**end of header

@dircategory Programming
@direntry
* R FAQ: (R-FAQ).               The R statistical system FAQ.
@end direntry

@finalout

@macro SPLUS{}
@sc{S-Plus}
@end macro

@macro CRAN{}
@acronym{CRAN}
@end macro

@macro HTML{}
@acronym{HTML}
@end macro

@macro FORTRAN{}
FORTRAN
@end macro

@macro XML{}
@acronym{XML}
@end macro

@macro XSL{}
@acronym{XSL}
@end macro

@titlepage
@title R @acronym{FAQ}
@subtitle Frequently Asked Questions on R
@subtitle Version @value{FAQ_VERSION}
@subtitle ISBN @value{FAQ_ISBN}
@author Kurt Hornik
@end titlepage

@ifinfo
@c We do not really see this in info, but in plain text output.
R FAQ                            @*
Frequently Asked Questions on R  @*
Version @value{FAQ_VERSION}      @*
ISBN @value{FAQ_ISBN}            @*
Kurt Hornik                      @*

@sp 2
@end ifinfo

@ifnothtml
@contents
@end ifnothtml

@ifnottex
@node Top, Introduction, (dir), (dir)
@top R FAQ
@ifhtml
@html
<h2>Frequently Asked Questions on R</h2>
<h2>Version @value{FAQ_VERSION}</h2>
<h2>ISBN @value{FAQ_ISBN}</h2>
<address>Kurt Hornik</address>
<p><p><hr><p>
@end html
@end ifhtml
@end ifnottex

@menu
* Introduction::                
* R Basics::                    
* R and S::                     
* R Web Interfaces::            
* R Add-On Packages::           
* R and Emacs::                 
* R Miscellanea::               
* R Programming::               
* R Bugs::                      
* Acknowledgments::             
@end menu

@node Introduction, R Basics, Top, Top
@chapter Introduction

This document contains answers to some of the most frequently asked
questions about R.

@menu
* Legalese::                    
* Obtaining this document::     
* Citing this document::        
* Notation::                    
* Feedback::                    
@end menu

@node Legalese, Obtaining this document, Introduction, Introduction
@section Legalese

This document is copyright @copyright{} 1998--@value{FAQ_YEAR} by Kurt
Hornik.

This document is free software; you can redistribute it and/or modify it
under the terms of the @acronym{GNU} General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.

This document is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@acronym{GNU} General Public License for more details.

A copy of the @acronym{GNU} General Public License is available via WWW
at

@display
@url{http://www.gnu.org/copyleft/gpl.html}.
@end display

@noindent
You can also obtain it by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, U.S.A.

@node Obtaining this document, Citing this document, Legalese, Introduction
@section Obtaining this document

The latest version of this document is always available from

@display
@url{http://CRAN.R-project.org/doc/FAQ/}
@end display

From there, you can obtain versions converted to
@url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.txt,, plain
@acronym{ASCII} text},
@url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.dvi.gz,, DVI},
@url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.info.gz,, @acronym{GNU}
info}, @url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.html,, @HTML{}},
@url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.pdf,, PDF},
@url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.ps.gz,, PostScript} as
well as the @url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.texi,,
Texinfo source} used for creating all these formats using the
@url{http://texinfo.org/, @acronym{GNU} Texinfo system}.

You can also obtain the R @acronym{FAQ} from the @file{doc/FAQ}
subdirectory of a @CRAN{} site (@pxref{What is CRAN?}).

@node Citing this document, Notation, Obtaining this document, Introduction
@section Citing this document

In publications, please refer to this @acronym{FAQ} as Hornik
(@value{FAQ_YEAR}), ``The R @acronym{FAQ}'', and give the above,
@emph{official} @acronym{URL} and the ISBN @value{FAQ_ISBN}:

@example
@group
@@Misc@{,
  author        = @{Kurt Hornik@},
  title         = @{The @{R@} @{FAQ@}@},
  year          = @{@value{REL_YEAR}@},
  note          = @{@{ISBN@} @value{FAQ_ISBN}@},
  url           = @{http://CRAN.R-project.org/doc/FAQ/R-FAQ.html@}
@}
@end group
@end example


@node Notation, Feedback, Citing this document, Introduction
@section Notation

Everything should be pretty standard.  @samp{R>} is used for the R
prompt, and a @samp{$} for the shell prompt (where applicable).

@node Feedback,  , Notation, Introduction
@section Feedback

Feedback via email to @email{Kurt.Hornik@@R-project.org} is of course
most welcome.

In particular, note that I do not have access to Windows or Macintosh
systems.  Features specific to the Windows and Mac OS X ports of R are
described in the
@url{http://CRAN.R-project.org/bin/windows/base/rw-FAQ.html, ``R for
Windows @acronym{FAQ}''} and the
@url{http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
OS X @acronym{FAQ}}.  If you have information on Macintosh or Windows
systems that you think should be added to this document, please let me
know.

@c <FIXME>
@c Should we maybe have direct links inside the R tree to the various
@c rw-FAQ versions?
@c </FIXME>

@node R Basics, R and S, Introduction, Top
@chapter R Basics

@menu
* What is R?::                  
* What machines does R run on?::  
* What is the current version of R?::  
* How can R be obtained?::      
* How can R be installed?::     
* Are there Unix binaries for R?::  
* What documentation exists for R?::  
* Citing R::                    
* What mailing lists exist for R?::  
* What is CRAN?::               
* Can I use R for commercial purposes?::  
* Why is R named R?::           
* What is the R Foundation?::   
@end menu

@node What is R?, What machines does R run on?, R Basics, R Basics
@section What is R?

R is a system for statistical computation and graphics.  It consists of
a language plus a run-time environment with graphics, a debugger, access
to certain system functions, and the ability to run programs stored in
script files.

The design of R has been heavily influenced by two existing languages:
Becker, Chambers & Wilks' S (@pxref{What is S?}) and Sussman's
@url{http://www.cs.indiana.edu/scheme-repository/home.html, Scheme}.
Whereas the resulting language is very similar in appearance to S, the
underlying implementation and semantics are derived from Scheme.
@xref{What are the differences between R and S?}, for further details.

The core of R is an interpreted computer language which allows branching
and looping as well as modular programming using functions.  Most of the
user-visible functions in R are written in R.  It is possible for the
user to interface to procedures written in the C, C++, or FORTRAN
languages for efficiency.  The R distribution contains functionality for
a large number of statistical procedures.  Among these are: linear and
generalized linear models, nonlinear regression models, time series
analysis, classical parametric and nonparametric tests, clustering and
smoothing.  There is also a large set of functions which provide a
flexible graphical environment for creating various kinds of data
presentations.  Additional modules (``add-on packages'') are available
for a variety of specific purposes (@pxref{R Add-On Packages}).

R was initially written by @email{Ross.Ihaka@@R-project.org, Ross Ihaka}
and @email{Robert.Gentleman@@R-project.org, Robert Gentleman} at the
Department of Statistics of the University of Auckland in Auckland, New
Zealand.  In addition, a large group of individuals has contributed to R
by sending code and bug reports.

Since mid-1997 there has been a core group (the ``R Core Team'') who can
modify the R source code archive.  The group currently consists of Doug
Bates, John Chambers, Peter Dalgaard, Robert Gentleman, Kurt Hornik,
Stefano Iacus, Ross Ihaka, Friedrich Leisch, Thomas Lumley, Martin
Maechler, Duncan Murdoch, Paul Murrell, Martyn Plummer, Brian Ripley,
Duncan Temple Lang, Luke Tierney, and Simon Urbanek.

R has a home page at @url{http://www.R-project.org/}.  It is
@url{http://www.gnu.org/philosophy/free-sw.html, free software}
distributed under a @acronym{GNU}-style
@url{http://www.gnu.org/copyleft/copyleft.html, copyleft}, and an
official part of the @url{http://www.gnu.org/, @acronym{GNU}} project
(``@acronym{GNU} S'').

@node What machines does R run on?, What is the current version of R?, What is R?, R Basics
@section What machines does R run on?

R is being developed for the Unix, Windows and Mac families of operating
systems.  Support for Mac OS Classic ended with R 1.7.1.

The current version of R will configure and build under a number of
common Unix platforms including @var{cpu}-linux-gnu for the i386, alpha,
arm, hppa, ia64, m68k, mips/mipsel, powerpc, s390, sparc (e.g.,
@url{http://buildd.debian.org/build.php?&pkg=r-base}), and x86_64 CPUs,
powerpc-apple-darwin, mips-sgi-irix,
@c <FIXME>
@c Not sure anymore ...
@c alpha-dec-osf4,
@c <COMMENT>
@c i386-freebsd reported by B. Gian James" <gian.james@gmail.com> on
@c 2009-01-11
@c (Architecture: i386, OS: FreeBSD 7.1-PRERELEASE, Vendor: PC-BSD)
i386-freebsd,
@c </COMMENT>
@c i386-sun-solaris,
@c hppa-hp-hpux, 
@c </FIXME>
rs6000-ibm-aix, and sparc-sun-solaris.

@c and according to @email{jlindsey@@luc.ac.be, Jim Lindsey} also on
@c Mac, Amiga and Atari under m68k-linux.

If you know about other platforms, please drop us a note.

@node What is the current version of R?, How can R be obtained?, What machines does R run on?, R Basics
@section What is the current version of R?
 
The current released version is @value{REL_VERSION}.  Based on this
`major.minor.patchlevel' numbering scheme, there are two development
versions of R, a patched version of the current release (`r-patched')
and one working towards the next minor or eventually major (`r-devel')
releases of R, respectively.  Version r-patched is for bug fixes mostly.
New features are typically introduced in r-devel.

@node How can R be obtained?, How can R be installed?, What is the current version of R?, R Basics
@section How can R be obtained?

Sources, binaries and documentation for R can be obtained via @CRAN{},
the ``Comprehensive R Archive Network'' (see @ref{What is CRAN?}).

Sources are also available via @url{https://svn.R-project.org/R/}, the
R Subversion repository, but currently not via anonymous rsync (nor
CVS).

Tarballs with daily snapshots of the r-devel and r-patched development
versions of R can be found at
@url{ftp://ftp.stat.math.ethz.ch/Software/R}.

@c Sources are also available via anonymous rsync.  Use

@c @example
@c rsync -rptC --delete rsync.R-project.org::@var{module} R
@c @end example

@c @noindent
@c to create a copy of the source tree specified by @var{module} in the
@c subdirectory @file{R} of the current directory, where @var{module}
@c specifies one of the three existing flavors of the R sources, and can be
@c one of @samp{r-release} (current released version), @samp{r-patched}
@c (patched released version), and @samp{r-devel} (development version).
@c The rsync trees are created directly from the master CVS archive and are
@c updated hourly.  The @option{-C} and in the @command{rsync} command
@c is to cause it to skip the CVS directories.  Further information on
@c @command{rsync} is available at @url{http://rsync.samba.org/rsync/}.

@c @c <NOTE>
@c @c Keep in sync with R-admin.
@c Note that the sources available via rsync do not include the recommended
@c packages, whereas these are included in the tarballs of released
@c versions.  To install the appropriate sources for the recommended
@c packages, run @command{./tools/rsync-recommended} from the top-level of
@c the R sources that you pulled by rsync.
@c @c </NOTE>

@c The sources of the development version are also available via anonymous
@c CVS.  See @url{http://anoncvs.R-project.org} for more information.

@node How can R be installed?, Are there Unix binaries for R?, How can R be obtained?, R Basics
@section How can R be installed?

@menu
* How can R be installed (Unix)::  
* How can R be installed (Windows)::  
* How can R be installed (Macintosh)::  
@end menu

@node How can R be installed (Unix), How can R be installed (Windows), How can R be installed?, How can R be installed?
@subsection How can R be installed (Unix)

If R is already installed, it can be started by typing @kbd{R} at the
shell prompt (of course, provided that the executable is in your path).

If binaries are available for your platform (see @ref{Are there Unix
binaries for R?}), you can use these, following the instructions that
come with them.

Otherwise, you can compile and install R yourself, which can be done
very easily under a number of common Unix platforms (see @ref{What
machines does R run on?}).  The file @file{INSTALL} that comes with the
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.  Also, you need Perl version 5 to
build the R object documentations.  (If this is not available on your
system, you can obtain a PDF version of the object reference manual via
@CRAN{}.)

In the simplest case, untar the R source code, change to the directory
thus created, and issue the following commands (at the shell prompt):

@example
$ ./configure
$ make
@end example

If these commands execute successfully, the R binary and a shell script
front-end called @file{R} are created and copied to the @file{bin}
directory.  You can copy the script to a place where users can invoke
it, for example to @file{/usr/local/bin}.  In addition, plain text help
pages as well as @HTML{} and @LaTeX{} versions of the documentation are
built.

Use @kbd{make dvi} to create DVI versions of the R manuals, such as
@file{refman.dvi} (an R object reference index) and @file{R-exts.dvi},
the ``R Extension Writers Guide'', in the @file{doc/manual}
subdirectory.  These files can be previewed and printed using standard
programs such as @command{xdvi} and @command{dvips}.  You can also use
@kbd{make pdf} to build PDF (Portable Document Format) version of the
manuals, and view these using e.g.@: Acrobat.  Manuals written in the
@acronym{GNU} Texinfo system can also be converted to info files
suitable for reading online with Emacs or stand-alone @acronym{GNU}
Info; use @kbd{make info} to create these versions (note that this
requires Makeinfo version 4.5).

Finally, use @kbd{make check} to find out whether your R system works
correctly.

You can also perform a ``system-wide'' installation using @kbd{make
install}.  By default, this will install to the following directories:

@table @file
@item $@{prefix@}/bin
the front-end shell script
@item $@{prefix@}/man/man1
the man page
@item $@{prefix@}/lib/R
all the rest (libraries, on-line help system, @dots{}).  This is the ``R
Home Directory'' (@env{R_HOME}) of the installed system.
@end table

@noindent
In the above, @code{prefix} is determined during configuration
(typically @file{/usr/local}) and can be set by running
@command{configure} with the option

@example
$ ./configure --prefix=/where/you/want/R/to/go
@end example

@noindent
(E.g., the R executable will then be installed into
@file{/where/you/want/R/to/go/bin}.)

To install DVI, info and PDF versions of the manuals, use @kbd{make
install-dvi}, @kbd{make install-info} and @kbd{make install-pdf},
respectively.

@node How can R be installed (Windows), How can R be installed (Macintosh), How can R be installed (Unix), How can R be installed?
@subsection How can R be installed (Windows)

The @file{bin/windows} directory of a @CRAN{} site contains binaries for
a base distribution and a large number of add-on packages from @CRAN{}
to run on Windows 2000 and later (including 64-bit versions of Windows)
on ix86 and x86_64 chips. The Windows version of R was created by Robert
Gentleman and Guido Masarotto, and is now being developed and maintained
by @email{murdoch@@stats.uwo.ca, Duncan Murdoch} and
@email{Brian.Ripley@@R-project.org, Brian D. Ripley}.

@c Note that when uncompressing the zip files, the pkunzip program needs to
@c be invoked with the @samp{-D} flag to create subdirectories.  Also, be
@c aware that some decompression programs do not preserve long file names
@c properly.

For most installations the Windows installer program will be the easiest
tool to use.

See the @url{http://CRAN.R-project.org/bin/windows/base/@/rw-FAQ.html,
``R for Windows @acronym{FAQ}''} for more details.

@node How can R be installed (Macintosh),  , How can R be installed (Windows), How can R be installed?
@subsection How can R be installed (Macintosh)

The @file{bin/macosx} directory of a @CRAN{} site contains a standard
Apple installer package inside a disk image named @file{R.dmg}.  Once
downloaded and executed, the installer will install the current
non-developer release of R.  RAqua is a native Mac OS X Darwin version
of R with a R.app Mac OS X @acronym{GUI}.  Inside
@file{bin/macosx/powerpc/contrib/@var{x}.@var{y}} there are prebuilt
binary packages (for powerpc version of Mac OS X) to be used with RAqua
corresponding to the ``@var{x}.@var{y}'' release of R. The installation
of these packages is available through the ``Package'' menu of the R.app
@acronym{GUI}.  This port of R for Mac OS X is maintained by
@email{Stefano.Iacus@@R-project.org, Stefano Iacus}.  The
@url{http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
OS X @acronym{FAQ}} has more details.

The @file{bin/macos} directory of a @CRAN{} site contains bin-hexed
(@file{hqx}) and stuffit (@file{sit}) archives for a base distribution
and a large number of add-on packages of R 1.7.1 to run under Mac OS 8.6
to Mac OS 9.2.2.  This port of R for Macintosh is no longer supported.

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

@c Linux binaries as of 2009-04-15:
@c
@c debian
@c   etch-cran
@c            i386   2.8.1  Johannes Ranke
@c            amd64  2.8.1  Johannes Ranke
@c   lenny-cran
@c            i386   2.8.1  Johannes Ranke
@c redhat
@c   el4      i386   2.8.1  Bob Kinney <rhel_cran@hmdc.harvard.edu>
@c            x86_64 2.8.1  Bob Kinney <rhel_cran@hmdc.harvard.edu>
@c   el5      i386   2.8.1  Bob Kinney <rhel_cran@hmdc.harvard.edu>
@c            x86_64 2.8.1  Bob Kinney <rhel_cran@hmdc.harvard.edu>
@c   fedora8  i386   2.8.0  Martyn Plummer <Martyn.Plummer@R-project.org>
@c            x86_64 2.8.0  Martyn Plummer <Martyn.Plummer@R-project.org>
@c   fedora9  i386   2.8.0  Martyn Plummer <Martyn.Plummer@R-project.org>
@c            x86_64 2.8.0  Martyn Plummer <Martyn.Plummer@R-project.org>
@c   fedora10 i386   2.8.0  Martyn Plummer <Martyn.Plummer@R-project.org>
@c            x86_64 2.8.0  Martyn Plummer <Martyn.Plummer@R-project.org>
@c suse
@c   10.3     i586   2.8.1  Detlef Steuer <steuer@hsu-hh.de>
@c            x86_64 2.8.1  Detlef Steuer <steuer@hsu-hh.de>
@c   11.0     i586   2.8.1  Detlef Steuer <steuer@hsu-hh.de>
@c            x86_64 2.8.1  Detlef Steuer <steuer@hsu-hh.de>
@c   11.1     i586   2.8.1  Detlef Steuer <steuer@hsu-hh.de>
@c            x86_64 2.8.1  Detlef Steuer <steuer@hsu-hh.de>
@c ubuntu
@c   intrepid [Intrepid Ibex, 8.10]
@c           i386   2.8.1  Vincent Goulet
@c           amd64  2.8.1  Michael Rutter
@c   hardy [Hardy Heron, 8.04]
@c           i386   2.8.1  Vincent Goulet
@c           amd64  2.8.1  Michael Rutter
@c   gutsy [Gutsy Gibbon, 7.10]
@c           i386   2.8.1  Vincent Goulet
@c           amd64  2.8.1  Michael Rutter
@c   dapper [Dapper Drake, 6.06]
@c           i386   2.8.1  Vincent Goulet
@c           amd64  2.8.1  Michael Rutter

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

@quotation
@multitable {Red Hat} {i386/x86_64} {dapper/gutsy/hardy/intrepid} {Martyn Plummer}
@headitem @tab CPU @tab Versions @tab Provider
@item Debian   @tab i386/amd64 @tab etch-cran @tab Johannes Ranke
@item          @tab i386       @tab lenny-cran @tab Johannes Ranke
@item Red Hat  @tab i386/x86_64 @tab fedora8/fedora9/fedora10 @tab Martyn Plummer
@item          @tab i386/x86_64 @tab el4/el5 @tab Bob Kinney
@item SuSE     @tab i586/x86_64 @tab 10.3/11.0/11.1 @tab Detlef Steuer
@item Ubuntu   @tab i386   @tab dapper/gutsy/hardy/intrepid @tab Vincent Goulet
@item          @tab amd64  @tab dapper/gutsy/hardy/intrepid @tab Michael Rutter
@end multitable
@end quotation

Debian packages, maintained by Dirk Eddelbuettel and Doug Bates, have
long been part of the Debian distribution, and can be accessed through
APT, the Debian package maintenance tool.  Use e.g.@: @code{apt-get
install r-base r-recommended} to install the R environment and
recommended packages.  If you also want to build R packages from source,
also run @code{apt-get install r-base-dev} to obtain the additional
tools required for this.  So-called ``backports'' of the current R
packages for at least the @dfn{stable} distribution of Debian are
provided by Johannes Ranke, and available from CRAN.  See
@url{http://CRAN.R-project.org/bin/linux/debian/README} for details on R
Debian packages and installing the backports, which should also be
suitable for other Debian derivatives.  Native backports for Ubuntu are
provided by Vincent Goulet and Michael Rutter.

On SUSE, you can set up an installation source for R within Yast by
setting (e.g.)

@example
Protocol: HTTP
Server name: software.openSUSE.org
Directory: /download/home:/dsteuer/openSUSE_10.2/
@end example

With this setting, online updates will check for new versions of R.

@c Once you have added that line the programs @command{apt-get},
@c @command{apt-cache}, and @command{dselect} (using the apt access
@c method) will automatically detect and install updates of the R
@c packages.

@c The @file{bin/osf} directory of a @CRAN{} site contains RPMs
@c by Albrecht Gebhardt for alpha systems running Alpha Unix
@c (OSF/Tru64).

@c There are also `tar' distributions for NEXTSTEP on the i386 and m68k
@c platforms in @file{bin/nextstep/i386} and @file{bin/nextstep/m68k},
@c created by Stephen Shiboski <steve@biostat.ucsf.edu>.

The @file{bin/solaris} directory of a @CRAN{} site contains binary
packages for Solaris on the SPARC and x64 platforms, provided by Mithun
Sridharan.

No other binary distributions are currently publically available via
@CRAN{}.

A ``live'' Linux distribution with a particular focus on R is
@dfn{Quantian}, which provides a directly bootable and self-configuring
``Live DVD'' containing numerous applications of interests to scientists
and researchers, including several hundred @CRAN{} and Bioconductor
packages, the ``ESS'' extensions for Emacs, the ``JGR'' Java
@acronym{GUI} for R, the Ggobi visualization tool as well as several
other R interfaces. The @dfn{Quantian} website at
@url{http://dirk.eddelbuettel.com/quantian/} contains more details as
well download information.

@node What documentation exists for R?, Citing R, Are there Unix binaries for R?, R Basics
@section What documentation exists for R?

Online documentation for most of the functions and variables in R
exists, and can be printed on-screen by typing @kbd{help(@var{name})}
(or @kbd{?@var{name}}) at the R prompt, where @var{name} is the name of
the topic help is sought for.  (In the case of unary and binary
operators and control-flow special forms, the name may need to be be
quoted.)

This documentation can also be made available as one reference manual
for on-line reading in @HTML{} and PDF formats, and as hardcopy via
@LaTeX{}, see @ref{How can R be installed?}.  An up-to-date @HTML{}
version is always available for web browsing at
@url{http://stat.ethz.ch/R-manual/}.

Printed copies of the R reference manual for some version(s) are
available from Network Theory Ltd, at
@url{http://www.network-theory.co.uk/R/base/}.  For each set of manuals
sold, the publisher donates USD 10 to the R Foundation (@pxref{What is
the R Foundation?}).

The R distribution also comes with the following manuals.

@itemize @bullet
@item ``An Introduction to R'' (@file{R-intro})
includes information on data types, programming elements, statistical
modeling and graphics.  This document is based on the ``Notes on
@SPLUS{}'' by Bill Venables and David Smith.
@item ``Writing R Extensions'' (@file{R-exts})
currently describes the process of creating R add-on packages, writing R
documentation, R's system and foreign language interfaces, and the R
@acronym{API}.
@item ``R Data Import/Export'' (@file{R-data})
is a guide to importing and exporting data to and from R.
@item ``The R Language Definition'' (@file{R-lang}),
a first version of the ``Kernighan & Ritchie of R'', explains
evaluation, parsing, object oriented programming, computing on the
language, and so forth.
@item ``R Installation and Administration'' (@file{R-admin}).
@item ``R Internals'' (@file{R-ints})
is a guide to R's internal structures.
(Added in R 2.4.0.)
@end itemize

An annotated bibliography (Bib@TeX{} format) of R-related publications
can be found at

@display
@url{http://www.R-project.org/doc/bib/R.bib}
@end display

Books on R by R Core Team members include

@quotation
John M. Chambers (2008), ``Software for Data Analysis: Programming with
R''.  Springer, New York, ISBN 978-0-387-75935-7,
@url{http://stat.stanford.edu/~jmc4/Rbook/}.

Peter Dalgaard (2008), ``Introductory Statistics with R'', 2nd edition.
Springer, ISBN 978-0-387-79053-4,
@url{http://www.biostat.ku.dk/~pd/ISwR.html}.

Robert Gentleman (2008), ``R Programming for Bioinformatics''.  Chapman
& Hall/CRC, Boca Raton, FL, ISBN 978-1-420-06367-7,
@url{http://www.bioconductor.org/pub/RBioinf/}.

Stefano M. Iacus (2008), ``Simulation and Inference for Stochastic
Differential Equations: With R Examples''. Springer, New York, ISBN
978-0-387-75838-1.

Deepayan Sarkar (2007), ``Lattice: Multivariate Data Visualization with
R''. Springer, New York, ISBN 978-0-387-75968-5.

W. John Braun and Duncan J. Murdoch (2007), ``A First Course in
Statistical Programming with R''.  Cambridge University Press,
Cambridge, ISBN 978-0521872652.

P. Murrell (2005), ``R Graphics'', Chapman & Hall/CRC, ISBN:
1-584-88486-X,
@url{http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html}.

William N. Venables and Brian D. Ripley (2002), ``Modern Applied
Statistics with S'' (4th edition).  Springer, ISBN 0-387-95457-0,
@url{http://www.stats.ox.ac.uk/pub/MASS4/}.

Jose C. Pinheiro and Douglas M. Bates (2000), ``Mixed-Effects Models in
S and S-Plus''. Springer, ISBN 0-387-98957-0.
@end quotation

Last, but not least, Ross' and Robert's experience in designing and
implementing R is described in Ihaka & Gentleman (1996), ``R: A Language
for Data Analysis and Graphics'',
@url{http://www.amstat.org/publications/jcgs/, , @emph{Journal of
Computational and Graphical Statistics}}, @strong{5}, 299--314.

@node Citing R, What mailing lists exist for R?, What documentation exists for R?, R Basics
@section Citing R

To cite R in publications, use

@example
@group
@@Manual@{,
  title        = @{R: A Language and Environment for Statistical
                  Computing@},
  author       = @{@{R Development Core Team@}@},
  organization = @{R Foundation for Statistical Computing@},
  address      = @{Vienna, Austria@},
  year         = @value{REL_YEAR},
  note         = @{@{ISBN@} @value{R_ISBN}@},
  url          = @{http://www.R-project.org@}
@}
@end group
@end example

Citation strings (or Bib@TeX{} entries) for R and R packages can also be
obtained by @code{citation()}.

@node What mailing lists exist for R?, What is CRAN?, Citing R, R Basics
@section What mailing lists exist for R?

Thanks to @email{Martin.Maechler@@R-project.org, Martin Maechler}, there
are four mailing lists devoted to R.

@table @code
@item R-announce
A moderated list for major announcements about the development of R and
the availability of new code.
@item R-packages
A moderated list for announcements on the availability of new or
enhanced contributed packages.
@item R-help
The `main' R mailing list, for discussion about problems and solutions
using R, announcements (not covered by `R-announce' and `R-packages')
about the development of R and the availability of new code.
@c enhancements and patches to the source code and documentation of R,
@c comparison and compatibility with S and @SPLUS{}, and for the posting of
@c nice examples and benchmarks.
@item R-devel
This list is for questions and discussion about code development in R.
@c discussions about the future of R, proposals of new functionality, and
@c pre-testing of new versions.  It is meant for those who maintain an
@c active position in the development of R.
@end table

@noindent
Please read the @url{http://www.R-project.org/posting-guide.html,
posting guide} @emph{before} sending anything to any mailing list.

Note in particular that R-help is intended to be comprehensible to
people who want to use R to solve problems but who are not necessarily
interested in or knowledgeable about programming.  Questions likely to
prompt discussion unintelligible to non-programmers (e.g., questions
involving C or C++) should go to R-devel.

Convenient access to information on these lists, subscription, and
archives is provided by the web interface at
@url{http://stat.ethz.ch/mailman/listinfo/}.  One can also subscribe
(or unsubscribe) via email, e.g.@: to R-help by sending @samp{subscribe}
(or @samp{unsubscribe}) in the @emph{body} of the message (not in the
subject!) to @email{R-help-request@@lists.R-project.org}.

Send email to @email{R-help@@lists.R-project.org} to send a message to
everyone on the R-help mailing list.  Subscription and posting to the
other lists is done analogously, with @samp{R-help} replaced by
@samp{R-announce}, @samp{R-packages}, and @samp{R-devel}, respectively.
Note that the R-announce and R-packages lists are gatewayed into R-help.
Hence, you should subscribe to either of them only in case you are not
subscribed to R-help.

It is recommended that you send mail to R-help rather than only to the R
Core developers (who are also subscribed to the list, of course).  This
may save them precious time they can use for constantly improving R, and
will typically also result in much quicker feedback for yourself.

Of course, in the case of bug reports it would be very helpful to have
code which reliably reproduces the problem.  Also, make sure that you
include information on the system and version of R being used.  See
@ref{R Bugs} for more details.

See @url{http://www.R-project.org/mail.html} for more information on
the R mailing lists.

The R Core Team can be reached at @email{R-core@@lists.R-project.org}
for comments and reports.

Many of the R project's mailing lists are also available via
@url{http://gmane.org, Gmane}, from which they can be read with a web
browser, using an NNTP news reader, or via RSS feeds.  See
@uref{http://dir.gmane.org/@/index.php?prefix=gmane.comp.lang.r.}@: for
the available mailing lists, and @uref{http://www.gmane.org/rss.php} for
details on RSS feeds.

@node What is CRAN?, Can I use R for commercial purposes?, What mailing lists exist for R?, R Basics
@section What is @acronym{CRAN}?

The ``Comprehensive R Archive Network'' (@CRAN{}) is a collection of
sites which carry identical material, consisting of the R
distribution(s), the contributed extensions, documentation for R, and
binaries.

The @CRAN{} master site at Wirtschaftsuniversit@"at Wien, Austria, can
be found at the @acronym{URL}

@quotation
@c @multitable @columnfractions .45 .30
@c @item
@url{http://CRAN.R-project.org/}
@c @tab (Austria)
@c @end multitable
@end quotation

@noindent
@c (which is the same as @url{http://cran.at.R-project.org/})
Daily mirrors are available at @acronym{URL}s including

@quotation
@multitable @columnfractions .45 .40
@item @url{http://cran.at.R-project.org/}
@tab (WU Wien, Austria)
@item @url{http://cran.au.R-project.org/}
@tab (PlanetMirror, Australia)
@item @url{http://cran.br.R-project.org/}
@tab (Universidade Federal do Paran@'a, Brazil)
@item @url{http://cran.ch.R-project.org/}
@tab (ETH Z@"urich, Switzerland)
@item @url{http://cran.dk.R-project.org/}
@tab (SunSITE, Denmark)
@item @url{http://cran.es.R-project.org/}
@tab (Spanish National Research Network, Madrid, Spain)
@item @url{http://cran.fr.R-project.org/}
@tab (INRA, Toulouse, France)
@c @item @url{http://cran.hu.R-project.org/}
@c @tab (Semmelweis U, Hungary)
@item @url{http://cran.pt.R-project.org/}
@tab (Universidade do Porto, Portugal)
@item @url{http://cran.uk.R-project.org/}
@tab (U of Bristol, United Kingdom)
@c @item @url{http://cran.us.R-project.org/}
@c @tab (pair Networks, USA)
@item @url{http://cran.za.R-project.org/}
@tab (Rhodes U, South Africa)
@end multitable
@end quotation

@noindent
See @url{http://CRAN.R-project.org/mirrors.html} for a complete list of
mirrors.  Please use the @CRAN{} site closest to you to reduce network
load.

From @CRAN{}, you can obtain the latest official release of R, daily
snapshots of R (copies of the current source trees), as gzipped and
bzipped tar files, a wealth of additional contributed code, as well as
prebuilt binaries for various operating systems (Linux, Mac OS Classic,
Mac OS X, and MS Windows).  @CRAN{} also provides access to
documentation on R, existing mailing lists and the R Bug Tracking
system.

To ``submit'' to @CRAN{}, simply upload to
@url{ftp://CRAN.R-project.org/incoming/} and send an email to
@email{CRAN@@R-project.org}.  Note that @CRAN{} generally does not
accept submissions of precompiled binaries due to security reasons.  In
particular, binary packages for Windows and Mac OS X are provided by the
respective binary package maintainers.

@quotation Note
It is very important that you indicate the copyright (license)
information (@acronym{GPL-2}, @acronym{GPL-3}, @acronym{BSD}, Artistic,
@dots{}) in your submission.
@end quotation

Please always use the @acronym{URL} of the master site when referring to
@CRAN{}.

@node Can I use R for commercial purposes?, Why is R named R?, What is CRAN?, R Basics
@section Can I use R for commercial purposes?

R is released under the
@url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html,,
@acronym{GNU} General Public License (GPL), version 2}.  If you have any
questions regarding the legality of using R in any particular situation
you should bring it up with your legal counsel.  We are in no position
to offer legal advice.

It is the opinion of the R Core Team that one can use R for commercial
purposes (e.g., in business or in consulting).  The GPL, like all Open
Source licenses, permits all and any use of the package.  It only
restricts distribution of R or of other programs containing code from R.
This is made clear in clause 6 (``No Discrimination Against Fields of
Endeavor'') of the @url{http://www.opensource.org/docs/definition.html,
Open Source Definition}:

@quotation
The license must not restrict anyone from making use of the program in a
specific field of endeavor.  For example, it may not restrict the
program from being used in a business, or from being used for genetic
research.
@end quotation

@noindent
It is also explicitly stated in clause 0 of the GPL, which says in part

@quotation
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of running
the Program is not restricted, and the output from the Program is
covered only if its contents constitute a work based on the Program.
@end quotation

Most add-on packages, including all recommended ones, also explicitly
allow commercial use in this way.  A few packages are restricted to
``non-commercial use''; you should contact the author to clarify whether
these may be used or seek the advice of your legal counsel.

None of the discussion in this section constitutes legal advice.  The R
Core Team does not provide legal advice under any circumstances.

@node Why is R named R?, What is the R Foundation?, Can I use R for commercial purposes?, R Basics
@section Why is R named R?

The name is partly based on the (first) names of the first two R authors
(Robert Gentleman and Ross Ihaka), and partly a play on the name of the
Bell Labs language `S' (@pxref{What is S?}).

@c At the time the name was coined no one expected that the software would
@c get used outside of Auckland, so it seemed ok to make a joke of it.

@node What is the R Foundation?,  , Why is R named R?, R Basics
@section What is the R Foundation?

The R Foundation is a not for profit organization working in the public
interest.  It was founded by the members of the R Core Team in order to
provide support for the R project and other innovations in statistical
computing, provide a reference point for individuals, institutions or
commercial enterprises that want to support or interact with the R
development community, and to hold and administer the copyright of R
software and documentation.  See
@url{http://www.R-project.org/foundation/} for more information.

@node R and S, R Web Interfaces, R Basics, Top
@chapter R and S

@menu
* What is S?::                  
* What is S-PLUS?::             
* What are the differences between R and S?::  
* Is there anything R can do that S-PLUS cannot?::  
* What is R-plus?::             
@end menu

@node What is S?, What is S-PLUS?, R and S, R and S
@section What is S?

S is a very high level language and an environment for data analysis and
graphics.  In 1998, the Association for Computing Machinery
(@acronym{ACM}) presented its Software System Award to John M. Chambers,
the principal designer of S, for

@quotation
the S system, which has forever altered the way people analyze,
visualize, and manipulate data @dots{}

S is an elegant, widely accepted, and enduring software system, with
conceptual integrity, thanks to the insight, taste, and effort of John
Chambers.
@end quotation

The evolution of the S language is characterized by four books by John
Chambers and coauthors, which are also the primary references for S.

@itemize @bullet
@item
Richard A. Becker and John M. Chambers (1984), ``S.  An Interactive
Environment for Data Analysis and Graphics,'' Monterey: Wadsworth and
Brooks/Cole.

This is also referred to as the ``@emph{Brown Book}'', and of historical
interest only.

@item
Richard A. Becker, John M. Chambers and Allan R. Wilks (1988), ``The New
S Language,'' London: Chapman & Hall.

This book is often called the ``@emph{Blue Book}'', and introduced what
is now known as S version 2.

@item
John M. Chambers and Trevor J. Hastie (1992), ``Statistical Models in
S,''  London: Chapman & Hall.

This is also called the ``@emph{White Book}'', and introduced S version
3, which added structures to facilitate statistical modeling in S.

@item
John M. Chambers (1998), ``Programming with Data,'' New York: Springer,
ISBN 0-387-98503-4
(@url{http://cm.bell-labs.com/cm/ms/departments/sia/Sbook/}).

This ``@emph{Green Book}'' describes version 4 of S, a major revision of
S designed by John Chambers to improve its usefulness at every stage of
the programming process.
@end itemize

See @url{http://cm.bell-labs.com/cm/ms/departments/sia/S/history.html}
for further information on ``Stages in the Evolution of S''.

There is a huge amount of user-contributed code for S, available at the
@url{http://lib.stat.cmu.edu/S/, S Repository} at @acronym{CMU}.

@c The @url{http://lib.stat.cmu.edu/S/faq, ``Frequently Asked Questions
@c about S''} contains further information about S, but is not
@c up-to-date.

@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 sold by Insightful Corporation.
Based on the S language, @SPLUS{} provides functionality in a wide
variety of areas, including robust regression, modern non-parametric
regression, time series, survival analysis, multivariate analysis,
classical statistical tests, quality control, and graphics drivers.
Add-on modules add additional capabilities.

See the @url{http://www.insightful.com/products/splus/, Insightful
@SPLUS{} page} for further information.

@node What are the differences between R and S?, Is there anything R can do that S-PLUS cannot?, What is S-PLUS?, R and S
@section What are the differences between R and S?

We can regard S as a language with three current implementations or
``engines'', the ``old S engine'' (S version 3; @SPLUS{} 3.x and 4.x),
the ``new S engine'' (S version 4; @SPLUS{} 5.x and above), and R.
Given this understanding, asking for ``the differences between R and S''
really amounts to asking for the specifics of the R implementation of
the S language, i.e., the difference between the R and S @emph{engines}.

For the remainder of this section, ``S'' refers to the S engines and not
the S language.

@menu
* Lexical scoping::             
* Models::                      
* Others::                      
@end menu

@node Lexical scoping, Models, What are the differences between R and S?, What are the differences between R and S?
@subsection Lexical scoping

Contrary to other implementations of the S language, R has adopted an
evaluation model in which nested function definitions are lexically
scoped.  This is analogous to the evalutation model in Scheme.

This difference becomes manifest when @emph{free} variables occur in a
function.  Free variables are those which are neither formal parameters
(occurring in the argument list of the function) nor local variables
(created by assigning to them in the body of the function).  In S, the
values of free variables are determined by a set of global variables
(similar to C, there is only local and global scope).  In R, they are
determined by the environment in which the function was created.

Consider the following function:

@example
@group
cube <- function(n) @{
  sq <- function() n * n
  n * sq()
@}
@end group
@end example

Under S, @code{sq()} does not ``know'' about the variable @code{n}
unless it is defined globally:

@example
@group
S> cube(2)
Error in sq():  Object "n" not found
Dumped
S> n <- 3
S> cube(2)
[1] 18
@end group
@end example

In R, the ``environment'' created when @code{cube()} was invoked is
also looked in:

@example
@group
R> cube(2)
[1] 8
@end group
@end example

@c The following more `realistic' example illustrating the differences in
@c scoping is due to @email{tlumley@@u.washington.edu, Thomas Lumley}.
@c The function

@c @example
@c jackknife.lm <- function(lmobj) @{
@c   n <- length(resid(lmobj))
@c   jval <- sapply(1:n, function(i) coef(update(lmobj, subset = -i)))
@c   (n - 1) * (n - 1) * var(jval) / n
@c @}
@c @end example

@c @noindent
@c does something useful in R, but does not work in S.  In order to make it
@c work in S you need to explicitly pass the linear model object into the
@c function nested in @code{apply()}.  If you don't and you are lucky you
@c will get @samp{Error: Object "lmobj" not found}.  If you are unlucky
@c enough to have a linear model called @code{lmobj} in your global
@c environment you will get the wrong answer with no warning.

@c The following version works in S.

@c @example
@c jackknife.S.lm <- function(lmobj) @{
@c   n <- length(resid(lmobj))
@c   jval <- sapply(1:n,
@c                  function(i, lmobj) coef(update(lmobj, subset = -i)), 
@c                  lmobj = lmobj)
@c   (n - 1) * (n - 1) * var(jval) / n
@c @}
@c @end example

@c (The S version was written independently by Thomas and at least three of
@c his fellow students over the past couple of years, causing literally
@c hours of confusion on each occasion.)

As a more ``interesting'' real-world problem, suppose you want to write
a function which returns the density function of the @math{r}-th order
statistic from a sample of size @math{n} from a (continuous)
distribution.  For simplicity, we shall use both the cdf and pdf of the
distribution as explicit arguments.  (Example compiled from various
postings by Luke Tierney.)

The @SPLUS{} documentation for @code{call()} basically suggests the
following:

@example
@group
dorder <- function(n, r, pfun, dfun) @{
  f <- function(x) NULL
  con <- round(exp(lgamma(n + 1) - lgamma(r) - lgamma(n - r + 1)))
  PF <- call(substitute(pfun), as.name("x"))
  DF <- call(substitute(dfun), as.name("x"))
  f[[length(f)]] <-
    call("*", con,
         call("*", call("^", PF, r - 1),
              call("*", call("^", call("-", 1, PF), n - r),
                   DF)))
  f
@}
@end group
@end example

@noindent Rather tricky, isn't it?  The code uses the fact that in S,
functions are just lists of special mode with the function body as the
last argument, and hence does not work in R (one could make the idea
work, though).

A version which makes heavy use of @code{substitute()} and seems to work
under both S and R is

@example
@group
dorder <- function(n, r, pfun, dfun) @{
  con <- round(exp(lgamma(n + 1) - lgamma(r) - lgamma(n - r + 1)))
  eval(substitute(function(x) K * PF(x)^a * (1 - PF(x))^b * DF(x),
                  list(PF = substitute(pfun), DF = substitute(dfun),
                       a = r - 1, b = n - r, K = con)))
@}
@end group
@end example

@noindent
(the @code{eval()} is not needed in S).

However, in R there is a much easier solution:

@example
@group
dorder <- function(n, r, pfun, dfun) @{
  con <- round(exp(lgamma(n + 1) - lgamma(r) - lgamma(n - r + 1)))
  function(x) @{
    con * pfun(x)^(r - 1) * (1 - pfun(x))^(n - r) * dfun(x)
  @}
@}
@end group
@end example

@noindent
This seems to be the ``natural'' implementation, and it works because
the free variables in the returned function can be looked up in the
defining environment (this is lexical scope).

Note that what you really need is the function @emph{closure}, i.e., the
body along with all variable bindings needed for evaluating it.  Since
in the above version, the free variables in the value function are not
modified, you can actually use it in S as well if you abstract out the
closure operation into a function @code{MC()} (for ``make closure''):

@example
@group
dorder <- function(n, r, pfun, dfun) @{
  con <- round(exp(lgamma(n + 1) - lgamma(r) - lgamma(n - r + 1)))
  MC(function(x) @{
       con * pfun(x)^(r - 1) * (1 - pfun(x))^(n - r) * dfun(x)
     @},
     list(con = con, pfun = pfun, dfun = dfun, r = r, n = n))
@}
@end group
@end example

Given the appropriate definitions of the closure operator, this works in
both R and S, and is much ``cleaner'' than a substitute/eval solution
(or one which overrules the default scoping rules by using explicit
access to evaluation frames, as is of course possible in both R and S).

For R, @code{MC()} simply is

@example
MC <- function(f, env) f
@end example

@noindent (lexical scope!), a version for S is

@example
@group
MC <- function(f, env = NULL) @{
  env <- as.list(env)
  if (mode(f) != "function")
    stop(paste("not a function:", f))
  if (length(env) > 0 && any(names(env) == ""))
    stop(paste("not all arguments are named:", env))
  fargs <- if(length(f) > 1) f[1:(length(f) - 1)] else NULL
  fargs <- c(fargs, env)
  if (any(duplicated(names(fargs))))
    stop(paste("duplicated arguments:", paste(names(fargs)),
         collapse = ", "))
  fbody <- f[length(f)]
  cf <- c(fargs, fbody)
  mode(cf) <- "function"
  return(cf)
@}
@end group
@end example

Similarly, most optimization (or zero-finding) routines need some
arguments to be optimized over and have other parameters that depend on
the data but are fixed with respect to optimization.  With R scoping
rules, this is a trivial problem; simply make up the function with the
required definitions in the same environment and scoping takes care of
it.  With S, one solution is to add an extra parameter to the function
and to the optimizer to pass in these extras, which however can only
work if the optimizer supports this.

Nested lexically scoped functions allow using function closures and
maintaining local state.  A simple example (taken from Abelson and
Sussman) is obtained by typing @kbd{demo("scoping")} at the R prompt.
Further information is provided in the standard R reference ``R: A
Language for Data Analysis and Graphics'' (@pxref{What documentation
exists for R?}) and in Robert Gentleman and Ross Ihaka (2000), ``Lexical
Scope and Statistical Computing'',
@url{http://www.amstat.org/publications/jcgs/, , @emph{Journal of
Computational and Graphical Statistics}}, @strong{9}, 491--508.

Nested lexically scoped functions also imply a further major difference.
Whereas S stores all objects as separate files in a directory somewhere
(usually @file{.Data} under the current directory), R does not.  All
objects in R are stored internally.  When R is started up it grabs a
piece of memory and uses it to store the objects.  R performs its own
memory management of this piece of memory, growing and shrinking its
size as needed.  Having everything in memory is necessary because it is
not really possible to externally maintain all relevant ``environments''
of symbol/value pairs.  This difference also seems to make R
@emph{faster} than S.

The down side is that if R crashes you will lose all the work for the
current session.  Saving and restoring the memory ``images'' (the
functions and data stored in R's internal memory at any time) can be a
bit slow, especially if they are big.  In S this does not happen,
because everything is saved in disk files and if you crash nothing is
likely to happen to them.  (In fact, one might conjecture that the S
developers felt that the price of changing their approach to persistent
storage just to accommodate lexical scope was far too expensive.)
Hence, when doing important work, you might consider saving often (see
@ref{How can I save my workspace?}) to safeguard against possible
crashes.  Other possibilities are logging your sessions, or have your R
commands stored in text files which can be read in using
@code{source()}.

@quotation Note
If you run R from within Emacs (see @ref{R and Emacs}), you can save the
contents of the interaction buffer to a file and conveniently manipulate
it using @code{ess-transcript-mode}, as well as save source copies of
all functions and data used.
@end quotation

@node Models, Others, Lexical scoping, What are the differences between R and S?
@subsection Models

There are some differences in the modeling code, such as

@itemize @bullet
@item
Whereas in S, you would use @code{lm(y ~ x^3)} to regress @code{y} on
@code{x^3}, in R, you have to insulate powers of numeric vectors (using
@code{I()}), i.e., you have to use @code{lm(y ~ I(x^3))}.
@item
The glm family objects are implemented differently in R and S.  The same
functionality is available but the components have different names.
@item
Option @code{na.action} is set to @code{"na.omit"} by default in R,
but not set in S.
@item
Terms objects are stored differently.  In S a terms object is an
expression with attributes, in R it is a formula with attributes.  The
attributes have the same names but are mostly stored differently.
@item
Finally, in R @code{y ~ x + 0} is an alternative to @code{y ~ x - 1} for
specifying a model with no intercept.  Models with no parameters at all
can be specified by @code{y ~ 0}.
@end itemize

@node Others,  , Models, What are the differences between R and S?
@subsection  Others

Apart from lexical scoping and its implications, R follows the S
language definition in the Blue and White Books as much as possible, and
hence really is an ``implementation'' of S.  There are some intentional
differences where the behavior of S is considered ``not clean''.  In
general, the rationale is that R should help you detect programming
errors, while at the same time being as compatible as possible with S.

Some known differences are the following.

@itemize @bullet

@item
In R, if @code{x} is a list, then @code{x[i] <- NULL} and @code{x[[i]]
<- NULL} remove the specified elements from @code{x}.  The first of
these is incompatible with S, where it is a no-op.  (Note that you can
set elements to @code{NULL} using @code{x[i] <- list(NULL)}.)

@c @item
@c In R @code{x[-4]} fails if @code{x} is not @code{NULL} but has fewer
@c than 4 elements.  In S it has no effect.

@item
In S, the functions named @code{.First} and @code{.Last} in the
@file{.Data} directory can be used for customizing, as they are executed
at the very beginning and end of a session, respectively.

In R, the startup mechanism is as follows.  Unless @option{--no-environ}
was given on the command line, R searches for site and user files to
process for setting environment variables.  Then, R searches for a
site-wide startup profile unless the command line option
@option{--no-site-file} was given.  This code is loaded in package
@strong{base}.  Then, unless @option{--no-init-file} was given, R
searches for a user profile file, and sources it into the user
workspace.  It then loads a saved image of the user workspace from
@file{.RData} in case there is one (unless @option{--no-restore-data} or
@option{--no-restore} were specified).  Next, a function @code{.First()}
is run if found on the search path.  Finally, function @code{.First.sys}
in the @strong{base} package is run.  When terminating an R session, by
default a function @code{.Last} is run if found on the search path,
followed by @code{.Last.sys}.  If needed, the functions @code{.First()}
and @code{.Last()} should be defined in the appropriate startup
profiles.  See the help pages for @code{.First} and @code{.Last} for
more details.

@item
In R, @code{T} and @code{F} are just variables being set to @code{TRUE}
and @code{FALSE}, respectively, but are not reserved words as in S and
hence can be overwritten by the user.  (This helps e.g.@: when you have
factors with levels @code{"T"} or @code{"F"}.)  Hence, when writing code
you should always use @code{TRUE} and @code{FALSE}.

@item
In R, @code{dyn.load()} can only load @emph{shared objects}, as created
for example by @kbd{R CMD SHLIB}.

@item
In R, @code{attach()} currently only works for lists and data frames,
but not for directories.  (In fact, @code{attach()} also works for R
data files created with @code{save()}, which is analogous to attaching
directories in S.)  Also, you cannot attach at position 1.

@item
Categories do not exist in R, and never will as they are deprecated now
in S.  Use factors instead.

@item
In R, @code{For()} loops are not necessary and hence not supported.

@item
In R, @code{assign()} uses the argument @option{envir=} rather than
@option{where=} as in S.

@item
The random number generators are different, and the seeds have different
length.

@item
R passes integer objects to C as @code{int *} rather than @code{long *}
as in S.

@item
R has no single precision storage mode.  However, as of version 0.65.1,
there is a single precision interface to C/@FORTRAN{} subroutines.

@item
By default, @code{ls()} returns the names of the objects in the current
(under R) and global (under S) environment, respectively.  For example,
given

@example
x <- 1; fun <- function() @{y <- 1; ls()@}
@end example

@noindent
then @code{fun()} returns @code{"y"} in R and @code{"x"} (together with
the rest of the global environment) in S.

@item
R allows for zero-extent matrices (and arrays, i.e., some elements of
the @code{dim} attribute vector can be 0).  This has been determined a
useful feature as it helps reducing the need for special-case tests for
empty subsets.  For example, if @code{x} is a matrix, @code{x[, FALSE]}
is not @code{NULL} but a ``matrix'' with 0 columns.  Hence, such objects
need to be tested for by checking whether their @code{length()} is zero
(which works in both R and S), and not using @code{is.null()}.

@item
Named vectors are considered vectors in R but not in S (e.g.,
@code{is.vector(c(a = 1:3))} returns @code{FALSE} in S and @code{TRUE}
in R).

@item
Data frames are not considered as matrices in R (i.e., if @code{DF} is a
data frame, then @code{is.matrix(DF)} returns @code{FALSE} in R and
@code{TRUE} in S).

@item
R by default uses treatment contrasts in the unordered case, whereas S
uses the Helmert ones.  This is a deliberate difference reflecting the
opinion that treatment contrasts are more natural.

@item
In R, the argument of a replacement function which corresponds to the
right hand side must be named @samp{value}.  E.g., @code{f(a) <- b} is
evaluated as @code{a <- "f<-"(a, value = b)}.  S always takes the last
argument, irrespective of its name.

@item
In S, @code{substitute()} searches for names for substitution in the
given expression in three places: the actual and the default arguments
of the matching call, and the local frame (in that order).  R looks in
the local frame only, with the special rule to use a ``promise'' if a
variable is not evaluated.  Since the local frame is initialized with
the actual arguments or the default expressions, this is usually
equivalent to S, until assignment takes place.

@item
In S, the index variable in a @code{for()} loop is local to the inside
of the loop.  In R it is local to the environment where the @code{for()}
statement is executed.

@item
In S, @code{tapply(simplify=TRUE)} returns a vector where R returns a
one-dimensional array (which can have named dimnames).

@item
In S(-@sc{Plus}) the C locale is used, whereas in R the current
operating system locale is used for determining which characters are
alphanumeric and how they are sorted.  This affects the set of valid
names for R objects (for example accented chars may be allowed in R) and
ordering in sorts and comparisons (such as whether @code{"aA" < "Bb"} is
true or false).  From version 1.2.0 the locale can be (re-)set in R by
the @code{Sys.setlocale()} function.

@item
In S, @code{missing(@var{arg})} remains @code{TRUE} if @var{arg} is
subsequently modified; in R it doesn't.

@item
From R version 1.3.0, @code{data.frame} strips @code{I()} when creating
(column) names.

@item
In R, the string @code{"NA"} is not treated as a missing value in a
character variable.  Use @code{as.character(NA)} to create a missing
character value.

@item
R disallows repeated formal arguments in function calls.

@item
In S, @code{dump()}, @code{dput()} and @code{deparse()} are essentially
different interfaces to the same code.  In R from version 2.0.0, this is
only true if the same @code{control} argument is used, but by default it
is not.  By default @code{dump()} tries to write code that will evaluate
to reproduce the object, whereas @code{dput()} and @code{deparse()}
default to options for producing deparsed code that is readable.

@item
In R, indexing a vector, matrix, array or data frame with @code{[} using
a character vector index looks only for exact matches (whereas @code{[[}
and @code{$} allow partial matches).  In S, @code{[} allows partial
matches.

@item
S has a two-argument version of @code{atan} and no @code{atan2}.  A call 
in S such as @code{atan(x1, x2)} is equivalent to R's @code{atan2(x1, 
x2)}.  However, beware of named arguments since S's @code{atan(x = a, y
= b)} is equivalent to R's @code{atan2(y = a, x = b)} with the meanings
of @code{x} and @code{y} interchanged.  (R used to have undocumented
support for a two-argument @code{atan} with positional arguments, but
this has been withdrawn to avoid further confusion.)

@item
Numeric constants with no fractional and exponent (i.e., only integer)
part are taken as integer in @SPLUS{} 6.x or later, but as double in R.

@end itemize

There are also differences which are not intentional, and result from
missing or incorrect code in R.  The developers would appreciate hearing
about any deficiencies you may find (in a written report fully
documenting the difference as you see it).  Of course, it would be
useful if you were to implement the change yourself and make sure it
works.

@node Is there anything R can do that S-PLUS cannot?, What is R-plus?, What are the differences between R and S?, R and S
@section Is there anything R can do that @sc{S-Plus} cannot?

Since almost anything you can do in R has source code that you could
port to @SPLUS{} with little effort there will never be much you can do
in R that you couldn't do in @SPLUS{} if you wanted to.  (Note that
using lexical scoping may simplify matters considerably, though.)

R offers several graphics features that @SPLUS{} does not, such as finer
handling of line types, more convenient color handling (via palettes),
gamma correction for color, and, most importantly, mathematical
annotation in plot texts, via input expressions reminiscent of @TeX{}
constructs.  See the help page for @code{plotmath}, which features an
impressive on-line example.  More details can be found in Paul Murrell
and Ross Ihaka (2000), ``An Approach to Providing Mathematical
Annotation in Plots'', @url{http://www.amstat.org/publications/jcgs/, ,
@emph{Journal of Computational and Graphical Statistics}}, @strong{9},
582--599.

@node What is R-plus?,  , Is there anything R can do that S-PLUS cannot?, R and S
@section What is R-plus?

For a very long time, there was no such thing.

@url{http://www.xlsolutions-corp.com/, XLSolutions Corporation} is
currently beta testing a commercially supported version of R named R+
(read R plus).

@url{http://www.revolution-computing.com/, REvolution Computing} has
released
@url{http://www.revolution-computing.com/products/revolution-r.php,
REvolution R}, an enterprise-class statistical analysis system based on
R, suitable for deployment in professional, commercial and regulated
environments.

@url{http://www.random-technologies-llc.com/, Random Technologies}
offers @url{http://random-technologies-llc.com/products/RStat/rstat,
RStat}, an enterprise-strength statistical computing environment which
combines R with enterprise-level validation, documentation, software
support, and consulting services, as well as related R-based products.

See also
@url{http://en.wikipedia.org/wiki/R_programming_language#Commercialized_versions_of_R}
for pointers to commercialized versions of R.

@node R Web Interfaces, R Add-On Packages, R and S, Top
@chapter R Web Interfaces

@strong{Rweb} is developed and maintained by
@email{jeff@@math.montana.edu, Jeff Banfield}.  The
@url{http://www.math.montana.edu/Rweb/, Rweb Home Page} provides access
to all three versions of Rweb---a simple text entry form that returns
output and graphs, a more sophisticated Javascript version that provides
a multiple window environment, and a set of point and click modules that
are useful for introductory statistics courses and require no knowledge
of the R language.  All of the Rweb versions can analyze Web accessible
datasets if a @acronym{URL} is provided.

The paper ``Rweb: Web-based Statistical Analysis'', providing a detailed
explanation of the different versions of Rweb and an overview of how
Rweb works, was published in the Journal of Statistical Software
(@url{http://www.jstatsoft.org/v04/i01/}).

@email{ulfi@@cs.tu-berlin.de, Ulf Bartel} has developed
@strong{R-Online}, a simple on-line programming environment for R which
intends to make the first steps in statistical programming with R
(especially with time series) as easy as possible.  There is no need for
a local installation since the only requirement for the user is a
JavaScript capable browser.  See @url{http://osvisions.com/r-online/}
for more information.

@strong{Rcgi} is a CGI WWW interface to R by @email{mjr@@dsl.pipex.com,
MJ Ray}.  It had the ability to use ``embedded code'': you could mix
user input and code, allowing the @HTML{} author to do anything from
load in data sets to enter most of the commands for users without
writing CGI scripts.  Graphical output was possible in PostScript or GIF
formats and the executed code was presented to the user for revision.
However, it is not clear if the project is still active.
@c URL no longer seems to work ...
@c See @url{http://stats.mth.uea.ac.uk/Rcgi/} for more information.
Currently, a modified version of @strong{Rcgi} by
@email{mai@@ms.uky.edu, Mai Zhou} (actually, two versions: one with
(bitmap) graphics and one without) as well as the original code are
available from @url{http://www.ms.uky.edu/~statweb/}.

CGI-based web access to R is also provided at
@url{http://hermes.sdu.dk/cgi-bin/go/}.  There are many additional
examples of web interfaces to R which basically allow to submit R code
to a remote server, see for example the collection of links available from
@url{http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/StatCompCourse}.

@url{http://www.warwick.ac.uk/go/dfirth, David Firth} has written
@strong{CGIwithR}, an R add-on package available from @CRAN{}.  It
provides some simple extensions to R to facilitate running R scripts
through the CGI interface to a web server, and allows submission of data
using both GET and POST methods.  It is easily installed using Apache
under Linux and in principle should run on any platform that supports R
and a web server provided that the installer has the necessary security
permissions.  David's paper ``CGIwithR: Facilities for Processing Web
Forms Using R'' was published in the Journal of Statistical Software
(@url{http://www.jstatsoft.org/v08/i10/}).  The package is now
maintained by @email{duncan@@wald.ucdavis.edu, Duncan Temple Lang} and
has a web page at @url{http://www.omegahat.org/CGIwithR/}.

@url{http://www.rpad.org/Rpad, Rpad}, developed and actively maintained
by Tom Short, provides a sophisticated environment which combines some
of the features of the previous approaches with quite a bit of
Javascript, allowing for a @acronym{GUI}-like behavior (with sortable
tables, clickable graphics, editable output), etc.

Jeff Horner is working on the R/Apache Integration Project which embeds
the R interpreter inside Apache 2 (and beyond).  A tutorial and
presentation are available from the project web page at
@url{http://biostat.mc.vanderbilt.edu/@/twiki/@/bin/@/view/@/Main/@/RApacheProject}.

@url{http://stats.math.uni-augsburg.de/Rserve/, Rserve} is a project
actively developed by Simon Urbanek.  It implements a TCP/IP server which
allows other programs to use facilities of R.  Clients are available from
the web site for Java and C++ (and could be written for other languages
that support TCP/IP sockets).

@url{http://openstatserver.org/index.html, OpenStatServer} is being
developed by a team lead by Greg Warnes; it aims ``to provide clean access
to computational modules defined in a variety of computational
environments (R, SAS, Matlab, etc) via a single well-defined client
interface'' and to turn computational services into web services.

Two projects use PHP to provide a web interface to R.
@url{http://steve-chen.net/R_PHP/, R_PHP_Online} by Steve Chen (though
it is unclear if this project is still active) is somewhat similar to
the above Rcgi and Rweb.  @url{http://dssm.unipa.it/R-php/?cmd=home,
R-php} is actively developed by Alfredo Pontillo and Angelo Mineo and
provides both a web interface to R and a set of pre-specified analyses
that need no R code input.

@url{http://www.bioconductor.org/, webbioc} is ``an integrated web
interface for doing microarray analysis using several of the
Bioconductor packages'' and is designed to be installed at local sites
as a shared computing resource.

Finally, @url{http://rwui.cryst.bbk.ac.uk, Rwui} is a web application to
to create user-friendly web interfaces for R scripts.  All code for the
web interface is created automatically.  There is no need for the user
to do any extra scripting or learn any new scripting techniques.

@node R Add-On Packages, R and Emacs, R Web Interfaces, Top
@chapter R Add-On Packages

@menu
* Which add-on packages exist for R?::  
* How can add-on packages be installed?::  
* How can add-on packages be used?::  
* How can add-on packages be removed?::  
* How can I create an R package?::  
* How can I contribute to R?::  
@end menu

@node Which add-on packages exist for R?, How can add-on packages be installed?, R Add-On Packages, R Add-On Packages
@section Which add-on packages exist for R?

@menu
* Add-on packages in R::        
* Add-on packages from CRAN::   
* Add-on packages from Omegahat::  
* Add-on packages from Bioconductor::  
* Other add-on packages::       
@end menu

@node Add-on packages in R, Add-on packages from CRAN, Which add-on packages exist for R?, Which add-on packages exist for R?
@subsection Add-on packages in R

The R distribution comes with the following packages:

@table @strong
@c <FIXME>
@c 3.0.0
@item base
Base R functions (and datasets before R 2.0.0).
@item datasets
Base R datasets (added in R 2.0.0).
@item grDevices
Graphics devices for base and grid graphics (added in R 2.0.0).
@c </FIXME>
@item graphics
R functions for base graphics.
@item grid
A rewrite of the graphics layout capabilities, plus some support for
interaction.
@item methods
Formally defined methods and classes for R objects, plus other
programming tools, as described in the Green Book.
@item splines
Regression spline functions and classes.
@item stats
R statistical functions.
@item stats4
Statistical functions using S4 classes.
@item tcltk
Interface and language bindings to Tcl/Tk @acronym{GUI} elements.
@item tools
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 @strong{base} was split into the four packages @strong{base},
@strong{graphics}, @strong{stats}, and @strong{utils}.  Packages
@strong{ctest}, @strong{eda}, @strong{modreg}, @strong{mva},
@strong{nls}, @strong{stepfun} and @strong{ts} were merged into
@strong{stats}, package @strong{lqs} returned to the recommended package
@strong{MASS}, and package @strong{mle} moved to @strong{stats4}.

@node Add-on packages from CRAN, Add-on packages from Omegahat, Add-on packages in R, Which add-on packages exist for R?
@subsection Add-on packages from @acronym{CRAN}

The following packages are available from the @CRAN{} @file{src/contrib}
area.  (Packages denoted as @emph{Recommended} are to be included in all
binary distributions of R.)

@table @strong
@item ADaCGH
Analysis of data from aCGH experiments.
@item AER
Functions, data sets, examples and vignettes for the book ``Applied
Econometrics with R'' by Christian Kleiber and Achim Zeileis, 2008,
Springer-Verlag, New York.
@item AIGIS
Areal Interpolation for GIS data.
@item AIS
Tools to look at the data (``Ad Inidicia Spectata'').
@item ALS
Multivariate curve resolution alternating least squares (MCR-ALS).
@item AMORE
A MORE flexible neural network package, providing the TAO robust neural
network algorithm.
@c <COMMENT>
@c Moved to the Archive on 2009-06-24 (timeout/QC).
@c @item ARES
@c Allelic richness estimation, with extrapolation beyond the sample
@c size.
@c </COMMENT>
@item AcceptanceSampling
Creation and evaluation of acceptance sampling plans,
@item AdMit
Adaptive mixture of Student @math{t} distributions.
@item AdaptFit
Adaptive semiparametic regression.
@item AlgDesign
Algorithmic experimental designs.  Calculates exact and approximate
theory experimental designs for D, A, and I criteria.
@item Amelia
Amelia II: a program for missing data.
@item AnalyzeFMRI
Functions for I/O, visualisation and analysis of functional Magnetic
Resonance Imaging (fMRI) datasets stored in the ANALYZE format.
@item Animal
Analyze time-coded animal behavior data.
@item AquaEnv
An integrated development toolbox for aquatic chemical model
generation.
@item ArDec
Time series autoregressive decomposition.
@item BACCO
Bayesian Analysis of Computer Code Output.  Contains
@strong{approximator}, @strong{calibrator}, and @strong{emulator}, for
Bayesian prediction of complex computer codes, calibration of computer
models, and emulation of computer programs, respectively.
@item BAMD
Bayesian association model for genomic data with missing covariates.
@item BARD
Better Automated ReDistricting.
@item BAS
Bayesian model averaging using Bayesian Adaptive Sampling.
@item BAYSTAR
Bayesian analysis of threshold autoregressive models.
@item BB
Barzilai-Borwein spectral methods for solving nonlinear system of
equations, and for optimizing nonlinear objective functions subject to
simple constraints.
@item BCE
Bayesian Composition Estimator for sample (taxonomic) composition from
biomarker data.
@item BGSIMD
Block Gibbs Sampler with Incomplete Multinomial Distribution.
@item BHH2
Functions and data sets reproducing some examples in ``Statistics for
Experimenters II'' by G. E. P. Box, J. S. Hunter, and W. C. Hunter,
2005, John Wiley and Sons.
@item BLCOP
Black-Litterman and copula-opinion pooling frameworks.
@item BMA
Bayesian Model Averaging for linear models, generalizable linear models
and survival models (Cox regression).
@item BMN
Approximate and exact methods for pairwise binary markov networks.
@item BPHO
Bayesian Prediction with High-order Interactions.
@c <COMMENT>
@c Moved to the Archive on 2008-05-19 as requested by the maintainer:
@c Now lives in CRANextras ...
@c @item BRugs
@c OpenBUGS and its R interface BRugs.
@c </COMMENT>
@item BaM
Functions and datasets for ``Bayesian Methods: A Social and Behavioral
Sciences Approach'' (2nd edition) by Jeff Gill, 2007, CRC Press.
@item BayHaz
Functions for Bayesian Hazard rate estimation.
@item BayesDA
Functions and data sets for the book ``Bayesian Data Analysis'' by
A. Gelman, J. B. Carlin, H. S. Stern and D. B. Rubin, 2003, Chapman &
Hall/CRC.
@item BayesTree
Bayesian methods for tree based models.
@item BayesValidate
Bayesian software validation using posterior quantiles.
@item BayesX
Utilities accompanying the BayesX software for Bayesian Inference in
structured additive regression models. 
@item Bchron
Create chronologies based on radiocarbon and non-radiocarbon dated
depths.
@item Bhat
Functions for general likelihood exploration (MLE, MCMC, CIs).
@item BiasedUrn
Biased urn model distributions.
@item BioIDMapper
Mapping between BioIDs.
@item Biodem
A number of functions for biodemographycal analysis.
@item BiodiversityR
GUI for biodiversity and community ecology analysis.
@item BiplotGUI
Interactive biplots in R.
@item Bolstad
Functions and data sets for the book ``Introduction to Bayesian
Statistics'' by W. M. Bolstad, 2004, John Wiley and Sons.
@item BootCL
Bootstrapping test for chromosomal localization.
@item BootPR
Bootstrap prediction intervals and bias-corrected forecasting.
@item BradleyTerry
Specify and fit the Bradley-Terry model and structured versions.
@item Brobdingnag
Very large numbers in R.
@item BSDA
Data sets for the book ``Basic Statistics and Data Analysis'' by
L. J. Kitchens, 2003, Duxbury.
@item BSagri
Statistical methods for safety assessment in agricultural field trials.
@item BsMD
Bayes screening and model discrimination follow-up designs.
@item CADFtest
Hansen's Covariate-Augmented Dickey-Fuller (CADF) test.
@item CADStat
A @acronym{GUI} to several statistical methods for biological
inferences.
@item CCA
Canonical correlation analysis.
@item CDFt
Statistical downscaling through CDF transform.
@item CDNmoney
Components of Canadian monetary aggregates.
@item CGIwithR
Facilities for the use of R to write CGI scripts.
@item CHNOSZ
Chemical thermodynamics and activity diagrams.
@item CHsharp
Choi and Hall clustering in 3d.
@item CORREP
Multivariate correlation estimation.
@item COZIGAM
Constrained Zero-Inflated Generalized Additive Model.
@item CPE
Concordance probability estimates in survival analysis.
@c <COMMENT>
@c Moved to the Archive on 2008-02-21 as requested by the maintainer.
@c Replaced by Bchron.
@c @item CPGchron
@c Create radiocarbon-dated depth chronologies.
@c </COMMENT>
@item CTFS
The CTFS large plot forest dynamics analyses.
@item CTT
Classical Test Theory functions.
@item CVThresh
Level-dependent Cross-Validation Thresholding.
@item Cairo
Graphics device using cairographics library for creating high-quality
PNG, PDF, SVG, PostScript output and interactive display devices such as
X11.
@item CalciOMatic
Automatic calcium imaging analysis.
@item CarbonEL
Carbon Event Loop.
@item CellularAutomaton
One-dimensional cellular automata.
@item ChainLadder
Mack- and Munich-chain-ladder methods for insurance claims reserving.
@item CircStats
Circular Statistics, from ``Topics in Circular Statistics'' by S. Rao
Jammalamadaka and A. SenGupta, 2001, World Scientific.
@item ClinicalRobustPriors
Robust Bayesian priors in clinical trials.
@item CoCo
Graphical modeling for contingency tables using CoCo.
@c <COMMENT>
@c Moved to the Archive on 2005-05-08 as requested by
@c Stephane Dray <dray@biomserv.univ-lyon1.fr>.
@c @item CoCoAn
@c Constrained Correspondence Analysis.
@c </COMMENT>
@item ComPairWise
Compare phylogenetic or population genetic data alignments.
@item CombMSC
Combined Model Selection Criteria.
@item CompetingRiskFrailty
Competing risk model with frailties for right censored survival data.
@item Containers
Object-oriented data structures including stack, queue, and binary
search tree.
@item ConvCalendar
Converts dates between calendars.
@item ConvergenceConcepts
Seeing convergence concepts in action.
@item CoxBoost
Cox survival models by likelihood based boosting.
@item CreditMetrics
Functions for calculating the CreditMetrics risk model.
@item CvM2SL1Test
Cramer-von Mises two sample tests, @math{L1} version.
@item CvM2SL2Test
Cramer-von Mises two sample tests.
@item DAAG
Various data sets used in examples and exercises in ``Data Analysis and
Graphics Using R'' by John H. Maindonald and W. John Brown, 2003.
@item DAAGbio
Data sets and functions, for demonstrations with expression arrays.
@item DAAGxtras
Data sets and functions additional to @strong{DAAG}.
@item DAKS
Data Analysis and Knowledge Spaces.
@item DBI
A common database interface (DBI) class and method definitions.  All
classes in this package are virtual and need to be extended by the
various DBMS implementations.
@item DCluster
A set of functions for the detection of spatial clusters of diseases
using count data.
@c <COMMENT>
@c Moved to the Archive on 2009-04-26 (Orphaned/QC).
@c @item DDHFm
@c Variance stabilization by Data-Driven Haar-Fisz (for microarrays).
@c </COMMENT>
@item DEA
Data Envelopment Analysis.
@item DEoptim
Differential Evolution Optimization.
@item DICOM
Import and manipulate medical imaging data using the Digital Imaging and
Communications in Medicine (DICOM) Standard.
@item DPpackage
Semiparametric Bayesian analysis using Dirichlet process priors.
@item DSpat
Spatial modelling for distance sampling data.
@item DTK
Dunnett-Tukey-Kramer: pairwise multiple comparison test adjusted for
unequal variances and unequal sample sizes.
@item Daim
Diagnostic accuracy of classification models.
@item Davies
Functions for the Davies quantile function and the Generalized Lambda
distribution.
@item Deducer
An intuitive graphical data analysis system for use with @strong{JGR}.
@item Defaults
Create global function defaults.
@item Depela
Semiparametric estimation of copula models.
@item DescribeDisplay
R interface to the DescribeDisplay GGobi plugin.
@item Design
Regression modeling, testing, estimation, validation, graphics,
prediction, and typesetting by storing enhanced model design attributes
in the fit.  Design is a collection of about 180 functions that assist
and streamline modeling, especially for biostatistical and epidemiologic
applications.  It also contains new functions for binary and ordinal
logistic regression models and the Buckley-James multiple regression
model for right-censored responses, and implements penalized maximum
likelihood estimation for logistic and ordinary linear models.  Design
works with almost any regression model, but it was especially written to
work with logistic regression, Cox regression, accelerated failure time
models, ordinary linear models, and the Buckley-James model.
@item Devore5
Data sets and sample analyses from ``Probability and Statistics for
Engineering and the Sciences (5th ed)'' by Jay L. Devore, 2000, Duxbury.
@item Devore6
Data sets and sample analyses from ``Probability and Statistics for
Engineering and the Sciences (6th ed)'' by Jay L. Devore, 2003, Duxbury.
@item Devore7
Data sets and sample analyses from ``Probability and Statistics for
Engineering and the Sciences (7th ed)'' by Jay L. Devore, 2008, Thomson.
@item DiagnosisMed
Diagnostic test accuracy evaluation for medical professionals.
@item DierckxSpline
R companion to ``Curve and Surface Fitting with Splines'' by Paul
Dierckx, 1993, Oxford University Press.
@item DoE.base
Full factorials, orthogonal arrays and base utilities for DoE packages.
@item EDR
Estimation of the effective dimension reduction (EDR) space.
@item EMC
Evolutionary Monte Carlo (EMC) algorithm.
@item EMCC
Evolutionary Monte Carlo (EMC) methods for clustering.
@item EMD
Empirical mode decomposition and Hilbert spectral analysis.
@item EMJumpDiffusion
EM algorithm for jump diffusion processes.
@c <COMMENT>
@c Moved to the Archive on 2009-02-23 as requested by the maintainer.
@c @item EMV
@c Estimation of missing values in a matrix by a @math{k}-th nearest
@c neighboors algorithm.
@c </COMMENT>
@item ETC
Tests and simultaneous confidence intervals for equivalence to control.
@item EVER
Estimation of Variance by Efficient Replication.
@item EbayesThresh
Empirical Bayes thresholding and related methods.
@item Ecdat
Data sets from econometrics textbooks.
@item EffectiveDose
Estimate the effective dose level for quantal bioassay data by
nonparametric techniques.
@item ElemStatLearn
Data sets, functions and examples from the book ``The Elements of
Statistical Learning: Data Mining, Inference, and Prediction'' by Trevor
Hastie, Robert Tibshirani and Jerome Friedman (2001), Springer.
@item EnQuireR
Questionnaires.
@item EngrExpt
Data sets from the book ``Introductory Statistics for Engineering
Experimentation'' by Peter Nelson, Marie Coffin and Karen Copeland
(2003), Elsevier, with sample code.
@item Epi
Statistical analysis in epidemiology, with functions for demographic and
epidemiological analysis in the Lexis diagram.
@item ExPD2D
Exact computation of bivariate projection depth.
@item FAiR
Factor Analysis in R, using genetic algorithms.
@item FBN
FISH Based Normalization and copy number inference of SNP microarray
data.
@item FD
Measuring functional diversity (FD) from multiple traits.
@item FGN
Fractional Gaussian Noise model fitting.
@item FITSio
FITS (Flexible Image Transport System) utilities.
@item FKBL
Fuzzy Knowledge Base Learning.
@item FKF
Fast Kalman Filter.
@c <COMMENT>
@c Moved to the Archive on 2007-11-17 as it fails R CMD check.
@c @item FLCore
@c Core package of FLR, fisheries modeling in R.
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2007-11-17 as it depends on FLCore.
@c @item FLEDA
@c Exploratory Data Analysis for FLR.
@c </COMMENT>
@item FRB
Fast and Robust Bootstrap.
@item FSelector
Selecting attributes.
@item FTICRMS
Analysis of Fourier Transform-Ion Cyclotron Resonance Mass Spectrometry
data.
@item FactoClass
Combination of factorial methods and cluster analysis.
@item FactoMineR
Factor analysis and data mining with R.
@item Fahrmeir
Data from the book ``Multivariate Statistical Modelling Based
on Generalized Linear Models'' by Ludwig Fahrmeir and Gerhard Tutz
(1994),  Springer.
@item FieldSim
Random fields simulations.
@item FinTS
Companion to the book ``Analysis of Financial Time Series'' (2nd
edition) by Ruey Tsay (2005), Wiley.
@item FitAR
Subset AR model fitting.
@item Flury
Data sets from from ``A First Course in Multivariate Statistics'' by
Bernard Flury (1997), Springer.
@c <COMMENT>
@c Moved to the Archive on 2007-11-17 as it fails R CMD check.
@c @item FortranCallsR
@c Simple Fortran/C/R interface example.
@c </COMMENT>
@item Formula
Infrastructure for extended formulas.
@item FrF2
Analysis of fractional factorial designs with 2-level factors.
@item FracSim
Simulation of one- and two-dimensional fractional and multifractional
Levy motions.
@item FunCluster
Functional profiling of cDNA microarray expression data.
@item FunNet
Functional analysis of gene co-expression networks.
@item G1DBN
Dynamic Bayesian Network inference using 1st order conditional
dependencies.
@item GAMBoost
Generalized additive models by likelihood based boosting.
@item GDD
Platform and X11 independent device for creating bitmaps (png, gif and
jpeg) using the GD graphics library.
@item GEOmap
Topographic and geologic mapping.
@item GExMap
Functions for the analysis of genomic distribution of genes lists
produced by transcriptomic studies.
@item GFMaps
Visualization of high-throughput genetic or proteomic experiments.
@item GLDEX
Fit RS and FMKL generalised lambda distributions using discretized and
maximum likelihood methods.
@item GOFSN
Goodness-Of-Fit tests for the family of Skew-Normal models.
@item GOSim
Computation of functional similarities between GO terms and gene
products.
@item GPArotation
Gradient Projection Algorithm rotation for factor analysis.
@item GRRGI
Gauge R and R Confidence Intervals.
@item GRASS
An interface between the GRASS geographical information system and R,
based on starting R from within the GRASS environment and chosen
LOCATION_NAME and MAPSET.  Wrapper and helper functions are provided for
a range of R functions to match the interface metadata structures.
@item GSA
Gene set analysis.
@item GSM
Gamma Shape Mixture.
@c <COMMENT>
@c Moved to the Archive on 2007-11-17 as it fails R CMD check.
@c @item GammaTest
@c Gamma Test data analysis.
@c </COMMENT>
@item GenABEL
Genome-wide SNP association analysis.
@item GenKern
Functions for generating and manipulating generalised binned kernel
density estimates.
@item GeneCycle
Identification of periodically expressed genes.
@item GeneF
Generalized @math{F}-statistics.
@item GeneNT
Relevance or Dependency network and signaling pathway discovery.
@item GeneNet
Modeling and inferring gene networks.
@item GeneReg
Infer gene regulatory networks with time delay using time course gene
expression data.
@c <COMMENT>
@c Moved to the Archive on 2009-01-26 as requested by the maintainer.
@c @item GeneTS
@c A package for analysing multiple gene expression time series data.
@c Currently, implements methods for cell cycle analysis and for inferring
@c large sparse graphical Gaussian models.
@c </COMMENT>
@item Geneland
MCMC inference from individual genetic data based on a spatial
statistical model.
@item GeoXp
Interactive exploratory spatial data analysis.
@item GillespieSSA
Gillespie's Stochastic Simulation Algorithm (SSA).
@item GridR
Executes functions on remote hosts, clusters or grids.
@item GroupSeq
Computations related to group-seqential boundaries.
@item HAPim
Methods for QTL detection and fine mapping.
@item HFWutils
Utilities by H. Felix Wittmann: Excel connections, string matching, and
passing by reference.
@item HH
Support software for ``Statistical Analysis and Data Display'' by
Richard M. Heiberger and Burt Holland, Springer, 2005.
@item HI
Simulation from distributions supported by nested hyperplanes.
@item HSAUR
Functions, data sets, analyses and examples from the book ``A Handbook
of Statistical Analyses Using R'' by Brian S. Everitt and Torsten 
Hothorn (2006), Chapman & Hall/CRC.
@item HTMLUtils
Facilitate automated @HTML{} report creation.
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item HTMLapplets
@c Functions inserting dynamic scatterplots and grids in documents
@c generated by @strong{R2HTML}.
@c </COMMENT>
@item HWEBayes
Bayesian investigation of Hardy-Weinberg Equilibrium.
@item HadoopStreaming
Utilities for using R scripts in Hadoop streaming.
@item Haplin
Analyzing case-parent triad and/or case-control data with SNP
haplotypes.
@item HaploSim
Simulate haplotypes through meioses.
@item HardyWeinberg
Graphical tests for Hardy-Weinberg equilibrium.
@item HiddenMarkov
Hidden Markov Models.
@c <COMMENT>
@c Moved to the Archive on 2008-05-09 (now contained in 'empiricalBayes'
@c bundle.
@c @item HighProbability
@c Estimation of the alternative hypotheses having frequentist or Bayesian
@c probabilities at least as great as a specified threshold, given a list
@c of @math{p}-values.
@c </COMMENT>
@item Hmisc
Functions useful for data analysis, high-level graphics, utility
operations, functions for computing sample size and power, importing
datasets, imputing missing values, advanced table making, variable
clustering, character string manipulation, conversion of S objects to
@LaTeX{} code, recoding variables, and bootstrap repeated measures
analysis.
@item HybridMC
Implementation of the Hybrid Monte Carlo and Multipoint Hybrid Monte
Carlo sampling techniques.
@item HydroMe
Estimation of soil hydraulic parameters from experimental data.
@item HyperbolicDist
Basic functions for the hyperbolic distribution: probability density
function, distribution function, quantile function, a routine for
generating observations from the hyperbolic, and a function for fitting
the hyperbolic distribution to data.
@item IBrokers
R @acronym{API} to Interactive Brokers Trader Workstation.
@item ICE
Iterated Conditional Expectation: kernel estimators for
interval-censored data.
@item ICEinfer
Incremental Cost-Effectiveness (ICE) statistical inference (from
two unbiased samples).
@item ICS
ICS/ICA computation based on two scatter matrices.
@item ICSNP
Tools for multivariate nonparametrics.
@item IDPmisc
Utilities from the Institute of Data Analyses and Process Design,
IDP/ZHW.
@c <COMMENT>
@c Moved to the Archive on 2008-02-21 as requested by the maintainer.
@c Replaced by RcmdrPlugin.IPSUR.
@c @item IPSUR
@c Accompanies ``Introduction to Probability and Statistics Using R'' by
@c G. Andy Chang and G. Jay Kerns (in progress).
@c </COMMENT>
@item ISA
Functions to support ``Introduzione alla Statistica Applicata con esempi
in R'' by Federico M. Stefanini, Pearson Education Milano, 2007.
@item ISOcodes
ISO language, territory, currency, script and character codes.
@item ISwR
Data sets for ``Introductory Statistics with R'' by Peter Dalgaard,
2002, Springer.
@item Icens
Functions for computing the NPMLE for censored and truncated data.
@c <COMMENT>
@c Moved to the Archive on 2007-11-17 as it fails R CMD check.
@c @item InfNet
@c Function that simulates an epidemic in a network of contacts.
@c </COMMENT>
@item Iso
Functions to perform isotonic regression.
@item IsoGene
Testing for monotonic relationship between gene expression and doses in
a microarray experiment.
@item JADE
JADE and ICA performance criteria.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item JLLprod
@c Nonparametric estimation of homothetic and generalized homothetic
@c production functions.
@c </COMMENT>
@item JGR
Java Gui for R.
@item JM
Joint Modeling of longitudinal and survival data.
@item JavaGD
Java Graphics Device.
@item JointGLM
Joint modeling of mean and dispersion through two interlinked GLM's.
@emph{Defunct} in favor of @strong{JointModeling}.
@item JointModeling
Joint modeling of mean and dispersion.
@item JudgeIt
Calculates bias, responsiveness, and other characteristics of two-party
electoral systems, with district-level electoral and other data.
@item KMsurv
Data sets and functions for ``Survival Analysis, Techniques for Censored
and Truncated Data'' by Klein and Moeschberger, 1997, Springer.
@item Kendall
Kendall rank correlation and Mann-Kendall trend test.
@item KernSmooth
Functions for kernel smoothing (and density estimation) corresponding to
the book ``Kernel Smoothing'' by M. P. Wand and M. C. Jones, 1995.
@emph{Recommended}.
@item LDheatmap
Heat maps of linkage disequilibrium measures.
@item LDtests
Exact tests for linkage disequilibrium and Hardy-Weinberg equilibrium.
@item LIM
Linear Inverse Model examples and solution methods.
@item LIStest
Longest increasing subsequence independence test.
@item LLAhclust
Hierarchical clustering of variables or objects based on the likelihood
linkage analysis method.
@c <COMMENT>
@c Moved to the Archive on 2009-04-26 (Orphaned/QC).
@c @item LLN
@c Learning with latent networks.
@c </COMMENT>
@item LMGene
Date transformation and identification of differentially expressed genes
in gene expression arrays.
@item LambertW
Lambert @math{W} parameter estimation.
@item LearnBayes
Functions for Learning Bayesian Inference.
@item LearnEDA
Functions for Learning Exploratory Data Analysis.
@item Lmoments
Estimation of L-moments and the parameters of normal and Cauchy
polynomial quantile mixtures.
@item LogConcDEAD
Maximum likelihood estimation of a log-concave density.
@item LogicReg
Routines for Logic Regression.
@item LoopAnalyst
A collection of tools to conduct Levins' Loop Analysis.
@item LowRankQP
Low Rank Quadratic Programming: QP problems where the hessian is
represented as the product of two matrices.
@item MASS
Functions and datasets from the main package of Venables and Ripley,
``Modern Applied Statistics with S''.  Contained in the @file{VR}
bundle.  @emph{Recommended}.
@item MAclinical
Class prediction based on microarray data and clinical parameters.
@item MAMSE
Calculation of Minimum Averaged Mean Squared Error (MAMSE) weights.
@item MBA
Multilevel @math{B}-spline Approximation.
@item MBESS
Methods for the Behavioral, Educational, and Social Sciences.
@item MCAPS
Weather and air pollution data, risk estimates, and other information
from the Medicare Air Pollution Study (MCAPS) of 204 U.S. counties,
1999--2002.
@item MCE
Tools for evaluating Monte Carlo Error.
@item MCMCglmm
MCMC Generalized Linear Mixed Models.
@item MCMCpack
Markov chain Monte Carlo (MCMC) package: functions for posterior
simulation for a number of statistical models.
@item MCPAN
Multiple comparisons using normal approximation.
@item MCPMod
Design and analysis of dose-finding studies.
@item MChtest
Monte Carlo hypothesis tests.
@c <COMMENT>
@c Moved to the Archive on 2009-06-24 (timeout/QC).
@c @item MDD
@c Minimum Detectable Difference calculations for several continuous and
@c binary endpoints.
@c </COMMENT>
@item MEMSS
Data sets and sample analyses from ``Mixed-effects Models in S and
S-PLUS'' by J. Pinheiro and D. Bates, 2000, Springer.
@item MFDA
Model Based Functional Data Analysis.
@item MIfuns
Pharmacometric tools for data preparation, analysis, simulation, and
reporting.
@item MKLE
Maximum kernel likelihood estimation.
@item MKmisc
Miscellaneous Functions from M. Kohl.
@item MLDA
Methylation Linear Discriminant Analysis (MLDA).
@item MLDS
Maximum Likelihood Difference Scaling.
@item MLEcens
Computation of the MLE for bivariate (interval) censored data.
@item MMG
Mixture Model on Graphs.
@item MNP
Fitting Bayesian Multinomial Probit models via Markov chain Monte Carlo.
Along with the standard Multinomial Probit model, it can also fit models
with different choice sets for each observation and complete or partial
ordering of all the available alternatives.
@item MPV
Data sets from the book ``Introduction to Linear Regression Analysis''
by D. C. Montgomery, E. A. Peck, and C. G. Vining, 2001, John Wiley and
Sons.
@item MSBVAR
Bayesian vector autoregression models, impulse responses and
forecasting.
@item MSVAR
Markov Switching VAR.
@c <COMMENT>
@c Moved to the Archive on 2006-04-20 as requested by the maintainer.
@c @item Malmig
@c An implementation of Malecot migration model together with a number of
@c related functions.
@c </COMMENT>
@item MarkedPointProcess
Non-parametric analysis of the marks of marked point processes.
@item MasterBayes
Maximum likelihood and Markov chain Monte Carlo methods for pedigree
reconstruction, analysis and simulation.
@item MatchIt
Select matched samples of the original treated and control groups with
similar covariate distributions.
@item Matching
Multivariate and propensity score matching with formal tests of balance.
@item Matrix
A Matrix package.  @emph{Recommended} for R 2.9.0 or later.
@item Metabonomic
@acronym{GUI} for metabonomic analysis.
@item MiscPsycho
Miscellaneous Psychometrics.
@item MixSim
Simulating data to study performance of clustering algorithms.
@item ModelMap
Random forest and stochastic gradient boosting models for building
detailed prediction maps.
@item MultEq
Equivalence tests and simultaneous confidence intervals for multiple
endpoints.
@item Multiclasstesting
Performance of @math{N}-ary classification testing.
@item NADA
Methods described in ``Nondetects And Data Analysis: Statistics for
Censored Environmental Data'' by Dennis R. Helsel, 2004, John Wiley and
Sons.
@item NISTnls
A set of test nonlinear least squares examples from @acronym{NIST}, the
U.S. National Institute for Standards and Technology.
@item NMMAPSlite
U.S. National Morbidity, Mortality, and Air Pollution Study data lite.
@item NMRS
NMR spectroscopy.
@item NORMT3
Evaluates complex erf, erfc and density of sum of Gaussian and Student's 
@math{t}.
@item NRAIA
Data sets with sample code from ``Nonlinear Regression Analysis and Its
Applications'' by Doug Bates and Donald Watts, 1988, Wiley.
@item NeatMap
Non-clustered heatmap alternatives.
@item NestedCohort
Survival analysis for cohorts with missing covariate information.
@item NetIndices
Estimates network indices, including trophic structure of foodwebs.
@item OAIHarvester
Harvest metadata using the Open Archives Initiative Protocol for
Metadata Harvesting (OAI-PMH) version 2.0.
@item OPE
Fit an outer-product emlator to the multivariate evaluations of a
computer model.
@item ORMDR
Odds ratio based multivactor-dimensionality reduction method for
detecting gene-gene interactions.
@item Oarray
Arrays with arbitrary offsets.
@item Oncotree
Estimation of oncogenetic trees.
@item OrdFacReg
Least squares, logistic, and Cox regression with ordered predictors.
@item OrdMonReg
Compute least squares estimates of one bounded or two ordered antitonic
regression curves.
@item PASWR
Data and functions for the book ``Probability and Statistics with R'' by
M. D. Ugarte, A. F. Militino and A. T. Arnholt, 2008, Chapman &
Hall/CRC.
@item PBSddesolve
Solver for delay differential equations.
@item PBSmapping
Software evolved from fisheries research conducted at the Pacific
Biological Station (PBS) in Nanaimo, British Columbia, Canada.  Draws
maps and implements other GIS procedures.
@item PBSmodelling
Software to facilitate the design, testing, and operation of computer
models.
@item PCS
Calculate the Probability of Correct Selection.
@item PET
Simulation and reconstruction of PET images.
@item PHYLOGR
Manipulation and analysis of phylogenetically simulated data sets (as
obtained from PDSIMUL in package PDAP) and phylogenetically-based
analyses using GLS.
@item PK
Estimation of pharmacokinetic parameters.
@item PKfit
A nonlinear regression (including a genetic algorithm) program designed
to deal with curve fitting for pharmacokinetics.
@item PKtools
Unified computational interfaces for pop PK.
@item PMA
Penalized Multivariate Analysis.
@item POT
Generalized Pareto distribution and Peaks Over Threshold.
@item PSAgraphics
Propensity Score Analysis Graphics.
@item PSM
Non-linear mixed-effects modeling using stochastic differential
equations.
@item PTAk
A multiway method to decompose a tensor (array) of any order, as a
generalisation of SVD also supporting non-identity metrics and
penalisations.  Also includes some other multiway methods.
@item PairViz
Visualization using Eulerian tours and Hamiltonian decompositions.
@item Peaks
Spectrum manipulation: background estimation, Markov smoothing,
deconvolution and peaks search functions.
@item PearsonICA
Independent component analysis using score functions from the Pearson
system.
@item PerformanceAnalytics
Econometric tools for performance and risk analysis.
@item PhViD
Pharmacovigilance signal detection methods extended to the multiple
comparison setting.
@item PhySim
Phylogenetic tree simulation.
@item PolynomF
Univariate polynomials.
@item Pomic
Pattern oriented modeling information criterion.
@item PredictiveRegression
Prediction intervals for three basic statistical models.
@item PresenceAbsence
Presence-absence model evaluation.
@c <COMMENT>
@c Moved to the Archive on 2009-02-23 (Orphaned).
@c @item ProbForecastGOP
@c Probabilistic weather field forecasts using the Geostatistical Output
@c Perturbation method introduced by Gel, Raftery and Gneiting (2004).
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2009-03-01 (Orphaned and license issues.)
@c @item ProbeR
@c Reliability for gene expression from Affymetrix chip.
@c </COMMENT>
@item ProfessR
Programs to determine student grades and create examinations from
question banks.
@item PtProcess
Time dependent point process modeling.
@item PwrGSD
Power in a Group Sequential Design.
@item QCA
Qualitative Comparative Analysis for crisp sets.
@item QCAGUI
QCA Graphical User Interface.
@item QRMlib
Code to examine Quantitative Risk Management concepts.
@item QuantPsyc
Quantitative Psychology tools.
@item R.cache
Fast and light-weight caching of objects.
@item R.filesets
Easy handling of and access to files organized in structured
directories.
@item R.huge
Methods for accessing huge amounts of data.
@item R.matlab
Read and write of MAT files together with R-to-Matlab connectivity.
@item R.methodsS3
Utility functions for defining S3 methods.
@item R.oo
R object-oriented programming with or without references.
@item R.rsp
R server pages.
@item R.utils
Utility classes and methods useful when programming in R and developing
R packages.
@item R2HTML
Functions for exporting R objects & graphics in an @HTML{} document.
@item R2WinBUGS
Running WinBUGS from R: call a BUGS model, summarize inferences and
convergence in a table and graph, and save the simulations in arrays for
easy access in R.
@item R2jags
Call JAGS from R.
@item RArcInfo
Functions to import Arc/Info V7.x coverages and data.
@item RBGL
Interface to the boost C++ graph library.
@item RBloomberg
Fetch data from a Bloomberg @acronym{API} using COM.
@item RColorBrewer
ColorBrewer palettes for drawing nice maps shaded according to a
variable.
@item RDS
Respondent-Driven Sampling.
@item RDieHarder
R interface to the dieharder random number generator test suite.
@item REQS
R/EQS interface.
@item RExcelInstaller
Integration of R and Excel under MS Windows.
@item RFA
Regional Frequency Analysis.
@item RFOC
Graphics for spherical distributions and earthquake focal mechanisms.
@item RFreak
An R interface to a modified version of the Free Evolutionary Algorithm
Kit FrEAK.g
@item RGtk2
Facilities for programming graphical interfaces using Gtk (the Gimp Tool
Kit) version 2.
@c <COMMENT>
@c Moved to Archive on 2007-05-29.
@c @item RGtk2.10
@c R bindings for Gtk 2.10.x.
@c </COMMENT>
@item RGrace
Mouse/menu driven interactive plotting application.
@item RGraphics
Data and functions from the book ``R Graphics'' by Paul Murrell, 2005,
Chapman & Hall/CRC.
@item RHRV
Heart rate variability analysis of ECG data.
@item RHmm
Hidden Markov Model simulations and estimations.
@item RII
Estimation of the relative index of inequality for interval-censored
data using natural cubic splines.
@item RImageJ
R bindings for the ImageJ Java based image processing and analysis
platform.
@item RItools
Randomization inference tools.
@item RJDBC
Access to databases through the JDBC interface.
@item RJaCGH
Reversible Jump MCMC for the analysis of CGH arrays.
@item RKEA
R/KEA interface for extracting keyphrases from text documents.
@item RLMM
A genotype calling algorithm for Affymetrix SNP arrays.
@item RLRsim
Exact (Restricted) Likelihood Ratio tests for mixed and additive
models.
@item RLadyBug
Analysis of infectious diseases using stochastic epidemic models.
@item RM2
Revenue management and pricing.
@item RMTstat
Distributions and statistics from Random Matrix Theory.
@item RMySQL
An interface between R and the MySQL database system.
@item RNetCDF
An interface to Unidata's NetCDF library functions (version 3) and
furthermore access to Unidata's udunits calendar conversions.
@item ROCR
Visualizing the performance of scoring classifiers.
@item RODBC
An @acronym{ODBC} database interface.
@item ROptEst
Optimally robust estimation.
@item ROptEstOld
Optimally robust estimation, old version.
@item ROptEstTS
Optimally robust estimation for regression-type models.
@item ROracle
Oracle Database Interface driver for R.  Uses the ProC/C++ embedded SQL.
@item RPMG
Poor Man's Gui: create interactive R analysis sessions.
@item RPostgreSQL
R interface to the PostgreSQL database system.
@item RPyGeo
ArcGIS Geoprocessing in R via Python.
@item RQDA
Qualitative Data Analysis.
@item RQuantLib
Provides access to (some) of the QuantLib functions from within R;
currently limited to some Option pricing and analysis functions.  The
QuantLib project aims to provide a comprehensive software framework for
quantitative finance.
@item RSAGA
SAGA geoprocessing and terrain analysis in R.
@item RSEIS
Seismic time series analysis tools.
@item RSQLite
Database Interface R driver for SQLite.  Embeds the SQLite database
engine in R.
@item RScaLAPACK
An interface to ScaLAPACK functions from R.
@item RSVGTipsDevice
An R @acronym{SVG} graphics device with dynamic tips and hyperlinks.
@item RSeqMeth
analysis of Sequenom EpiTYPER data.
@item RSiteSearch
Alternative interfaces to RSiteSearch.
@item RSurvey
Analysis of spatially distributed data.
@item RSvgDevice
A graphics device for R that uses the new w3.org @XML{} standard for
Scalable Vector Graphics.
@item RTOMO
Visualization for seismic tomography.
@item RTisean
R interface to Tisean algorithms.
@item RUnit
Functions implementing a standard Unit Testing framework, with
additional code inspection and report generation tools.
@item RWeka
An R interface to Weka, a rich collection of machine learning algorithms
for data mining tasks.
@item RWinEdt
A plug in for using WinEdt as an editor for R.
@item RXshrink
Maximum Likelihood Shrinkage via Ridge or Least Angle Regression.
@item RadioSonde
A collection of programs for reading and plotting SKEW-T,log p diagrams
and wind profiles for data collected by radiosondes (the typical weather
balloon-borne instrument).
@item RandVar
Implementation of random variables by means of S4 classes and methods.
@item RandomFields
Creating random fields using various methods.
@item RankAggreg
Weighted rank aggregation.
@item RaschSampler
Sampling binary matrices with fixed margins.
@item Ratings
Model-based ratings figures.
@item Rcapture
Loglinear models in capture-recapture experiments.
@item Rcmdr
A platform-independent basic-statistics @acronym{GUI} (graphical user
interface) for R, based on the @strong{tcltk} package.
@item RcmdrPlugin.Export
Graphically export objects to @LaTeX{} or @HTML{}.
@item RcmdrPlugin.FactoMineR
Rcmdr plug-in for the @strong{FactoMineR} package.
@item RcmdrPlugin.HH
Rcmdr support for the introductory course at Temple University.
@item RcmdrPlugin.IPSUR
Rcmdr plugin for ``Introduction to Probability and Statistics Using R''.
@item RcmdrPlugin.SurvivalT
Rcmdr survival plug-in.
@item RcmdrPlugin.TeachingDemos
Rcmdr Teaching Demos plug-in.
@item RcmdrPlugin.epack
Rcmdr epack demos plug-in.
@item RcmdrPlugin.orloca
Rcmdr orloca plug-in.
@item RcmdrPlugin.qcc
Rcmdr qcc plug-in.
@item RcmdrPlugin.survival
Rcmdr plugin for the @strong{survival} package.
@item Rcplex
R interface to CPLEX solvers for linear, quadratic, and (linear and
quadratic) mixed integer programs.
@c <COMMENT>
@c Moved to the Archive on 2007-09-25 as requested by the maintainer.
@c @item RcppTemplate
@c An illustration of the use of the Rcpp R/C++ interface library.
@c </COMMENT>
@item Rcpp
R/C++ interface library and package template.
@item Rcsdp
R interface to the CSDP semidefinite programming library.
@item Read.isi
Access old data saved in fixed-width format based on ISI-formatted
codebooks.
@item ReadImages
Functions for reading @acronym{JPEG} and @acronym{PNG} files. 
@item Reliability
Functions for estimating parameters in software reliability models.
@item ResearchMethods
Using GUIs to help teach statistics to non-statistics students.
@item ResistorArray
Electrical properties of resistor networks.
@item Rfwdmv
Forward Search for Multivariate Data.
@item Rglpk
R/GNU Linear Programming Kit interface.
@item RgoogleMaps
Overlays on Google map tiles in R.
@item RiboSort
Classification and analysis of microbial community profiles.
@item Rigroup
Provides small integer group functions.
@c <COMMENT>
@c Moved to the Archive on 2009-04-26 (Orphaned/QC).
@c @item Rlab
@c Functions and data sets for the NCSU ST370 class.
@c </COMMENT>
@item Rlabkey
Data retrieval from a Labkey database.
@item Rlsf
Interface to the LSF queuing system.
@c <COMMENT>
@c Moved to the Archive on 2004-08-11.
@c @item RmSQL
@c An interface between R and the mSQL database system.
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2009-02-23 (Orphaned).
@c @item Rmdr
@c R-Multifactor Dimensionality Reduction.
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2008-10-27 as requested by the maintainer.
@c @item Rmetrics
@c Financial engineering and computational finance.
@c </COMMENT>
@item Rmpi
An interface (wrapper) to MPI (Message-Passing Interface)
@acronym{API}s.  It also provides an interactive R slave environment in
which distributed statistical computing can be carried out.
@c @item Rnotes
@c The data sets for the exercises in ``An Introduction to R''
@c (@pxref{What documentation exists for R?}).
@item RobAStBase
Base classes and functions for robust asymptotic statistics.
@item RobLox
Optimally robust influence curves for location and scale.
@item RobRex
Optimally robust influence curves for regression and scale.
@item Rpad
Utility functions for the Rpad workbook-style interface.
@item Rsac
Seismic tools for R.
@item Rserve
A socket server (TCP/IP or local sockets) which allows binary requests
to be sent to R.
@item Rsge
Interface to the SGE cluster/grid queuing system.
@c REMOVED 2001-12-08
@c @item Rstreams
@c Binary file stream support functions.
@item Rsundials
SUite of Nonlinear DIfferential ALgebraic equations Solvers in R.
@item Rsymphony
An R interface to the SYMPHONY mixed integer linear program (MILP)
solver.
@item RthroughExcelWorkbooksInstaller
Excel workbooks supporting statistics courses using ``R through Excel''.
@item Runuran
Interface to the UNU.RAN library for Universal Non-Uniform RANdom
variate generators.
@item Rvelslant
Downhole seismic analysis.
@item Rwave
An environment for the time-frequency analysis of 1-D signals (and
especially for the wavelet and Gabor transforms of noisy signals), based
on the book ``Practical Time-Frequency Analysis: Gabor and Wavelet
Transforms with an Implementation in S'' by Rene Carmona, Wen L. Hwang
and Bruno Torresani, 1998, Academic Press.
@item Ryacas
An R interfaces to the yacas computer algebra system.
@item RxCEcolInf
@math{R x C} Ecological Inference with optional incorporation of survey
information.
@c <COMMENT>
@c Removed on 2006-10-06 as requested by the maintainer (now @BioC).
@c @item SAGx
@c Retrieval, preparation and analysis of data from the Affymetrix
@c GeneChip.
@c </COMMENT>
@item SASPECT
Significant AnalysiS of PEptide CounTs.
@item SASmixed
Data sets and sample linear mixed effects analyses corresponding to the
examples in ``SAS System for Mixed Models'' by R. C. Littell,
G. A. Milliken, W. W. Stroup and R. D. Wolfinger, 1996, SAS Institute.
@item SASxport
Read and write SAS XPORT files.
@item SDDA
Stepwise Diagonal Discriminant Analysis.
@item SDaA
Functions and data sets from ``Sampling: Design and Analysis'' by
S. Lohr, 1999, Duxbury.
@item SEMModComp
Model Comparisons for SEM.
@item SGCS
Spatial Graph based Clustering Summaries for spatial point patterns.
@item SGP
Student growth percentile and percentile growth projection/trajectory
functions.
@item SIN
A SINful approach to selection of Gaussian Graphical Markov Models.
@item SLmisc
Miscellaneous Functions for analysis of gene expression data at SIRS-Lab
GmbH.
@item SMC
Sequential Monte Carlo (SMC) Algorithm.
@item SMIR
Companion to ``Statistical Modelling in R'' by Murray Aitkin, Brian
Francis, John Hinde and Ross Darnell, 2009, Oxford University Press.
@item SMPracticals
Data sets and a few functions for use with the practicals outlined in
Appendix A of the book ``Statistical Models'' by Anthony Davison, 2003,
Cambridge University Press.
@item SMVar
Structural Model for Variances to detect differentially expressed
genes.
@item SNPMaP
SNP Microarrays and Pooling in R.
@item SNPMaP.cdm
Annotation for SNP microarrays and pooling in R.
@item SNPassoc
SNP-based whole genome association studies.
@item SNPmaxsel
Maximally selected statistics for SNP data.
@item SQLiteMap
Manage vector graphical maps using SQLite.
@item SQLiteDF
Stores data frames and matrices in SQLite tables.
@item SRPM
Shared Reproducibility Package Management.
@item STAR
Spike Train Analysis with R.
@c <COMMENT>
@c Moved to the Archive on 2009-01-22 (replaced by its unbundled
@c packages).
@c @item SciViews
@c A bundle of packages to implement a full reusable @acronym{GUI} API for
@c R.  Contains @strong{svGUI} with the main @acronym{GUI} features,
@c @strong{svDialogs} for the dialog boxes, @strong{svIO} for data
@c import/export, @strong{svMisc} with miscellaneous supporting functions,
@c and @strong{svViews} providing views and report features (views are
@c @acronym{HTML} presentations of the content of R objects, combining
@c text, tables and graphs in the same document).
@c </COMMENT>
@item ScottKnott
Multiple comparison test of means using the clustering method of Scott &
Knott.
@item SemiPar
Functions for semiparametric regression analysis, to complement the
book ``Semiparametric Regression'' by R. Ruppert, M. P. Wand, and
R. J. Carroll, 2003, Cambridge University Press.
@item SenSrivastava
Collection of datasets from ``Regression Analysis, Theory, Methods and
Applications'' by A. Sen and M. Srivastava, 1990, Springer.
@item SensoMineR
Sensory data analysis.
@item SeqKnn
Sequential KNN imputation.
@item SharedHT2
Shared Hotelling @math{T^2} test for small sample microarray
experiments.
@item SiZer
Significant Zero crossings.
@item SigWinR
SigWin-detector implementation in R.
@item SimComp
Simultaneous Comparisons for multiple endpoints.
@item SimHap
A comprehensive modeling framework for epidemiological outcomes and a
multiple-imputation approach to haplotypic analysis of population-based
data.
@item SimpleTable
Bayesian inference and sensitivity analysis for causal effects from
@math{2 x 2} and @math{2 x 2 x K} tables in the presence of unmeasured
confounding.
@item Snowball
Snowball stemmers.
@item SoDA
Utilities and examples from the book ``Software for Data Analysis:
Programming with R'' by John Chambers, Springer, 2008.
@item SoPhy
Soil Physics Tools: simulation of water flux and solute transport in
soil.
@c <COMMENT>
@c Moved to the Archive on 2009-03-01 (Orphaned and license issues.)
@c @item SparseLogReg
@c Sparse logistic regression.
@c </COMMENT>
@item SparseM
Basic linear algebra for sparse matrices.
@item SpatialExtremes
Modeling spatial extremes.
@item SpatialNP
Multivariate nonparametric methods based on spatial signs and ranks.
@item SpectralGEM
Discovering genetic ancestry using spectral graph theory.
@item SpherWave
Spherical Wavelets and SW-based spatially adaptive methods.
@item StatDA
Statistical analysis for environmental data, a companion to the book
``Statistical Data Analysis Explained: Applied Environmental Statistics
with R'' by C. Reimann, P. Filzmoser, R. G. Garrett, and R. Dutter,
2008, John Wiley and Sons.
@item StatDataML
Read and write StatDataML.
@item StatFingerprints
Processing and statistical analysis of molecular fingerprint profiles.
@item StatMatch
Functions to perform statistical matching between two data sources.
@item Stem
Spatio-temporal models in R.
@c <COMMENT>
@c Removed on 2007-11-17 due to license problems.
@c @item StoppingRules
@c Stopping rules for microarray classifiers.
@c </COMMENT>
@item StreamMetabolism
Calculation of single station metabolism from diurnal oxygen curves.
@item SubpathwayMiner
Annotation and identification of metabolic sub-pathways and pathways.
@item SuppDists
Ten distributions supplementing those built into R (Inverse Gauss,
Kruskal-Wallis, Kendall's Tau, Friedman's chi squared, Spearman's rho,
maximum F ratio, the Pearson product moment correlation coefficiant,
Johnson distributions, normal scores and generalized hypergeometric
distributions).
@item SweaveListingUtils
Utilities for Sweave together with @TeX{} listings package.
@item SwissAir
Air quality data of Switzerland for one year in 30 min resolution.
@item SyNet
Inference and analysis of sympatry networks.
@item Synth
Causal inference using the synthetic control group method.
@item TIMP
A problem solving environment for fitting superposition models.
@item TRAMPR
Terminal Restriction Fragment Length Polymorphism (TRFLP) Analysis and
Matching Package for R.
@item TRIANG
Discrete triangular distributions.
@item TSA
Functions and datasets detailed in the book ``Time Series Analysis
With Applications in R'' (3rd edition) by Jonathan Cryer and Kung-Sik
Chan, 2008, Springer.
@item TSHRC
Two Stage Hazard Rate Comparison.
@item TSMySQL
Time Series Database Interface extensions for MySQL.
@item TSP
Traveling Salesperson Problem (TSP).
@item TSPostgreSQL
Time Series Database Interface extensions for PostgreSQL.
@item TSSQLite
Time Series Database Interface extensions for SQLite.
@item TSdbi
Time Series Database Interface.
@item TSfame
Time Series Database Interface extensions for fame.
@item TShistQuote
Time Series Database Interface interface for get.hist.quote.
@item TSodbc
Time Series Database Interface extensions for ODBC.
@item TSpadi
Connect to a time series database (e.g., Fame) via PADI (Protocol for
Application Database Interface), using the @strong{TSdbi}
infrastructure.
@item TTR
Technical Trading Rules.
@item TWIX
Trees WIth eXtra splits.
@item TeachingDemos
A set of demonstration functions that can be used in a classroom to
demonstrate statistical concepts, or on your own to better understand
the concepts or the programming.
@item TeachingSampling
Sampling designs and parameter estimation in finite populations.
@item TinnR
Resources for the Tinn-R GUI/Editor for R.
@item TraMineR
Sequences and trajectories mining for social scientists.
@item TripleR
Social Relation Model (SRM) analyses for single round-robin groups.
@item TwoWaySurvival
Additive two-way hazards modeling of right censored survival data.
@item TwslmSpikeWeight
Normalization of cDNA microarray data with the two-way semilinear model
(TW-SLM).
@item UNF
Tools for creating universal numeric fingerprints for data.
@item USPS
Unsupervised and Supervised methods of Propensity Score adjustment for
bias.
@item Umacs
Universal MArkov Chain Sampler.
@item UsingR
Data sets to accompany the textbook ``Using R for Introductory
Statistics'' by J. Verzani, 2005, Chapman & Hall/CRC.
@item VDCutil
Utilities supporting VDC, an open source digital library system for
quantitative data.
@item VGAM
Vector Generalized Linear and Additive Models.
@item VIM
Visualization and Imputation of Missing Values.
@item VLMC
Functions, classes & methods for estimation, prediction, and simulation
(bootstrap) of VLMC (Variable Length Markov Chain) models.
@item VaR
Methods for calculation of Value at Risk (VaR).
@item VarianceGamma
The variance gamma distribution.
@item VhayuR
R interface to the Vhayu Velocity high volume fast financial market data
archival and analysis products.
@item WINRPACK
Reads in WIN pickfile and waveform files.
@item WWGbook
Functions and datasets for the book ``Linear Mixed Models: A Practical
Guide Using Statistical Software'' by B. West, K. Welch, and A. Galecki,
2006, Chapman & Hall/CRC.
@c <COMMENT>
@c Moved to the Archive on 2009-06-17 as requested by the maintainer.
@c @item WaveCGH
@c Wavelet changepoint detection for array CGH.
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2009-06-24 (timeout/QC).
@c @item WeedMap
@c Map of weed intensity.
@c </COMMENT>
@item WhatIf
Software for evaluating counterfactuals.
@item WilcoxCV
Wilcoxon-based variable selection in cross-validation.
@item WriteXLS
Cross-platform Perl based R function to create Excel 2003 (XLS) files.
@item XML
Tools for reading @XML{} documents and DTDs.
@item XReg
Extreme regression.
@item YaleToolkit
Data exploration tools from Yale University.
@item YourCast
YourCast: time series cross-sectional forecasts.
@item ZIGP
Zero Inflated Generalized Poisson (ZIGP) regression models.
@item Zelig
Everyone's statistical software: an easy-to-use program that can
estimate, and help interpret the results of, an enormous range of
statistical models.
@item aCGH.Spline
Robust spline interpolation for dual color array comparative genomic  
hybridisation data.
@item aaMI
Mutual information for protein sequence alignments.
@item abind
Combine multi-dimensional arrays.
@item accuracy
A suite of tools designed to test and improve the accuracy of
statistical computation.
@item acepack
ACE (Alternating Conditional Expectations) and AVAS (Additivity and
VAriance Stabilization for regression) methods for selecting regression
transformations.
@item actuar
Functions related to actuarial science applications.
@item ada
Performs boosting algorithms for a binary response.
@item adabag
Adaboost.M1 and Bagging.
@item adapt
Adaptive quadrature in up to 20 dimensions.
@item ade4
Multivariate data analysis and graphical display.
@item ade4TkGUI
Tcl/Tk Graphical User Interface for @strong{ade4}.
@item adegenet
Genetic data handling for multivariate analysis using @strong{ade4}.
@item adehabitat
A collection of tools for the analysis of habitat selection by animals.
@item adimpro
Adaptive smoothing of digital images.
@item adk
Anderson-Darling @math{K}-sample test and combinations of such tests.
@item adlift
Adaptive Wavelet transforms for signal denoising.
@item ads
Spatial point patterns analysis.
@item afc
Calculate the Generalized Discrimination Score (also known as Two
Alternatives Forced Choice Score, 2AFC).
@item agce
Analysis of growth curve experiments.
@item agreement
Analyze the agreement between two measurement methods.
@item agricolae
Statistical procedures for agricultural research.
@item agsemisc
Miscellaneous plotting and utility functions.
@item akima
Linear or cubic spline interpolation for irregularly gridded data.
@item allelic
A fast, unbiased and exact allelic exact test.
@item alphahull
Generalization of the convex hull of a sample of points in the plane.
@item alr3
Methods and data to accompany the textbook ``Applied Linear Regression''
by S. Weisberg, 2005, Wiley.
@item amap
Another Multidimensional Analysis Package.
@item amei
Adaptive Management of Epidemiological Interventions.
@item anacor
Simple and Canonical Correspondence Analysis.
@item analogue
Analogue methods for palaeoecology.
@item anapuce
Tools for microarray data analysis.
@item animation
Demonstrate animations in statistics.
@item anm
Analog model for statistical/empirical downscaling.
@item aod
Analysis of Overdispersed Data.
@item apTreeshape
Analyses of phylogenetic treeshape.
@item ape
Analyses of Phylogenetics and Evolution, providing functions for reading
and plotting phylogenetic trees in parenthetic format (standard Newick
format), analyses of comparative data in a phylogenetic framework,
analyses of diversification and macroevolution, computing distances from
allelic and nucleotide data, reading nucleotide sequences from GenBank
via internet, and several tools such as Mantel's test, computation of
minimum spanning tree, or the population parameter theta based on
various approaches.
@item aplpack
Another PLot PACKage: stem.leaf, bagplot, faces, spin3R, @dots{}.
@item apsrtable
American Political Science Review style table formatting.
@item archetypes
Archetypal analysis.
@item argosfilter
Argos locations filter.
@item arm
Data Analysis using Regression and Multilevel/hierarchical models.
@item aroma.apd
A probe-level data file format used by @strong{aroma.affymetrix}.
@item aroma.core
Support package for @strong{aroma.affymetrix} et al.
@item arrayImpute
Missing imputation for microarray data.
@item arrayMissPattern
Exploratory analysis of missing patterns for microarray data.
@item ars
Adaptive Rejection Sampling.
@item arules
Mining association rules and frequent itemsets with R.
@item arulesNBMiner
Mining NB-frequent itemsets and NB-precise rules.
@item arulesSequences
Mining frequent sequences.
@item ascii
Export R objects to asciidoc or txt2tags.
@item ash
David Scott's ASH routines for 1D and 2D density estimation.
@item aspace
Estimating centrographic statistics and computational geometries from
spatial point patterns.
@item aspect
Aspects of multivariables.
@item assist
A suite of functions implementing smoothing splines.
@item aster
Functions and datasets for Aster modeling (forest graph exponential
family conditional or unconditional canonical statistic models for life
history trait modeling).
@item asympTest
Asymptotic testing.
@item asypow
A set of routines that calculate power and related quantities utilizing
asymptotic likelihood ratio methods.
@item audio
Audio interface for R.
@item automap
Automatic interpolation.
@item asuR
Functions and data sets for a lecture in ``Advanced Statistics using
R''.
@item aws
Functions to perform adaptive weights smoothing.
@item aylmer
A generalization of Fisher's exact test.
@item backfitRichards
Backfitted independent values of Richards curves.
@item backtest
Exploring portfolio-based hypotheses about financial instruments.
@item bark
Bayesian Additive Regression Kernels.
@item bayesCGH
Bayesian analysis of array CGH data.
@item bayesGARCH
Bayesian estimation of the GARCH(1,1) model with Student's @math{t}
innovations.
@item bayesSurv
Bayesian survival regression with flexible error and (later on also
random effects) distributions.
@item bayesclust
Tests/searches for significant clusters in genetic data.
@item bayescount
Bayesian analysis of count distributions with JAGS.
@item bayesm
Bayes Inference for Marketing/Micro-econometrics.
@item bayesmix
Bayesian mixture models of univariate Gaussian distributions using JAGS.
@c <COMMENT>
@c Moved to the Archive on 2006-04-28 (2.3.0 Error; no response).
@c @item baymvb
@c Bayesian analysis of multivariate binary data.
@c </COMMENT>
@item bbmle
Modifications and extensions of @strong{stats4} MLE code.
@item bcp
Bayesian Change Point based on the Barry and Hartigan product partition
model.
@item beanplot
Visualization via beanplots.
@item bear
Bioavability and bioequivalence data analysis with crossover design.
@item benchden
28 benchmark densities from Berlinet/Devroye (1994).
@item bentcableAR
Bent-cable regression for independent data or autoregressive time
series.
@item betaper
Distance decay of similarity among biological inventories in the face of
taxonomic uncertainty.
@item betareg
Beta regression for modeling rates and proportions.
@item bethel
Sample size according to Bethel's procedure.
@item bs
Utilities for the Birnbaum-Saunders distribution.
@item biOps
Basic image operations and image processing.
@item biOpsGUI
@acronym{GUI} for Basic image operations.
@item biclust
BiCluster algorithms.
@item bicreduc
Reduction algorithm for the NPMLE for the distribution function of
bivariate interval-censored data.
@item bifactorial
Inferences for bi- and trifactorial trial designs.
@item biglm
Linear regression for data too large to fit in memory.
@item bigmemory
Manage massive matrices in R using C++, with UNIX support for shared
memory.
@item bim
Bayesian interval mapping diagnostics:  functions to interpret QTLCart
and Bmapqtl samples.
@item binGroup
Evaluation and experimental design for binomial group testing.
@item binMto
Asymptotic simultaneous confidence intervals for many-to-one comparisons
of proportions.
@item binarySimCLF
Simulate correlated binary data.
@item bindata
Generation of correlated artificial binary data.
@item binom
Binomial confidence intervals for several parameterizations.
@item binomSamSize
Confidence intervals and sample size determination for a binomial
proportion under simple random sampling and pooled sampling.
@item bio.infer
Compute biological inferences.
@item biopara
Self-contained parallel system for R.
@item bipartite
Visualises bipartite networks and calculates some ecological indices.
@item birch
Dealing with very large datasets using BIRCH.
@item bise
Auxiliary functions for phenological data analysis.
@item bit
A class for vectors of 1-bit booleans.
@item bitops
Functions for Bitwise operations on integer vectors.
@item bivpois
Bivariate Poisson models using the EM algorithm.
@item blighty
Function for drawing the coastline of the United Kingdom.
@item blockTools
Block, randomly assign, and diagnose potential problems between units in
randomized experiments.
@item blockmodeling
Generalized and classical blockmodeling of valued networks.
@item blockrand
Randomization for block random clinical trials.
@item bmd
Benchmark dose analysis for dose-response data.
@item bnlearn
Bayesian network structure learning.
@item boa
Bayesian Output Analysis Program for MCMC.
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item boolean
@c Boolean logit and probit: a procedure for testing Boolean hypotheses.
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2009-06-24 (timeout/QC).
@c @item boost
@c Boosting methods for real and simulated data, featuring `BagBoost',
@c `LogitBoost', `AdaBoost', and `L2Boost'.
@c </COMMENT>
@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.  @emph{Recommended}.
@item bootRes
Bootstrapped response and correlation functions.
@item bootStepAIC
Model selection by bootstrapping the @code{stepAIC()} procedure.
@item bootspecdens
Bootstrap for testing equality of spectral densities.
@item bootstrap
Software (bootstrap, cross-validation, jackknife), data and errata for
the book ``An Introduction to the Bootstrap'' by B. Efron and
R. Tibshirani, 1993, Chapman and Hall.
@item bpca
Biplot of multivariate data based on Principal Components Analysis.
@item bqtl
QTL mapping toolkit for inbred crosses and recombinant inbred lines.
Includes maximum likelihood and Bayesian tools.
@item brainwaver
Basic wavelet analysis of multivariate time series with a vizualisation
and parametrization using graph theory.
@item brew
Templating framework for report generation.
@item brglm
Bias-reduction in binomial-response GLMs.
@c <COMMENT>
@c Moved to the Archive on 2008-10-07 as requested by the maintainer.
@c @item brlr
@c Bias-reduced logistic regression: fits logistic regression models by
@c maximum penalized likelihood.
@c </COMMENT>
@item bspec
Bayesian inference on the (discrete) power spectrum of time series.
@c <COMMENT>
@c Moved to the Archive on 2008-05-02 as requested by the maintainer.
@c @item butler
@c Unit testing, profiling and benchmarking for R.
@c </COMMENT>
@item bvls
The Stark-Parker algorithm for bounded-variable least squares.
@item ca
Simple, multiple and joint Correspondence Analysis.
@item caMassClass
Processing and Classification of protein mass spectra (SELDI) data.
@item caTools
Miscellaneous utility functions, including reading/writing ENVI binary
files, a LogitBoost classifier, and a base64 encoder/decoder.
@item cacheSweave
Tools for caching Sweave computations.
@item cacher
Tools for caching and distributing statistical analyses.
@item cairoDevice
Loadable CAIRO/GTK device driver.
@item calib
Statistical tool for calibration of plate based bioassays.
@item calibrate
Calibration of biplot axes.
@item candisc
Generalized canonical discriminant analysis.
@item canvas
R graphics device targeting the @HTML{} canvas element.
@item car
Companion to Applied Regression, containing functions for applied
regession, linear models, and generalized linear models, with an
emphasis on regression diagnostics, particularly graphical diagnostic
methods.
@item caret
Classification and REgression Training.
@item caretLSF
Classification and REgression Training, LSF style.
@item caretNWS
Classification and REgression Training in parallel using NetworkSpaces.
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item cat
@c Analysis of categorical-variable datasets with missing values.
@c </COMMENT>
@item catmap
Case-control and TDT meta-analysis package.
@item catspec
Special models for categorical variables.
@item cba
Clustering for Business Analytics, including implementations of Proximus
and Rock.
@item ccgarch
Conditional Correlation GARCH models.
@item cclust
Convex clustering methods, including @math{k}-means algorithm, on-line
update algorithm (Hard Competitive Learning) and Neural Gas algorithm
(Soft Competitive Learning) and calculation of several indexes for
finding the number of clusters in a data set.
@item ccems
Combinatorially Complex Equilibrium Model Selection.
@item cellVolumeDist
Functions to fit cell volume distributions and thereby estimate cell
growth rates and division times.
@item celsius
Retrieve Affymetrix microarray measurements and metadata from Celsius.
@item cem
The coarsened exact matching algorithm (and many extensions).
@item cfa
Analysis of configuration frequencies.
@item cggd
Continuous Generalized Gradient Descent.
@item cgh
Analysis of microarray comparative genome hybridisation data using the
Smith-Waterman algorithm.
@item cghFLasso
Hot spot detecting for CGH array data with fused lasso regression.
@item chplot
Augmented convex hull plots: informative and nice plots for grouped
bivariate data.
@item changeLOS
Change in length of hospital stay (LOS).
@item cheb
Discrete linear Chebyshev approximation.
@item chemCal
Calibration functions for analytical chemistry.
@item chemometrics
Companion to the book ``Introduction to Multivariate Statistical
Analysis in Chemometrics'' by K. Varmuza and P. Filzmoser, CRC Press, to
appear.
@item choplump
Choplump tests (permutation tests for comparing two groups with some
positive but many zero responses).
@item chron
A package for working with chronological objects (times and dates).
@item cir
Nonparametric estimation of monotone functions via isotonic regression
and centered isotonic regression.
@item circular
Circular statistics, from ``Topics in Circular Statistics'' by Rao
Jammalamadaka and A. SenGupta, 2001, World Scientific.
@item clValid
Statistical and biological validation of clustering results.
@item clac
Clust Along Chromosomes, a method to call gains/losses in CGH array
data.
@item class
Functions for classification (@math{k}-nearest neighbor and LVQ).
Contained in the @file{VR} bundle.  @emph{Recommended}.
@item classGraph
Construct graph of S4 class hierarchies.
@item classInt
Choose univariate class intervals for mapping or other graphics
purposes.
@c <COMMENT>
@c Moved to the Archive on 2009-03-01 (Orphaned and license issues.)
@c @item classPP
@c Projection Pursuit for supervised classification.
@c </COMMENT>
@item classifly
Explore classification models in high dimensions.
@item clim.pact
Climate analysis and downscaling for monthly and daily data.
@item climatol
Functions to fill missing data in climatological (monthly) series and to
test their homogeneity, plus functions to draw wind-rose and
Walter&Lieth diagrams.
@c <COMMENT>
@c Archived on 2007-03-13 as requested by the maintainer.
@c @item clines
@c Calculates Contour Lines.
@c </COMMENT>
@item clinfun
Utilities for clinical study design and data analyses.
@item clinsig
Functions for calculating clinical significance.
@item clue
CLUster Ensembles.
@item clues
Clustering method based on local shrinking.
@item clustTool
@acronym{GUI} for clustering data with spatial information.
@item cluster
Functions for cluster analysis.  @emph{Recommended}.
@item clusterGeneration
Random cluster generation (with specified degree of separation).
@item clusterRepro
Reproducibility of gene expression clusters.
@item clusterSim
Searching for optimal clustering procedure for a data set.
@item clusterfly
Explore clustering interactively using R and GGobi.
@item clustvarsel
Variable selection for model-based clustering.
@item clv
Cluster validation techniques.
@item cmm
Categorical Marginal Models.
@item cmprsk
Estimation, testing and regression modeling of subdistribution functions
in competing risks.
@item cmprskContin
Continuous mark-specific relative risks for two groups.
@item cmrutils
Miscellaneous functions from the Center for the Mathematical Research,
Stankin, Moskow.
@item cobs99
Constrained B-splines: outdated 1999 version.
@item cobs
Constrained B-splines: qualitatively constrained (regression) smoothing
via linear programming and sparse matrices.
@item cocorresp
Co-correspondence analysis ordination methods for community ecology.
@item coda
Output analysis and diagnostics for Markov Chain Monte Carlo (MCMC)
simulations.
@item codetools
Code analysis tools.  @emph{Recommended} for R 2.5.0 or later.
@item coin
COnditional INference procedures for the general independence problem
including two-sample, @math{K}-sample, correlation, censored, ordered
and multivariate problems.
@item colorRamp
Builds single and double gradient color maps.
@item colorspace
Mapping between assorted color spaces.
@item combinat
Combinatorics utilities.
@item compHclust
Complementary hierarchical clustering.
@item compOverlapCorr
Comparing overlapping correlation coefficients.
@item compare
Comparing objects for differences.
@item compoisson
Conway-Maxwell-Poisson distribution.
@item compositions
Functions for the consistent analysis of compositional data (e.g.,
portions of substances) and positive numbers (e.g., concentrations).
@item concor
Concordance, providing ``SVD by blocks''.
@item concord
Measures of concordance and reliability.
@item conf.design
A series of simple tools for constructing and manipulating confounded
and fractional factorial designs.
@item connectedness
Find disconnected sets for two-way classification.
@item contfrac
Continued fractions.
@item contrast
A collection of contrast methods.
@item convexHaz
Nonparametric MLE/LSE of convex hazard.
@item copas
Statistical methods to model and adjust for bias in meta-analysis.
@item copula
Classes of commonly used copulas (including elliptical and Archimedian),
and methods for density, distribution, random number generators, and
plotting.
@item corcounts
Generate correlated count random variables.
@item corpcor
Efficient estimation of covariance and (partial) correlation.
@item corpora
Utility functions for the statistical analysis of corpus frequency
data.
@item corrgram
Plot a correlogram.
@item corrperm
Permutation tests of correlation with repeated measurements.
@item countrycode
Convert country names and coding schemes.
@item covRobust
Robust covariance estimation via nearest neighbor cleaning.
@item coxphf
Cox regression with Firth's penalized likelihood.
@item coxphw
Weighted estimation for Cox regression.
@item coxrobust
Robust Estimation in the Cox proportional hazards regression model.
@item cramer
Routine for the multivariate nonparametric Cramer test.
@item crank
Functions for completing and recalculating rankings.
@item crawl
(C)orrelated (RA)ndom (W)alk (L)ibrary for fitting continuous-time
correlated random walk models for animal movement data.
@item crossdes
Functions for the construction and randomization of balanced carryover
balanced designs, to check given designs for balance, and for simulation
studies on the validity of two randomization procedures.
@item crosshybDetector
Detection of cross-hybridization events in microarray experiments.
@item crq
Quantile regression for randomly censored data.
@item cslogistic
Likelihood and posterior analysis of conditionally specified logistic
regression models.
@item cts
Continuous time autoregressive models and the Kalman filter.
@item ctv
Server-side and client-side tools for @acronym{CRAN} task views.
@item curvetest
Test the equality of two curves, or one curve with 0.
@item cwhmisc
Miscellaneous functions by Christian W. Hoffmann.
@item cyclones
Cyclone identification.
@item data.table
Extension of data frames to allow subscripting by expressions evaluated
within the frame.
@item dataframes2xls
Write data frames to @file{.xls} files.
@item date
Functions for dealing with dates.  The most useful of them accepts a
vector of input dates in any of the forms @samp{8/30/53},
@samp{30Aug53}, @samp{30 August 1953}, @dots{}, @samp{August 30 53}, or
any mixture of these.
@item dblcens
Calculates the NPMLE of the survival distribution for doubly censored
data.
@item ddesolve
Solver for Delay Differential Equations.
@item ddst
Data driven smooth Neyman test.
@item deSolve
General solvers for ordinary differential equations (ODE) and for
differential algebraic equations (DAE).
@item deal
Bayesian networks with continuous and/or discrete variables can be
learned and compared from data.
@item debug
Debugger for R functions, with code display, graceful error recovery,
line-numbered conditional breakpoints, access to exit code, flow
control, and full keyboard input.
@item degreenet
Models for skewed count distributions relevant to networks.
@item deldir
Calculates the  Delaunay triangulation and the Dirichlet or Voronoi
tesselation (with respect to the entire plane) of a planar point set.
@item delt
Estimation of multivariate densities with adaptive histograms.
@item demogR
Analysis of age-structured demographic models.
@item denpro
Visualization of multivariate density functions and estimates with level 
set trees and shape trees, and visualization of multivariate data with
tail trees.
@item denstrip
Density strips and other methods for compactly illustrating
distributions.
@item depmix
Dependent Mixture Models: fit (multi-group) mixtures of latent Markov
models on mixed categorical and continuous (time series) data.
@item depmixS4
Dependent Mixture Models: fit latent (hidden) Markov models on mixed
categorical and continuous (time series) data.
@item depth
Depth functions tools for multivariate analysis.
@item descr
Functions to describe weighted categorical variables, and to facilitate
the character encoding conversion of objects.
@item desirability
Desirabiliy function optimization and ranking.
@item dfcrm
Dose-finding by the continual reassessment method.
@item dglm
Double generalized linear models.
@item diagram
Functions for visualising simple graphs (networks) and plotting flow
diagrams.
@item diamonds
Functions for illustrating aperture-4 diamond partitions in the plane,
or on the surface of an octahedron or icosahedron, for use as analysis
or sampling grids.
@item dice
Calculate probabilities of various dice-rolling events.
@item dichromat
Color schemes for dichromats: collapse red-green distinctions to
simulate the effects of colour-blindness.
@item diffractometry
Baseline identification and peak decomposition for x-ray
diffractograms.
@item diffusionMap
Diffusion map method of data parametrization.
@item digeR
@acronym{GUI} for analyzing 2D DIGE data.
@item digest
Two functions for the creation of ``hash'' digests of arbitrary R
objects using the md5 and sha-1 algorithms permitting easy comparison of
R language objects.
@item diptest
Compute Hartigan's dip test statistic for unimodality.
@item dirichlet
Dirichlet model of consumer buying behavior for marketing research.
@item dirmult
Estimation of Dirichlet-Multinomial distribution.
@item diseasemapping
Calculate SMRs from population and case data.
@item dispmod
Functions for modelling dispersion in GLMs.
@item distr
An object orientated implementation of distributions and some additional
functionality.
@item distrDoc
Documentation for packages @strong{distr}, @strong{distrEx},
@strong{distrSim}, and @strong{distrTEst}.
@item distrEx
Extensions of package @strong{distr}.
@item distrMod
Object orientated implementation of probability models based on
@strong{distr} and @strong{distrEx}.
@item distrSim
Simulation classes based on package @strong{distr}.
@item distrTEst
Estimation and Testing classes based on package @strong{distr}.
@item distrTeach
Extensions of @strong{distr} for teaching stochastics/statistics in
secondary school.
@item distributions
Probability distributions based on TI-83 Plus.
@item divagis
Tools for quality checks of georeferenced plant species accessions.
@item diveMove
Dive analysis and calibration.
@item dlm
Maximum likelihood and Bayesian analysis of Dynamic Linear Models.
@item dlmap
Detection Localization Mapping for QTL.
@item doBy
Facilities for groupwise computations.
@item dplR
Dendrochronology Program Library in R.
@c <COMMENT>
@c Moved to the Archive on 2009-06-24 (timeout/QC).
@c @item dprep
@c Data preprocessing and visualization functions for classification.
@c </COMMENT>
@item dr
Functions, methods, and datasets for fitting dimension reduction
regression, including pHd and inverse regression methods SIR and SAVE.
@item drc
Non-linear regression analysis for multiple curves with focus on
concentration-response, dose-response and time-response curves.
@item drm
Regression and association models for clustered categorical responses.
@item drfit
Dose-response data evaluation.
@item dse
Dynamic System Estimation, a multivariate time series package bundle.
Contains @strong{dse1} (the base system, including multivariate ARMA and
state space models) and @strong{dse2} (extensions for evaluating
estimation techniques, forecasting, and for evaluating forecasting
model).
@item dti
DTI (Diffusion Tensor Image) analysis.
@item dtt
Discrete Trigonometric Transforms.
@item dtw
Dynamic Time Warping algorithms.
@item dyad
Analysis of dyadic observational data.
@item dyn
Time series regression.
@item dynCorr
Dynamic correlation.
@item dynGraph
Interactive visualization of data frames and factorial planes.
@item dynamicGraph
Interactive graphical tool for manipulating graphs.
@item dynamicTreeCut
Methods for detection of clusters in hierarchical clustering
dendrograms.
@item dynamo
Estimation, simulation, regularization and prediction of univariate
dynamic models including ARMA, ARMA-GARCH, ACD, and MEM.
@item dynlm
Dynamic linear models and time series regression.
@item e1071
Miscellaneous functions used at the Department of Statistics at TU Wien
(E1071), including moments, short-time Fourier transforms, Independent
Component Analysis, Latent Class Analysis, support vector machines, and
fuzzy clustering, shortest path computation, bagged clustering, and some
more.
@item eRm
Estimating extended Rasch models.
@item earth
Earth: multivariate adaptive regression spline models.
@item eba
Fitting and testing probabilistic choice models, especially the BTL,
elimination-by-aspects (EBA), and preference tree (Pretree) models.
@item ecespa
Functions and data for spatial point pattern analysis.
@item eco
Fitting Bayesian models of ecological inference in 2 by 2 tables.
@item ecodist
Dissimilarity-based functions for ecological analysis.
@item ecolMod
Figures, data sets and examples from the book ``A Practical Guide to
Ecological Modelling --- Using R as a Simulation Platform'' by Karline
Soetaert and Peter M. J. Herman, 2008, Springer.
@c <COMMENT>
@c Moved to the Archive on 2007-11-29 as it fails R CMD check.
@c @item edci
@c Edge Detection and Clustering in Images.
@c </COMMENT>
@item effects
Graphical and tabular effect displays, e.g., of interactions, for linear
and generalised linear models.
@item eha
A package for survival and event history analysis.
@item eiPack
Ecological inference and higher-dimension data management.
@item eigenmodel
Semiparametric factor and regression models for symmetric relational
data.
@item elasticnet
Elastic net regularization and variable selection.
@item elec
Functions for statistical election audits.
@item ellipse
Package for drawing ellipses and ellipse-like confidence regions.
@item elliptic
A suite of elliptic and related functions including Weierstrass and
Jacobi forms.
@item elrm
Exact Logistic Regression via MCMC.
@item emdbook
Data sets and auxiliary functions for ``Ecological Models and Data'' by
Ben Bolker (work in progress).
@item emme2
Functions to read from and write to an EMME/2 databank.
@item empiricalBayes
A bundle for dealing with extreme multiple testing problems by
estimating local false discovery rates.  Contains packages
@strong{localFDR} and @strong{HighProbability}.
@item emplik
Empirical likelihood ratio for means/quantiles/hazards from possibly
right censored data.
@item emplik2
Empirical likelihood test (two-sample, censored data).
@item emu
Interface to the Emu speech database system.
@item endogMNP
Fitting Multinomial Probit Models with Endogenous selection.
@item energy
E-statistics (energy) tests for comparing distributions: multivariate
normality, Poisson test, multivariate @math{k}-sample test for equal
distributions, hierarchical clustering by e-distances.
@item ensembleBMA
Probabilistic forecasting using Bayesian Model Averaging of ensembles
using a mixture of normal distributions.
@item entropy
Entropy estimation.
@item epiR
Functions for analyzing epidemiological data.
@item epibasix
Elementary functions for epidemiological analysis.
@item epicalc
Epidemiological calculator.
@item epitools
Basic tools for applied epidemiology.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item epsi
@c Edge Preserving Smoothing for Images.
@c </COMMENT>
@item eqtl
Tools for analyzing eQTL experiments.
@item equivalence
Tests and graphics for assessing tests of equivalence.
@item ergm
An integrated set of tools to analyze and simulate networks based on
exponential-family random graph models (ERGM).
@item estout
Stores model estimates and format them as @LaTeX{} table.
@item etm
Empirical Transition Matrix.
@item evd
Functions for extreme value distributions.  Extends simulation,
distribution, quantile and density functions to univariate, bivariate
and (for simulation) multivariate parametric extreme value
distributions, and provides fitting functions which calculate maximum
likelihood estimates for univariate and bivariate models.
@item evdbayes
Functions for the bayesian analysis of extreme value models, using MCMC
methods.
@item evir
Extreme Values in R: Functions for extreme value theory, which may be
divided into the following groups; exploratory data analysis, block
maxima, peaks over thresholds (univariate and bivariate), point
processes, gev/gpd distributions.
@item exactLoglinTest
Monte Carlo exact tests for log-linear models.
@item exactRankTests
Computes exact @math{p}-values and quantiles using an implementation of
the Streitberg/Roehmel shift algorithm.
@item exactmaxsel
Exact methods for maximally selected statistics for binary response
variables.
@item exams
Automatic generation of simple (statistical) exams.
@item experiment
Designing and analyzing randomized experiments.
@item expert
Modeling of data using expert opinion.
@item extRemes
Extreme value toolkit.
@item ez
Easy analysis and visualization of factorial experiments.
@item fArma
The Rmetrics module for ``ARMA Time Series Modelling''.
@item fAsianOptions
The Rmetrics module for ``Option Valuation''.
@item fAssets
The Rmetrics module for ``Assets Selection and Modelling''.
@item fBasics
The Rmetrics module for ``Markets and Basic Statistics''.
@item fBonds
The Rmetrics module for ``Bonds and Interest Rate Models''.
@item fCalendar
The Rmetrics module for ``Chronological and Calendarical Objects''.
@item fCopulae
The Rmetrics module for ``Dependence Structures with Copulas''.
@item fEcofin
The Rmetrics module for ``Economic and Financial Data Sets''.
@item fExoticOptions
The Rmetrics module for ``Option Valuation''.
@item fExtremes
The Rmetrics module for ``Extreme Financial Market Data''.
@item fGarch
The Rmetrics module for ``Autoregressive Conditional Heteroskedastic
Modelling''. 
@item fImport
The Rmetrics module for ``Chronological and Calendarical Objects''.
@item fMultivar
The Rmetrics module for ``Multivariate Market Analysis''.
@item fNonlinear
The Rmetrics module for ``Nonlinear and Chaotic Time Series Modelling''.
@item fOptions
The Rmetrics module for ``Basics of Option Valuation''.
@item fPortfolio
The Rmetrics module for ``Portfolio Selection and Optimization''.
@item fRegression
The Rmetrics module for ``Regression Based Decision and Prediction''.
@item fSeries
The Rmetrics module for ``Financial Time Series Objects''.
@item fTrading
The Rmetrics module for ``Technical Trading Analysis''.
@item fUnitRoots
The Rmetrics module for ``The Dynamical Process Behind Markets''.
@item fUtilities
The Rmetrics module for ``Rmetrics Function Utilities''.
@item fame
Interface for FAME time series database.
@item far
Modelization for Functional AutoRegressive processes.
@item faraway
Functions and datasets for books by Julian Faraway.
@item fast
Implementation of the Fourier Amplitute Sensitivity Test (FAST).
@item fastICA
Implementation of FastICA algorithm to perform Independent Component
Analysis (ICA) and Projection Pursuit.
@item fbati
Gene by environment interaction tests.
@item fda
Functional Data Analysis: analysis of data where the basic observation
is a function of some sort.
@item fdim
Functions for calculating fractal dimension.
@item fdrtool
Estimation and control of (local) False Discovery Rates.
@item feature
Feature significance for multivariate kernel density estimation.
@item fechner
Fechnerian scaling of discrete object sets.
@c <COMMENT>
@c Moved to the Archive on 2009-02-20 as requested by the maintainer:
@c Henrik Andersson <JAN@dhigroup.com>.
@c @item femmeR
@c Output analysis of FEMME model results.
@c </COMMENT>
@item ff
Flat file database designed for large vectors and multi-dimensional
arrays.
@item ffmanova
Fifty-fifty MANOVA.
@item fgac
Families of Generalized Archimedean Copulas.
@item fgui
Function @acronym{GUI}.
@item fields
A collection of programs for curve and function fitting with an emphasis
on spatial data.  The major methods implemented include cubic and thin
plate splines, universal Kriging and Kriging for large data sets.  The
main feature is that any covariance function implemented in R can be
used for spatial prediction.
@item filehash
Simple file-based hash table.
@item filehashSQLite
Simple key-value database using SQLite as the backend.
@item financial
Solving financial problems in R.
@item fingerprint
Functions to operate on binary fingerprint data.
@item fishmethods
Fisheries methods and models.
@item fit4NM
Platform for NONMEM.
@item fitdistrplus
Fit parametric distributions to non-censored or censored data.
@item flashClust
Implementation of optimal hierarchical clustering.
@item flexclust
Flexible cluster algorithms.
@item flexmix
Flexible Mixture Modeling: a general framework for finite mixtures of
regression models using the EM algorithm.
@item flubase
Baseline of mortality free of influenza epidemics.
@item fmri
Functions for the analysis of fMRI experiments.
@item foba
Forward, backward, and foba sparse learning algorithms for ridge
regression.
@item forecasting
A bundle with functions and datasets for forecasting.  Contains
@strong{forecast} (time series forecasting), @strong{fma} (data sets
from the book ``Forecasting: Methods and Applications'' by Makridakis,
Wheelwright & Hyndman, 1998), and @strong{Mcomp} (data from the
M-competitions).
@item foreign
Functions for reading and writing data stored by statistical software
like Minitab, S, SAS, SPSS, Stata, Systat, etc.  @emph{Recommended}.
@item forensic
Statistical methods in forensic genetics.
@item fork
Functions for handling multiple processes: simple wrappers around the
Unix process management @acronym{API} calls.
@item fortunes
R fortunes.
@item forward
Forward search approach to robust analysis in linear and generalized
linear regression models.
@item fossil
Palaeoecological and palaeogeographical analysis tools.
@item fpc
Fixed point clusters, clusterwise regression and discriminant plots.
@item fpca
Restricted MLE for Functional Principal Components Analysis.
@item fpow
Compute the non-centrality parameter of the non-central @math{F}
distribution.
@item fracdiff
Maximum likelihood estimation of the parameters of a fractionally
differenced ARIMA(@math{p,d,q}) model (Haslett and Raftery, Applied
Statistics, 1989).
@item fractal
Insightful fractal time series modeling and analysis.
@item fractalrock
Generate fractal time series with non-normal returns distribution.
@item frailtypack
Fit a shared gamma frailty model and Cox proportional hazards model
using a Penalized Likelihood on the hazard function.
@item freqMAP
Frequency Moving Average Plots (MAP) of multinomial data by a continuous
covariate.
@item frontier
Maximum likelihood estimation of stochastic frontier production and cost
functions.
@item fso
Fuzzy set ordination.
@item ftnonpar
Features and strings for nonparametric regression.
@item fts
Fast operations for time series objects via an interface to tslib (a
C++ time series library).
@item futile
A collection of utility functions to expedite software development.
@item fuzzyFDR
Exact calculation of fuzzy decision rules for multiple testing.
@item fuzzyOP
Fuzzy numbers and the main mathematical operations on these.
@item fuzzyRankTests
Fuzzy rank tests and confidence intervals.
@item fxregime
Frankel-Wei regression and structural change tools for estimating,
testing, dating and monitoring (de facto) exchange rate regimes.
@item g.data
Create and maintain delayed-data packages (DDP's).
@item gPdtest
Bootstrap goodness-of-fit test for the generalized Pareto distribution.
@item gRain
Probability propagation in graphical independence networks.
@item gRbase
A package for graphical modelling in R.  Defines S4 classes for
graphical meta data and graphical models, and illustrates how
hierarchical log-linear models may be implemented and combined with
@strong{dynamicGraph}.
@item gRc
Inference in graphical Gaussian models with edge and vertex symmetries.
@c <COMMENT>
@c Moved to the Archive (gRcox => gRc) as requested by the maintainer.
@c @item gRcox
@c Inference in graphical gaussian models with edge and vertex
@c symmetries.
@c </COMMENT>
@item gWidgets
gWidgets @acronym{API} for building toolkit-independent, interactive
@acronym{GUI}s.
@item gWidgetsRGtk2
Toolkit implementation of @strong{gWidgets} for @strong{RGtk2}.
@item gWidgetsWWW
Toolkit implementation of gWidgets for www.
@item gWidgetsrJava
Toolkit implementation of @strong{gWidgets} for @strong{rJava}.
@item gWidgetstcltk
Toolkit implementation of @strong{gWidgets} for @strong{tcltk}.
@item gafit
Genetic algorithm for curve fitting.
@item gam
Functions for fitting and working with Generalized Additive Models, as
described in chapter 7 of the White Book, and in ``Generalized Additive
Models'' by T. Hastie and R. Tibshirani (1990).
@item gamair
Data sets used in the book ``Generalized Additive Models: An
Introduction with R'' by S. Wood (2006).
@item gamlss
Functions to fit Generalized Additive Models for Location Scale and
Shape.
@item gamlss.cens
A GAMLSS add on package for censored data.
@item gamlss.dist
Extra distributions for GAMLSS modeling.
@item gamlss.mx
A GAMLSS add on package for fitting mixture distributions.
@item gamlss.nl
A GAMLSS add on package for fitting non linear parametric models.
@item gamlss.tr
A GAMLSS add on for generating and fitting truncated (gamlss.family)
distributions.
@item gap
Genetic analysis package for both population and family data.
@c Includes @strong{pathmix} for path analysis of pairs of relatives,
@c and @strong{pointer} for complex segregation analysis.
@item gbev
Gradient Boosted regression trees with Errors-in-Variables.
@item gbm
Generalized Boosted Regression Models: implements extensions to Freund
and Schapire's AdaBoost algorithm and J. Friedman's gradient boosting
machine.  Includes regression methods for least squares, absolute loss,
logistic, Poisson, Cox proportional hazards partial likelihood, and
AdaBoost exponential loss.
@item gbs
Generalized Birnbaum-Saunders distributions.
@item gcExplorer
Graphical cluster explorer.
@item gcl
Compute a fuzzy rules or tree classifier from data.
@item gclus
Clustering Graphics.  Orders panels in scatterplot matrices and parallel
coordinate displays by some merit index.
@item gcmrec
Parameters estimation of the general semiparametric model for recurrent
event data proposed by Pe@~na and Hollander.
@item gdata
Various functions to manipulate data.
@item gee
An implementation of the Liang/Zeger generalized estimating equation
approach to GLMs for dependent data.
@item geepack
Generalized estimating equations solver for parameters in mean, scale,
and correlation structures, through mean link, scale link, and
correlation link.  Can also handle clustered categorical responses.
@item geiger
Analysis of evolutionary diversification.
@item genalg
R based genetic algorithm for binary and floating point chromosomes.
@item gene2pathway
Prediction of KEGG pathway membership for individual genes based on
InterPro domain signatures.
@item genetics
Classes and methods for handling genetic data.  Includes classes to
represent genotypes and haplotypes at single markers up to multiple
markers on multiple chromosomes, and functions for allele frequencies,
flagging homo/heterozygotes, flagging carriers of certain alleles,
computing disequlibrium, testing Hardy-Weinberg equilibrium, @dots{}
@item geoR
Functions to perform geostatistical data analysis including model-based
methods.
@item geoRglm
Functions for inference in generalised linear spatial models.
@item geomapdata
Data for topographic and geologic mapping.
@item geometry
Mesh generation and surface tesselation, based on the Qhull library.
@item geonames
Interface to @url{www.geonames.org} web service.
@item geozoo
Definition of geometric objects and display via @strong{rggobi}.
@item getopt
C-like getopt behavior for R scripts.
@item ggm
Functions for defining directed acyclic graphs and undirected graphs,
finding induced graphs and fitting Gaussian Markov models.
@c <COMMENT>
@c Moved to the Archive on 2008-10-10 as requested by the maintainer.
@c Resurrected on 2008-10-14 as meifly and DescribeDisplay depend on
@c this.
@c Moved to the Archive on 2009-06-24 (DescribeDisplay dependency
@c meanwhile gone).
@c @item ggplot
@c Grammar of graphics based plots for R.
@c </COMMENT>
@item ggplot2
An implementation of the Grammar of Graphics in R.
@item ghyp
Univariate and multivariate generalized hyperbolic distributions.
@item giRaph
Data structures and algorithms for computations on graphs.
@item gibbs.met
Naive Gibbs sampling with Metropolis steps.
@item glasso
Graphical lasso.
@item gld
Basic functions for the generalised (Tukey) lambda distribution.
@c <COMMENT>
@c Moved to the Archive on 2009-03-01 (Orphaned and license issues.)
@c @item gllm
@c Routines for log-linear models of incomplete contingency tables,
@c including some latent class models via EM and Fisher scoring
@c approaches.
@c </COMMENT>
@item glmc
Fitting Generalized Linear Models subject to Constraints.
@item glmmAK
Generalized Linear Mixed Models.
@item glmmBUGS
Generalised Linear Mixed Models with WinBUGS.
@item glmmML
A Maximum Likelihood approach to generalized linear models with random
intercept.
@item glmnet
Lasso and elastic-net regularized generalized linear models.
@item glmpath
L1 regularization path for Generalized Linear Models.
@item glmulti
GLM model selection and multimodel inference made easy.
@item glpk
Interface to the @acronym{GNU} Linear Programming Kit (GLPK).
@item gmaps
Wrapper and auxiliary functions for the @strong{maps} package to work
with the grid graphics system.
@item gmm
Generalized Method of Moments.
@item gmodels
Various functions to manipulate models.
@item gmp
Arithmetic ``without limitations'' using the @acronym{GNU} Multiple
Precision library.
@item gmt
Interface between the GMT 4.0 map-making software and R.
@item gnm
Functions to specify and fit generalized nonlinear models, including
models with multiplicative interaction terms such as the UNIDIFF model
from sociology and the AMMI model from crop science.
@item goalprog
Weighted and lexicographical goal programming and optimization.
@item gof
Model-diagnostics based on cumulative residuals.
@item gogarch
Generalized Orthogonal GARCH (GO-GARCH) models.
@item gpclib
General polygon clipping routines for R based on Alan Murta's C
library.
@item gpls
Classification using generalized partial least squares for two-group and
multi-group (more than 2 group) classification.
@item gplots
Various functions to draw plots.
@item gputools
A few GPU-enabled data mining functions.
@item grImport
Importing vector graphics.
@item grade
Binary grading functions.
@item granova
Graphical Analysis of Variance.
@item graph
Handling of graph data structures.
@item graphicsQC
Quality Control for graphics in R.
@item grasp
Generalized Regression Analysis and Spatial Predictions for R.
@item gregmisc
Miscellaneous functions written/maintained by Gregory R. Warnes.
@item gridBase
Integration of base and grid graphics.
@item grnnR
A Generalized Regression Neural Network.
@item grouped
Regression models for grouped and coarse data, under the Coarsened At
Random assumption.
@item grplasso
Fit user specified models with group lasso penalty.
@item grpreg
Regularization paths for regression models with grouped covariates.
@item gsarima
functions for Generalized SARIMA time series simulation.
@item gsl
Wrapper for special functions of the Gnu Scientific Library (GSL).
@item gss
A comprehensive package for structural multivariate function estimation
using smoothing splines.
@item gstat
multivariable geostatistical modelling, prediction and simulation.
Includes code for variogram modelling; simple, ordinary and universal
point or block (co)kriging, sequential Gaussian or indicator
(co)simulation, and map plotting functions.
@item gsubfn
Miscellaneous string utilities.
@c <COMMENT>
@c Moved to Archive on 2008-03-04 as requested by the maintainer.
@c @item gtkDevice
@c GTK graphics device driver that may be used independently of the R-GNOME
@c interface and can be used to create R devices as embedded components in
@c a @acronym{GUI} using a Gtk drawing area widget, e.g., using RGtk.
@c </COMMENT>
@item gtm
Generative topographic mapping.
@item gtools
Various functions to help manipulate data.
@item gumbel
Functions for the Gumbel-Hougaard copula.
@item gvlma
Global Validation of Linear Models Assumptions.
@item hacks
Some convenience functions.
@item hapassoc
Likelihood inference of trait associations with SNP haplotypes and other 
attributes using the EM Algorithm.
@item haplo.ccs
Estimate haplotype relative risks in case-control data.
@c <COMMENT>
@c Moved to Archive on 2005-10-05 as requested by the maintainer.
@c @item haplo.score
@c Score tests for association of traits with haplotypes when linkage phase
@c is ambiguous.
@c </COMMENT>
@item haplo.stats
Statistical analysis of haplotypes with traits and covariates when
linkage phase is ambiguous.
@item hapsim
Haplotype data simulation.
@item hash
Implements hash/associated arrays/dictionaries.
@item hbim
Hill/Bliss Independence Model for combination vaccines.
@item hddplot
Use known groups in high-dimensional data to derive scores for plots.
@item hdeco
Hierarchical DECOmposition of entropy for categorical map comparisons.
@item hdf5
Interface to the @acronym{NCSA} HDF5 library.
@item hdrcde
Highest Density Regions and Conditional Density Estimation.
@item heatmap.plus
Heatmap with sensible behavior.
@item helloJavaWorld
A demonstration how to interface to a jar file that resides inside an R
package.
@item heplots
Visualizing tests in multivariate linear models.
@item hett
Functions for the fitting and summarizing of heteroscedastic
t-regression.
@item hexView
Viewing binary files.
@item hexbin
Hexagonal binning routines.
@item hier.part
Hierarchical Partitioning: variance partition of a multivariate data
set.
@item hierfstat
Estimation of hierarchical F-statistics from haploid or diploid genetic
data with any numbers of levels in the hierarchy, and tests for the
significance of each F and variance components.
@item hints
Provide hints on what to do next.
@item hlr
Hidden logistic regression.
@item hmm.discnp
Hidden Markov models with discrete non-parametric observation
distributions.
@item hoa
A bundle of packages for higher order likelihood-based inference.
Contains @strong{cond} for approximate conditional inference for
logistic and loglinear models, @strong{csampling} for conditional
simulation in regression-scale models, @strong{marg} for approximate
marginal inference for regression-scale models, and @strong{nlreg} for
higher order inference for nonlinear heteroscedastic models.
@item homals
Homogeneity Analysis (HOMALS) package with optional Tcl/Tk interface.
@item homtest
Homogeneity tests for regional frequency analysis.
@item hopach
Hierarchical Ordered Partitioning and Collapsing Hybrid (HOPACH).
@item hot
Computation on micro-arrays.
@item howmany
A lower bound for the number of correct rejections.
@item hsmm
Hidden Semi Markov Models.
@item httpRequest
Implements HTTP Request protocols (GET, POST, and multipart POST
requests).
@item hwde
Models and tests for departure from Hardy-Weinberg equilibrium and
independence between loci.
@item hwriter
Easy-to-use and versatile functions to output R objects in @HTML{}
format.
@item hybridHclust
Hybrid hierarchical clustering via mutual clusters.
@item hydrogeo
Groundwater data presentation and interpretation.
@item hydrosanity
Graphical user interface for exploring hydrological time series.
@item hyperdirichlet
Routines for the hyperdirichlet distribution.
@item hypergeo
The hypergeometric function over the whole complex plane.
@item ibdreg
Regression methods for IBD linkage with covariates.
@item ic.infer
Inequality constrained inference in linear normal situations.
@item ic50
Evaluation of compound screens.
@item icomp
Calculates the ICOMP criterion and its variations.
@item identity
Jacquard condensed coefficients of identity.
@item ifa
Independent Factor Analysis.
@item ifs
Iterated Function Systems distribution function estimator.
@item ifultools
Insightful research tools.
@item ig
Robust and classical versions of the inverse Gaussian distribution.
@item igraph
Routines for simple graphs.
@item iid.test
Testing whether data is independent and identically distributed.
@item imprProbEst
Minimum distance estimation in an imprecise probability model.
@item impute
Imputation for microarray data (currently KNN only).
@item imputeMDR
Multifactor Dimensionality Reduction (MDR) analysis for imcomplete data.
@item ineq
Inequality, concentration and poverty measures, and Lorenz curves
(empirical and theoretic).
@item inetwork
Network analysis and plotting.
@item influence.ME
Tools for recognizing influential data in mixed models.
@item infotheo
Information-theoretic tools.
@item inline
Inline C/C++ function calls from R.
@item intcox
Implementation of the Iterated Convex Minorant Algorithm for the Cox
proportional hazard model for interval censored event data.
@item integrOmics
Integrate Omics data project.
@c  @item integrate
@c  Adaptive quadrature in up to 20 dimensions.
@item intervals
Tools for working with points and intervals.
@item introgress
Analysis of introgression of genotypes between divergent, hybridizing
lineages.
@item iplots
Interactive graphics for R.
@item ipptoolbox
Uncertainty quantification and propagation in the framework of
Dempster-Shafer theory and imprecise probabilities.
@item ipred
Improved predictive models by direct and indirect bootstrap aggregation
in classification and regression as well as resampling based estimators
of prediction error.
@item irr
Coefficients of Interrater Reliability and Agreement for quantitative,
ordinal and nominal data.
@item irtProb
Utilities and probability distributions related to multidimensional
person Item Response Models (IRT).
@item irtoys
Simple interface to the estimation and plotting of IRT models.
@item isa2
The Iterative Signature Algorithm for finding modules in an input
matrix.
@item ismev
Functions to support the computations carried out in ``An Introduction
to Statistical Modeling of Extreme Values;' by S. Coles, 2001, Springer.
The functions may be divided into the following groups; maxima/minima,
order statistics, peaks over thresholds and point processes.
@item isotone
Active set and generalized PAVA for isotone optimization.
@item its
An S4 class for handling irregular time series.
@item ivivc
In vitro in vivo correlation (IVIVC) modeling.
@item jit
Just-in-time compiler.
@item jointDiag
Joint approximate diagonalization of a set of square matrices.
@item kappalab
The ``laboratory for capacities'', an S4 tool box for capacity (or
non-additive measure, fuzzy measure) and integral manipulation on a
finite setting.
@item kerfdr
Semi-parametric kernel-based approach to local fdr estimations.
@item kernelPop
Spatially explicit population genetic simulations.
@item kernlab
Kernel-based machine learning methods including support vector machines.
@item kin.cohort
Analysis of kin-cohort studies.
@item kinship
Mixed-effects Cox models, sparse matrices, and modeling data from large
pedigrees.
@item kknn
Weighted @math{k}-nearest neighbors classification and regression.
@item klaR
Miscellaneous functions for classification and visualization developed
at the Department of Statistics, University of Dortmund.
@item klin
Linear equations with Kronecker structure.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item km.ci
@c Confidence intervals for the Kaplan-Meier estimator.
@c </COMMENT>
@item kmi
Kaplan-Meier multiple imputation for the analysis of cumulative
incidence functions in the competing risks setting.
@item kml
@math{K}-Means for Longitudinal data.
@c <COMMENT>
@c Moved to the Archive on 2009-02-23 (Orphaned).
@c @item knnFinder
@c Fast nearest neighbor search.
@c </COMMENT>
@item knnTree
Construct or predict with @math{k}-nearest-neighbor classifiers, using
cross-validation to select @math{k}, choose variables (by forward or
backwards selection), and choose scaling (from among no scaling, scaling
each column by its SD, or scaling each column by its MAD).  The finished
classifier will consist of a classification tree with one such
@math{k}-nn classifier in each leaf.
@item knncat
Nearest-neighbor classification with categorical variables.
@item knnflex
A more flexible @math{k}-NN.
@item knorm
Microarray data from multiple biologically interrelated experiments.
@item kohonen
Supervised and unsupervised self-organising maps.
@item ks
Kernel smoothing: bandwidth matrices for kernel density estimators and
kernel discriminant analysis for bivariate data.
@item kst
Knowledge Space Theory: a set-theoretical framework which proposes
mathematical formalisms to operationalize knowledge structures in a
particular domain.
@item kza
Kolmogorov-Zurbenko Adpative filter for locating change points in a time
series.
@item kzft
Kolmogorov-Zurbenko Fourier Transform and application.
@item kzs
Kolmogorov-Zurbenko Spline.
@item labdsv
Laboratory for Dynamic Synthetic Vegephenomenology.
@item labeltodendro
Convert labels or tables to a dendrogram.
@item labstatR
Functions for the book ``Laboratorio di statistica con R'' by
S. M. Iacus and G. Masarotto, 2002, McGraw-Hill.  Function names and
documentation in Italian.
@item laercio
Tests to compare means.
@item lago
LAGO for rare target detection.
@item lancet.iraqmortality
Surveys of Iraq mortality published in The Lancet.
@item languageR
Data sets and functions for the book ``Analyzing Linguistic Data: A
practical introduction to statistics'' by R. H. Baayen, 2007, Cambridge:
Cambridge University Press.
@item lars
Least Angle Regression, Lasso and Forward Stagewise: efficient
procedures for fitting an entire lasso sequence with the cost of a
single least squares fit.
@item laser
Likelihood Analysis of Speciation/Extinction Rates from phylogenies.
@item lasso2
Routines and documentation for solving regression problems while
imposing an L1 constraint on the estimates, based on the algorithm of
Osborne et al.@: (1998).
@item latentnet
Latent position and cluster models for statistical networks.
@item latentnetHRT
Latent position and cluster models for statistical networks,
implementing the original specification by Handcock, Raftery and Tantrum.
@item lattice
Lattice graphics, an implementation of Trellis Graphics functions.
@emph{Recommended}.
@item latticeExtra
Generic functions and standard methods for Trellis-based displays.
@item latticist
A Lattice-based tool for exploratory visualization.
@item lawstat
Statistical tests widely utilized in biostatistics, public policy and
law.
@item lazy
Lazy learning for local regression.
@item ldDesign
Design of experiments for detection of linkage disequilibrium.
@item lcd
Learn Chain graphs via Decomposition.
@item lcda
Latent Class Discriminant Analysis.
@item lda.cv
Cross-validation for linear discriminant analysis.
@item ldbounds
Lan-DeMets method for group sequential boundaries.
@item leaps
A package which performs an exhaustive search for the best subsets of a
given set of potential regressors, using a branch-and-bound algorithm,
and also performs searches using a number of less time-consuming
techniques.
@item lga
Tools for Linear Grouping Analysis (LGA).
@item lgtdl
A set of methods for longitudinal data objects.
@item lhs
Latin Hypercube Samples.
@item limSolve
Solving linear inverse models.
@c <COMMENT>
@c Moved to Archive on 2007-10-03 as requested by the maintainer.
@c @item limma
@c LInear Models for MicroArray data.
@c </COMMENT>
@item linprog
Solve linear programming/linear optimization problems by using the
simplex algorithm.
@item ljr
Logistic Joinpoint Regression.
@item lme4
Fit linear and generalized linear mixed-effects models.
@item lmec
Linear mixed-effects models with censored responses.
@item lmeSplines
Fit smoothing spline terms in Gaussian linear and nonlinear
mixed-effects models.
@item lmm
Linear mixed models.
@item lmodel2
Model II simple linear regression.
@item lmom
@math{L}-moments.
@item lmomRFA
Regional Frequency Analysis using @math{L}-moments.
@item lmomco
@math{L}-moments and @math{L}-comoments.
@item lmtest
A collection of tests on the assumptions of linear regression models
from the book ``The linear regression model under test'' by W. Kraemer
and H. Sonnberger, 1986, Physica.
@item lnMLE
Marginally specified logistic normal models for longitudinal binary
data.
@item localdepth
Simplicial, Mahalanobis and ellipsoid local and global depth.
@item locfdr
Computation of local false discovery rates.
@item locfit
Local Regression, likelihood and density estimation.
@item locpol
Kernel local polynomial regression.
@item lodplot
Assorted plots of location score versus genetic map position.
@item logcondens
Estimate a log-concave probability density from i.i.d.@: observations.
@item logilasso
Analysis of sparse contingency tables with penalization approaches.
@item logistf
Firth's bias reduced logistic regression approach with penalized profile
likelihood based confidence intervals for parameter estimates.
@item loglognorm
Double log normal distribution functions.
@item logregperm
Inference in Logistic Regression using permutation tests.
@item logspline
Logspline density estimation.
@item lokern
Kernel regression smoothing with adaptive local or global plug-in
bandwidth selection.
@item longRPart
Recursive partitioning of longitudinal data using mixed-effects models.
@item longitudinal
Analysis of multiple time course data.
@item longitudinalData
Tools for longitudinal data.
@item longmemo
Datasets and Functionality from the textbook ``Statistics for
Long-Memory Processes'' by J. Beran, 1994, Chapman & Hall.
@item lpSolve
Functions that solve general linear/integer problems, assignment
problems, and transportation problems via interfacing Lp_solve.
@item lpSolveAPI
An R interface to the lp_solve library @acronym{API}.
@item lpc
Lassoed principal components for testing significance of features.
@item lpridge
Local polynomial (ridge) regression.
@item lsa
Latent Semantic Analysis.
@item lspls
LS-PLS (least squares --- partial least squares) models.
@item lss
Accelerated failure time model to right censored data based on
least-squares principle.
@item ltm
Analysis of multivariate Bernoulli data using latent trait models
(including the Rasch model) under the Item Response Theory approach.
@item ltsa
Linear Time Series Analysis.
@item luca
Likelihood Under Covariate Assumptions (LUCA).
@item lvplot
Letter-value box plots.
@item mAr
Estimation of multivariate AR models through a computationally efficient
stepwise least-squares algorithm.
@item mFilter
Miscellenous time series filters.
@item maanova
Analysis of @math{N}-dye Micro Array experiments using mixed model
effect.  Contains anlysis of variance, permutation and bootstrap,
cluster and consensus tree.
@item magic
A variety of methods for creating magic squares of any order greater
than 2, and various magic hypercubes.
@item mapLD
Linkage Disequilibrium mapping.
@item mapReduce
Flexible mapReduce algorithm for parallel computation.
@item mapdata
Supplement to package @strong{maps}, providing the larger and/or
higher-resolution databases.
@item mapproj
Map Projections: converts latitude/longitude into projected coordinates.
@item maps
Draw geographical maps.  Projection code and larger maps are in separate
packages.
@item maptools
Set of tools for manipulating and reading geographic data, in particular
ESRI shapefiles.
@item maptree
Functions with example data for graphing and mapping models from
hierarchical clustering and classification and regression trees.
@item mar1s
Multiplicative AR(1) with seasonal processes.
@item marelac
Datasets, constants, conversion factors, utilities for the marine and
lacustrine sciences.
@item marginTree
Margin trees for high-dimensional classification.
@item marginalmodelplots
Marginal model plots for linear and generalized linear models.
@item markerSearchPower
Power calculation for marker detection strategies in genome-wide
association studies.
@item mathgraph
Tools for constructing and manipulating objects from a class of directed
and undirected graphs.
@item matlab
Emulate MATLAB code using R.
@item matrixStats
Methods that apply to rows and columns of a matrix.
@item matrixcalc
Collection of functions for matrix differential calculus.
@item maxLik
Tools for Maximum Likelihood Estimation.
@item maxstat
Maximally selected rank and Gauss statistics with several p-value
approximations.
@item mblm
Median-based Linear models, using Theil-Sen single or Siegel repeated
medians.
@item mboost
Gradient boosting for fitting generalized linear, additive and
interaction models.
@item mc2d
Tools for two-dimensional Monte-Carlo simulations.
@item mcclust
Process an MCMC sample of clusterings.
@item mcgibbsit
Warnes and Raftery's MCGibbsit MCMC diagnostic.
@item mclust
Model-based clustering and normal mixture modeling including Bayesian
regularization.
@c <COMMENT>
@c Moved to Archive on 2004-02-19 as requested by the maintainer.
@c @item mclust1998
@c Model-based cluster analysis: the 1998 version of MCLUST.
@c </COMMENT>
@item mclust02
Model-based cluster analysis: the 2002 version of MCLUST.
@item mcmc
Functions for Markov Chain Monte Carlo (MCMC).
@item mco
Multi criteria optimization algorithms.
@item mcsm
Functions for Monte Carlo methods.
@item mda
Code for mixture discriminant analysis (MDA), flexible discriminant
analysis (FDA), penalized discriminant analysis (PDA), multivariate
additive regression splines (MARS), adaptive back-fitting splines
(BRUTO), and penalized regression.
@c <COMMENT>
@c Moved to the Archive on 2005-10-05 (Orphaned/2.2.0).
@c @item meanscore
@c Mean Score method for missing covariate data in logistic regression
@c models.
@c </COMMENT>
@item meboot
Maximum entropy bootstrap for time series.
@item medAdherence
Medication Adherence: commonly used definitions.
@item mediation
Causal mediation analysis.
@item mefa
Faunistic count data handling and reporting.
@item meifly
Interactive model exploration using GGobi.
@item memisc
Miscellaneous Tools for data management, simulation, and presentation of
estimates.
@item merror
Accuracy and precision of measurements.
@item meta
Fixed and random effects meta-analysis, with functions for tests of
bias, forest and funnel plot.
@item metaMA
Meta-analysis for MicroArrays.
@item metacor
Meta-analysis of correlation coefficients.
@item metafor
Meta-analysis.
@item mfp
Multiple Fractional Polynomials.
@item mgcv
Routines for GAMs and other genralized ridge regression problems with
multiple smoothing parameter selection by GCV or UBRE.
@emph{Recommended}.
@item mhsmm
Parameter estimation and prediction for multiple hidden Markov and
semi-Markov models.
@item mi
Missing-data imputation and model checking.
@c <COMMENT>
@c Removed on 2006-10-11 as requested by the maintainer.
@c @item micEcdat
@c Data sets for micro-econometrics.
@c </COMMENT>
@item micEcon
Tools for microeconomic analysis and microeconomic modelling.
@item mice
Multivariate Imputation by Chained Equations.
@item mimR
An R interface to MIM for graphical modeling in R.
@item minet
Mutual Information NETwork.
@item minpack.lm
R interface for two functions from the MINPACK least squares
optimization library, solving the nonlinear least squares problem by a
modification of the Levenberg-Marquardt algorithm.
@item minxent
Entropy optimization distribution under constraints.
@item misc3d
A collection of miscellaneous 3d plots, including rgl-based isosurfaces.
@item mirf
Multiple Imputation and Random Forests for unobservable phase,
high-dimensional data.
@item mitools
Tools to perform analyses and combine results from multiple-imputation
datasets.
@item mix
Estimation/multiple imputation programs for mixed categorical and
continuous data.
@item mixAK
Mixture of methods including mixtures.
@item mixPHM
Mixtures of proportional hazard models.
@item mixRasch
Estimation of mixture Rasch models.
@item mixdist
Finite mixture distribution models.
@item mixer
Random graph clustering via estimation of Erd@H{o}s-R@'enyi mixtures.
@item mixlow
Assessing drug synergism/antagonism.
@c <COMMENT>
@c Moved to the Archive on 2008-10-15 as suggested by the maintainer:
@c replaced by package 'mixer'.
@c @item mixnet
@c Random graph clustering via estimation of Erd@H{o}s-R@'enyi mixtures.
@c </COMMENT>
@item mixreg
Functions to fit mixtures of regressions.
@item mixstock
Mixed stock analysis functions.
@item mixtools
Tools for mixture models.
@item mlCopulaSelection
Copula selection and fitting using maximum likelihood.
@item mlbench
A collection of artificial and real-world machine learning benchmark
problems, including the Boston housing data.
@item mlegp
Maximum Likelihood Estimates of Gaussian Processes.
@c <COMMENT>
@c Moved to the Archive on 2009-04-26 (Orphaned/QC).
@c @item mlica
@c Independent Component Analysis using Maximum Likelihood.
@c </COMMENT>
@item mlmRev
Examples from Multilevel Modelling Software Review.
@c <COMMENT>
@c Moved to the Archive on 2009-03-01 (Orphaned and license issues.)
@c @item mlmmm
@c Maximum likelihood estimation under multivariate linear mixed models
@c with missing values.
@c </COMMENT>
@item mlogit
Estimation of the multinomial logit model with choice specific
variables.
@item mmcm
Modified Maximum Contrast Method.
@item mmlcr
Mixed-mode latent class regression (also known as mixed-mode mixture
model regression or mixed-mode mixture regression models) which can
handle both longitudinal and one-time responses.
@item mnormt
The multivariate normal and @math{t} distributions.
@item moc
Fits a variety of mixtures models for multivariate observations with
user-difined distributions and curves.
@item modeest
Mode estimation and Chernoff distribution.
@item modehunt
Multiscale analysis for density functions.
@item modeltools
A collection of tools to deal with statistical models.
@item moduleColor
Methods for color labeling, calculation of eigengenes, and merging of
closely related modules.
@item mokken
Mokken Scale Analysis for test and questionnaire data.
@item mombf
Moment and inverse moment Bayes factors.
@item moments
Moments, skewness, kurtosis and related tests.
@item monomvn
Estimation for multivariate normal data with monotone missingness.
@item monreg
Estimation of monotone regression and variance functions in
nonparametric models.
@item monoProc
Strictly monotone smoothing procedure.
@item moonsun
Basic astronomical calculations.
@c <COMMENT>
@c Moved to the Archive on 2009-04-26 (Orphaned/QC).
@c @item mota
@c Mean Optimal Transformation Approach.
@c </COMMENT>
@item mpm
Spectral map analysis.
@item mprobit
Multivariate probit model for binary/ordinal response.
@item mra
Analysis of capture-recapture data.
@item mratios
Inferences for ratios of coefficients in the general linear model.
@item mrdrc
Model-robust concentration-response analysis.
@item mrt
Data sets and functions for the book ``Modern Regression Techniques
Using R'' by D. B. Wright and K. London, 2009, Sage Publications.
@item msBreast
Protein mass spectra dataset from a breast cancer study.
@item msDilution
Protein mass spectra dataset from a dilution experiment.
@item msProcess
Tools for protein mass spectra processing including data preparation,
denoising, noise estimation, baseline correction, intensity
normalization, peak detection, peak alignment, peak quantification, and
various functionalities for data ingestion/conversion, mass calibration,
data quality assessment, and protein mass spectra simulation.
@item msProstate
Protein mass spectra dataset from a prostate cancer study.
@c <COMMENT>
@c Moved to the Archive on 2005-07-27 as requested by Witold Eryk Wolski
@c <W.E.Wolski@ncl.ac.uk> (package now in BioC).
@c @item mscalib
@c Calibration and filtering of MALDI-TOF Peptide Mass Fingerprint data.
@c </COMMENT>
@item msm
Functions for fitting continuous-time Markov multi-state models to
categorical processes observed at arbitrary times, optionally with
misclassified responses, and covariates on transition or
misclassification rates.
@item muS2RC
S-plus to R Compatibility for package @strong{muStat}.
@item muStat
Prentice rank sum test and McNemar test.
@item muUtil
Utility functions for package @strong{muStat}.
@item muhaz
Hazard function estimation in survival analysis.
@item multcomp
Multiple comparison procedures for the one-way layout.
@item multcompView
Visualizations of paired comparisons.
@c <COMMENT>
@c Removed from CRAN on 2004-10-20 due to possible legal problems.
@c @item multidim
@c Multidimensional descriptive statistics: factorial methods and
@c classification.
@c </COMMENT>
@item multic
Quantitative linkage analysis tools using the variance components
approach.
@item multicore
Parallel processing of R code on machines with multiple cores or CPUs.
@item multilevel
Analysis of multilevel data by organizational and social psychologists.
@item multinomRob
Overdispersed multinomial regression using robust (LQD and tanh)
estimation.
@item multipol
Utilities to manipulate multivariate polynomials.
@c <COMMENT>
@c Moved to the Archive on 2004-09-30.
@c @item multiv
@c Functions for hierarchical clustering, partitioning, bond energy
@c algorithm, Sammon mapping, PCA and correspondence analysis.
@c </COMMENT>
@item multmod
Testing of multiple outcomes.
@item multtest
Resampling-based multiple hypothesis testing.
@item muscor
Multi-stage Convex Relaxation.
@item mvShapiroTest
Generalized Shapiro-Wilk test for multivariate normality.
@item mvbutils
Utilities by Mark V. Bravington for project organization, editing and
backup, sourcing, documentation (formal and informal), package
preparation, macro functions, and more.
@item mvgraph
Multivariate interactive visualization.
@item mvna
Nelson-Aalen estimator of the cumulative hazard in multistate models.
@item mvnmle
ML estimation for multivariate normal data with missing values.
@item mvnormtest
Generalization of the Shapiro-Wilk test for multivariate variables.
@item mvoutlier
Multivariate outlier detection based on robust estimates of location and
covariance structure.
@item mvpart
Multivariate partitioning.
@item mvtBinaryEP
Generate correlated binary data based on the method of Emrich and
Piedmonte.
@item mvtnorm
Multivariate normal and @math{t} distributions.
@item mvtnormpcs
Multivariate Normal and @math{T} Distribution functions of Dunnett
(1989).
@item nFDR
Nonparametric Estimate of FDR Based on Bernstein polynomials.
@item nFactors
Non-graphical solution to the Cattell Scree Test.
@item ncdf
Interface to Unidata netCDF data files.
@item ncf
Spatial nonparametric covariance functions.
@item ncomplete
Functions to perform the regression depth method (RDM) to binary
regression to approximate the minimum number of observations that can be
removed such that the reduced data set has complete separation.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item ncvar
@c High-level R interface to netCDF datasets.
@c </COMMENT>
@item negenes
Estimating the number of essential genes in a genome on the basis of
data from a random transposon mutagenesis experiment, through the use of
a Gibbs sampler.
@c <COMMENT>
@c Moved to the Archive as suggested by the maintainer: we now have
@c ncdf, and other CRAN packages no longer use netCDF.
@c @item netCDF
@c Read data from netCDF files.
@c </COMMENT>
@item netmodels
Tools for the study of scale free and small world networks.
@item network
Tools to create and modify network objects, which can represent a range
of relational data types.
@item networksis
Simulate bipartite graphs with fixed marginals through sequential
importance sampling.
@item neural
RBF and MLP neural networks with graphical user interface.
@item neuralnet
Training of neural networks.
@c <COMMENT>
@c Renamed to allelic on 2006-05-24 as requested by the maintainer.
@c @item newallelic
@c A fast, unbiased and exact allelic exact test.
@c </COMMENT>
@item nice
Get or set UNIX priority (niceness) of running R process.
@item nleqslv
Solve systems of non-linear equations.
@item nlme
Fit and compare Gaussian linear and nonlinear mixed-effects models.
@emph{Recommended}.
@item nlmeODE
Combine the @strong{nlme} and @strong{odesolve} packages for
mixed-effects modelling using differential equations.
@c <COMMENT>
@c Moved to the Archive on 2006-04-09 as requested by R Koenker.
@c @item nlrq
@c Nonlinear quantile regression routines.  @emph{Defunct}.
@c </COMMENT>
@item nlrwr
Non-linear regression with R.
@item nls2
Non-linear regression with brute force.
@item nlstools
Tools for nonlinear regression diagnostics.
@item nlt
A nondecimated lifting transform for signal denoising.
@item nlts
(Non)linear time series analysis.
@item nltm
NonLinear Transformation Models for survival analysis.
@item nnet
Software for single hidden layer perceptrons (``feed-forward neural
networks''), and for multinomial log-linear models.  Contained in the
@file{VR} bundle.  @emph{Recommended}.
@item nnls
The Lawson-Hanson NNLS algorithm for non-negative least squares.
@item noia
Implementation of the Natural and Orthogonal InterAction (NOIA) model.
@item nonbinROC
ROC-type analysis for non-binary gold standards.
@item nor1mix
One-dimensional normal mixture models classes, for, e.g., density
estimation or clustering algorithms research and teaching; providing the
widely used Marron-Wand densities.
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item norm
@c Analysis of multivariate normal datasets with missing values.
@c </COMMENT>
@item normwm.test
Normality and white noise testing.
@item normalp
A collection of utilities for normal of order @math{p} distributions
(General Error Distributions).
@item nortest
Five omnibus tests for the composite hypothesis of normality.
@item noverlap
Functions to perform the regression depth method (RDM) to binary
regression to approximate the amount of overlap, i.e., the minimal
number of observations that need to be removed such that the reduced
data set has no longer overlap.
@item np
Nonparametric kernel smoothing methods for mixed datatypes.
@item nparcomp
Nonparametric relative contrast effects.
@item npde
Normalized prediction distribution errors for nonlinear mixed-effect
models.
@item nplplot
Plotting non-parametric LOD scores from multiple input files.
@item npmc
Nonparametric Multiple Comparisons:  provides simultaneous rank test
procedures for the one-way layout without presuming a certain
distribution.
@c <COMMENT>
@c Moved to the Archive on 2006-04-09 as requested by R Koenker.
@c @item nprq
@c Nonparametric quantile regression.  @emph{Defunct}.
@c </COMMENT>
@item nsRFA
Non-supervised Regional Frequency Analysis.
@item numDeriv
Accurate numerical derivatives.
@item nws
Functions for NetWorkSpaces and Sleigh.
@item obliqueTree
Oblique trees for classification data.
@item obsSens
Sensitivity analysis for observational studies.
@item oc
Optimal Classification roll call analysis.
@item oce
Analysis of oceanographic data.
@item odesolve
An interface for the Ordinary Differential Equation (ODE) solver lsoda.
ODEs are expressed as R functions.
@item odfWeave
Sweave processing of Open Document Format (ODF) files.
@item odfWeave.survey
Support for @strong{odfWeave} on the @strong{survey} package.
@item ofw
Optimal Feature Weighting algorithm.
@item onemap
Analysis of molecular marker data from non-model systems to
simultaneously estimate linkage and linkage phases (genetic map
construction).
@item onion
A collection of routines to manipulate and visualize quaternions and
octonions.
@item openNLP
An interface to @url{http://opennlp.sourceforge.net/, openNLP}, a
collection of natural language processing tools including a sentence
detector, tokenizer, pos-tagger, shallow and full syntactic parser, and
named-entity detector, using the @url{http://maxent.sourceforge.net/,
Maxent} Java package for training and using maximum entropy models.
@item openNLPmodels
English and spanish models for @strong{openNLP}.
@item opentick
Interface to opentick real time and historical market data.
@item operators
Additional binary operators for R.
@item optBiomarker
Estimates optimal number of biomarkers for two-group classification
based on microarray data.
@item optmatch
Functions to perform optimal matching, particularly full matching.
@item orientlib
Representations, conversions and display of orientation SO(3) data.
@item orloca
Operations Research LOCational Analysis models.
@item orloca.es
Spanish version of @strong{orloca} package.
@item orth
Multivariate logistic regressions using orthogonalized residuals.
@item orthogonalsplinebasis
Orthogonal @math{B}-spline basis functions.
@item orthopolynom
Functions for orthogonal and orthonormal polynomials.
@item ouch
Ornstein-Uhlenbeck models for phylogenetic comparative hypotheses.
@item outliers
A collection of some tests commonly used for identifying outliers.
@item oz
Functions for plotting Australia's coastline and state boundaries.
@item pARccs
Estimation of partial attributable risks from case-control data.
@c <COMMENT>
@c Moved to the Archive on 2009-02-23 (Orphaned).
@c @item pARtial
@c (Partial) attributable risk estimates, corresponding variance estimates
@c and confidence intervals.
@c </COMMENT>
@item pack
Create and manipulate raw vectors.
@item packS4
Toy example of S4 package illustrating the book ``Petit Manuel de
Programmation Orientee Objet sous R''.
@item packClassic
Illustrate the tutorial ``S4: From Idea To Package''.
@item pairwiseCI
Calculate and plot unadjusted confidence intervals for two sample
comparisons.
@item paleoTS
Modeling evolution in paleontological time-series.
@c <COMMENT>
@c Moved to the Archive on 2008-05-25 as requested by the maintainer.
@c (Functionality now integrated in paleoTS.)
@c @item paleoTSalt
@c Modeling evolution in paleontological time-series (alternate
@c paramaterization).
@c </COMMENT>
@item paltran
Functions for paleolimnology.
@item pamm
Power analysis for random effects in mixed models.
@item pamr
Pam: Prediction Analysis for Microarrays.
@item pan
Multiple imputation for multivariate panel or clustered data.
@item panel
Functions and datasets for fitting models to Panel data.
@item papply
Parallel apply function using MPI.
@item paran
Horn's test of principal components/factors.
@item parcor
Regularized estimation of partial correlation matrices.
@item partDSA
Partitioning using Deletion, Substitution, and Addition moves.
@item partitions
Additive partitions of integers.
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item partsm
@c Periodic AutoRegressive Time Series Models.
@c </COMMENT>
@item party
Unbiased recursive partitioning in a conditional inference framework.
@item pastecs
Package for Analysis of Space-Time Ecological Series.
@item pbatR
Frontend to PBAT to run within R.
@item pcaPP
Robust PCA by Projection Pursuit.
@item pcalg
Standard and robust estimation of the skeleton (ugraph) of a Directed
Acyclic Graph (DAG) via the PC algorithm.
@item pcse
Panel-Corrected Standard Error estimation.
@item pcurve
Fits a principal curve to a numeric multivariate dataset in arbitrary
dimensions.  Produces diagnostic plots.  Also calculates Bray-Curtis and
other distance matrices and performs multi-dimensional scaling and
principal component analyses.
@item pear
Periodic Autoregression Analysis.
@item pec
Prediction Error Curves for survival models.
@item pedigree
Pedigree functions.
@item pedigreemm
Pedigree-based mixed-effects models.
@item pegas
Population and Evolutionary Genetics Analysis System.
@item penalized
Penalized estimation in generalized linear models.
@item penalizedSVM
Feature selection SVM using penalty functions.
@item peperr
Parallelised Estimation of Prediction ERRor.
@item permax
Functions intended to facilitate certain basic analyses of DNA array
data, especially with regard to comparing expression levels between two
types of tissue.
@item permtest
Permutation test to compare variability within and distance between two
groups.
@item perturb
Perturbation analysis for evaluating collinearity.
@item pga
An ensemble method for variable selection by carrying out Darwinian
evolution in parallel universes.
@item pgam
Poisson-Gamma Additive Models.
@item pgirmess
Functions for analysis and display of ecological and spatial data.
@item phangorn
Phylogenetic analysis in R.
@item pheno
Some easy-to-use functions for time series analyses of (plant-)
phenological data sets.
@item phmm
Proportional Hazards with Mixed Model.
@item phpSerialize
Serialize R to PHP associative array.
@c <COMMENT>
@c Moved to the Archive on 2005-10-05 (Orphaned/2.2.0).
@c @item phyloarray
@c Software to process data from phylogenetic or identification
@c microarrays.
@c </COMMENT>
@item picante
Tools for integrating phylogenies and ecology.
@item pinktoe
Converts S trees to @HTML{}/Perl files for interactive tree traversal.
@item pixmap
Functions for import, export, plotting and other manipulations of
bitmapped images.
@item plRasch
Log linear by linear asscociation models.
@item plan
Tools for project planning.
@item playwith
A @acronym{GUI} for interactive plots using GTK+.
@item plink
Separate calibration linking methods.
@item plm
Linear models for panel data.
@c <COMMENT>
@c Moved to the Archive on 2008-06-19 as requested by the maintainer.
@c @item plotAndPlayGTK
@c A @acronym{GUI} for interactive plots using GTK.
@c </COMMENT>
@item plotSEMM
Graphing nonlinear latent variable interactions in SEMM.
@item plotpc
Plot principal component histograms around a scatter plot.
@item plotrix
Various useful functions for enhancing plots.
@item plugdensity
Kernel density estimation with global bandwidth selection via
``plug-in''.
@item pls
Partial Least Squares Regression (PLSR) and Principal Component
Regression (PCR).
@c <COMMENT>
@c Moved to the Archive on 2006-05-09 as requested by the maintainer.
@c @item pls.pcr
@c Multivariate regression by PLS and PCR.
@c </COMMENT>
@item plsgenomics
PLS analyses for genomics.
@item plspm
Partial Least Squares Path Modeling.
@item plus
Penalized Linear Unbiased Selection.
@item plyr
Tools for splitting, applying and combining data.
@item pmg
Poor Man's @acronym{GUI}.
@item pmml
Generate Predictive Modelling Markup Language (PMML) for various
models.
@item poLCA
POlytomous variable Latent Class Analysis.
@item poilog
Poisson lognormal and bivariate Poisson lognormal distribution.
@item polspline
Routines for the polynomial spline fitting routines hazard regression,
hazard estimation with flexible tails, logspline, lspec, polyclass, and
polymars, by C. Kooperberg and co-authors.
@item polyapost
Simulating from the Polya posterior.
@item polycor
Polychoric and polyserial correlations.
@item polydect
One-dimension jump position detection using one-sided polynomial
kernels.
@c <COMMENT>
@c Outdated on CRAN along with 1.5.0 release as we do not have an active
@c maintainer to fix outstanding quality problems.
@c @item polymars
@c Polychotomous regression based on Multivariate Adaptive Regression
@c Splines.
@c </COMMENT>
@item polynom
A collection of functions to implement a class for univariate polynomial
manipulations.
@item pomp
Partially-observed Markov processes.
@item popbio
Construction and analysis of matrix population models.
@item popgen
Statistical and POPulation GENetics.
@item poplab
Population Lab, a tool for constructing a virtual electronic population
evolving over time.
@item portfolio
Classes for analyzing and implementing portfolios.
@item portfolioSim
Framework for simulating equity portfolio strategies.
@item powell
Optimizes a function using Powell's UObyQA algorithm.
@item powerGWASinteraction
Power calculations for interactions for GWAS.
@item powerSurvEpi
Power and sample size calculation for survival analysis of
epidemiological studies.
@item powerpkg
Power analyses for the affected sib pair and the TDT design.
@item ppc
Sample classification of protein mass spectra by peak probabilty
contrasts.
@item ppls
Penalized Partial Least Squares.
@item pps
Functions to select samples using PPS (probability proportional to size)
sampling, for stratified simple random sampling, and to compute joint
inclusion probabilities for Sampford's method of PPS sampling.
@item prabclus
Distance based parametric bootstrap tests for clustering, mainly thought
for presence-absence data (clustering of species distribution maps).
Jaccard and Kulczynski distance measures, clustering of MDS scores, and
nearest neighbor based noise detection.
@item predbayescor
Classification rule based on Bayesian naive Bayes models with feature
selection bias corrected.
@item predmixcor
Classification rule based on Bayesian mixture models with feature
selection bias corrected.
@item prefmod
Utilities to fit paired comparison models for preferences.
@item prettyR
Pretty descriptive stats.
@item prim
Patient Rule Induction Method (PRIM).
@item primer
Functions and data for the book ``A Primer of Ecology with R'' by
M. H. H. Stevens, 2009, Springer.
@item princurve
Fits a principal curve to a matrix of points in arbitrary dimension.
@item prob
Elementary probability on finite sample spaces.
@item prodlim
Product limit estimation.
@item profileModel
Tools for profiling inference functions for various model classes.
@item profr
Alternative display for profiling information.
@item proftools
Profile output processing tools for R.
@item proj4
A simple interface to the PROJ.4 cartographic projections library.
@item proptest
Tests of the proportional hazards assumption in the Cox model.
@item proto
An object oriented system using prototype or object-based (rather than
class-based) object oriented ideas.
@item proxy
Distance and similarity measures.
@item pscl
R in the Political Science Computational Laboratory, Stanford
University.
@item pseudo
Pseudo-observations.
@item pspearman
Spearman's rank correlation test.
@item pspline
Smoothing splines with penalties on order @math{m} derivatives.
@item psy
Various procedures used in psychometry: Kappa, ICC, Cronbach alpha,
screeplot, PCA and related methods.
@item psych
Procedures for personality and psychological research.
@item psychometric
Applied psychometric theory: functions useful for correlation theory,
meta-analysis (validity-generalization), reliability, item analysis,
inter-rater reliability, and classical utility.
@item psyphy
Functions for analyzing psychophysical data in R.
@item pwr
Basic functions for power analysis.
@item pwt
The Penn World Table providing purchasing power parity and national
income accounts converted to international prices for 168 countries for
some or all of the years 1950--2000.
@item pvclust
Hierarchical clustering with @math{p}-value.
@item qAnalyst
Variables and attributes control charts.
@item qcc
Quality Control Charts.  Shewhart quality control charts for continuous,
attribute and count data.  Cusum and EWMA charts.  Operating
characteristic curves.  Process capability analysis.  Pareto chart and
cause-and-effect chart.
@item qdg
Infer QTL-directed Dependency Graphs for phenotype networks.
@item qgen
Quantitative Genetics using R.
@item qlspack
Quasi least squares package.
@item qp
@math{q}-order partial correlation graph search algorithm.
@item qpcR
Modelling and analysis of real-time PCR data.
@item qtl
Analysis of experimental crosses to identify QTLs.
@item qtlDesign
Tools for the design of QTL experiments.
@item qtlbim
QTL Bayesian Interval Mapping.
@item qtlbook
Datasets for the book ``A guide to QTL Mapping with R/qtl'' by by Karl
W. Broman and Saunak Sen, 2009, Springer.
@item quadprog
For solving quadratic programming problems.
@item qualV
Qualitative methods for the validation of models.
@item quantchem
Quantitative chemical analysis: calibration and evaluation of results.
@item quantmod
Quantitative financial modelling framework.
@item quantreg
Quantile regression and related methods.
@item quantregForest
Quantile Regression Forests, a tree-based ensemble method for estimation
of conditional quantiles.
@item qvalue
Q-value estimation for false discovery rate control.
@item qvcalc
Functions to compute quasi-variances and associated measures of
approximation error.
@item r2lUniv
R to @LaTeX{} Univariate: perform basic analysis and generate
corresponding @LaTeX{} code.
@item rJava
Low-level R to Java interface.  Allows creation of objects, calling
methods and accessing fields.
@item rPorta
An R interface to PORTA, a collection of routines for analyzing
polytopes and polyhedra.
@item rSymPy
R interface to SymPy computer algebra system.
@item race
Implementation of some racing methods for the empirical selection of the
best.
@item rainbow
Rainbow plots, functional bagplot, and functional HDR boxplot.
@item rake
Raking survey datasets by re-weighting.
@item ramps
Bayesian geostatistical modeling of Gaussian processes using a
reparameterized and marginalized posterior sampling (RAMPS) algorithm.
@item randaes
Random number generator based on AES cipher.
@item random
True random numbers using random.org.
@item randomLCA
Random effects Latent Class Analysis.
@item randomSurvivalForest
Ishwaran and Kogalur's random survival forest.
@item randomForest
Breiman's random forest classifier.
@item randtoolbox
Toolbox for pseudo and quasi random number generation.
@item rankreg
Rank regression estimator for the AFT model with right censored data.
@item rateratio.test
Exact rate ratio test.
@c @item ratetables
@c US national and state mortality data (requires @strong{survival4} and
@c @strong{date}), for use with @strong{survival4}.
@item rattle
A graphical user interface for data mining in R using GTK.
@item rbenchmark
Benchmarking of arbitrary R code.
@item rbounds
Perform Rosenbaum bounds sensitivity tests for matched data.
@item rbugs
Functions to prepare files needed for running BUGS in batch mode, and
running BUGS from R.  Support for Linux systems with Wine is emphasized.
@item rcdd
C Double Description for R, an interface to the CDD computational
geometry library.
@item rcdk
Interface to the CDK libraries, a Java framework for cheminformatics.
@item rcdklibs
CDK libraries packaged for R.
@item rcom
R COM Client Interface and internal COM Server.
@item rcompgen
Completion generator for R.  @emph{Recommended} for R 2.5.0 or 2.6.0.
@c <COMMENT>
@c Moved to the Archive o 2007-09-30 as requested by the maintainer.
@c @item rcompletion
@c TAB completion for R using Readline.
@c </COMMENT>
@item rconifers
Interface to the CONIFERS forest growth model.
@item rda
Shrunken Centroids Regularized Discriminant Analysis.
@item rdetools
Relevant Dimension Estimation (RDE) in feature spaces.
@item realized
Realized variance toolkit.
@item ref
Functions for creating references, reading from and writing ro
references and a memory efficient refdata type that transparently
encapsulates matrices and data frames.
@item regress
Fitting Gaussian linear models where the covariance structure is a
linear combination of known matrices by maximising the residual log
likelihood.  Can be used for multivariate models and random effects
models.
@item regsubseq
Detect and test regular sequences and subsequences.
@item regtest
Regression testing.
@item rela
Item analysis with standard errors.
@item relaimpo
RELAtive IMPOrtance of regressors in linear models.
@item relations
Data structures for @math{k}-ary relations with arbitrary domains,
predicate functions, and fitters for consensus relations.
@item relax
Functions for report writing, presentation, and programming.
@item relaxo
Relaxed Lasso.
@item reldist
Functions for the comparison of distributions, including nonparametric
estimation of the relative distribution PDF and CDF and numerical
summaries as described in ``Relative Distribution Methods in the Social
Sciences'' by Mark S. Handcock and Martina Morris, 1999, Springer.
@item relimp
Functions to facilitate inference on the relative importance of
predictors in a linear or generalized linear model.
@item relsurv
Various functions for regression in relative survival.
@item remMap
Regularized multivariate regression for identifying master predictors.
@item repolr
Repeated measures proportional odds logistic regression.
@item reporttools
Generate @LaTeX{} tables of descriptive statistics
@item reshape
Flexibly reshape data.
@item resper
Sampling from restricted permutations.
@item reweight
Adjustment of survey respondent weights.
@item rgcvpack
R interface for GCVPACK Fortran package.
@item rgdal
Provides bindings to Frank Warmerdam's Geospatial Data Abstraction 
Library (GDAL).
@item rgenoud
R version of GENetic Optimization Using Derivatives.
@c <COMMENT>
@c Moved to the Archive on 2009-02-23 (Orphaned).
@c @item rggm
@c Robustified methods for Gaussian Graphical Models.
@c </COMMENT>
@item rggobi
Interface between R and GGobi.
@item rgl
3D visualization device system (OpenGL).
@item rgr
The GSC (Geological Survey of Canada) applied geochemistry EDA package.
@item rgrs
Functions to make R usage in social sciences easier (documentation in
french).
@item rhosp
Side effect risks in hospital: simulation and estimation.
@item richards
Richards curves.
@item rimage
Functions for image processing, including Sobel filter, rank filters,
fft, histogram equalization, and reading @acronym{JPEG} files.
@item rindex
Indexing for R.
@item risksetROC
Riskset ROC curve estimation from censored survival data.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item riv
@c Robust Instrumental Variables estimators based on high breakpoint point
@c S-estimators of multivariate location and scatter matrices.
@c </COMMENT>
@item rjacobi
Jacobi polynomials and Gauss-Jacobi quadrature related operations.
@item rjags
Bayesian graphical models via an interface to the JAGS MCMC library.
@item rjson
JSON (JavaScript Object Notation) for R.
@item rlecuyer
R interface to RNG with multiple streams.
@item rmeta
Functions for simple fixed and random effects meta-analysis for
two-sample comparison of binary outcomes.
@item rmetasim
An interface between R and the metasim simulation engine.  Facilitates
the use of the metasim engine to build and run individual based
population genetics simulations.
@item rngwell19937
WELL19937a random number generator.
@item robCompositions
Robust estimation for compositional data.
@item robfilter
Robust time series filters.
@c <COMMENT>
@c Moved to the Archive o 2007-09-30 as requested by the maintainer.
@c @item roblm
@c Robust regression estimators.
@c </COMMENT>
@item robust
Insightful robust package.
@item robustX
eXperimental eXtraneous eXtraordinary @dots{} functionality for robust
statistics.
@item robustbase
Basic Robust Statistics.
@item rootSolve
Nonlinear root finding, equilibrium and steady-state analysis of
ordinary differential equations.
@item roxygen
A Doxygen-like in-source documentation system for Rd, collation,
namespace and callgraphs.
@item rpanel
Simple interactive controls for R using the tcltk package.
@item rpart
Recursive PARTitioning and regression trees.  @emph{Recommended}.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item rpart.permutation
@c Permutation tests of rpart models.
@c </COMMENT>
@item rpubchem
R interface to the PubChem collection.
@item rpvm
R interface to PVM (Parallel Virtual Machine).  Provides interface to
PVM @acronym{API}s, and examples and documentation for its use.
@item rqmcmb2
Markov chain marginal bootstrap for quantile regression.
@item rrcov
Functions for robust location and scatter estimation and robust
regression with high breakdown point.
@item rrp
Random Recursive Partitioning.
@c <COMMENT>
@c Moved to the Archive on 2008-03-25 as requested by the maintainer.
@c @item rsbml
@c R support for SBML (Systems Biology Markup Language), using libsbml.
@c </COMMENT>
@item rscproxy
A portable C-style interface to R (StatConnector).
@item rsm
Response-Surface Models.
@item rsprng
Provides interface to SPRNG (Scalable Parallel Random Number Generators)
@acronym{API}s, and examples and documentation for its use.
@item rstream
Unified object oriented interface for multiple independent streams of
random numbers from different sources.
@item rtiff
Read TIFF format images and return them as pixmap objects.
@item rtv
Random Time Variable objects.
@item runjags
Run Bayesian MCMC models in the BUGS syntax using JAGS.
@item rv
Simulation-based random variable object class.
@item rwm
R Workspace Manager.
@item rwt
Rice Wavelet Toolbox wrapper, providing a set of functions for
performing digital signal processing.
@item s20x
Stats 20x functions.
@item sabreR
Provide SABRE functionality (analysis of multi-process random effect
response data) from within R.
@item sac
Semiparametric empirical likelihood ratio based test of changepoint with
one-change or epidemic alternatives with data-based model diagnostic.
@item sampfling
Implements a modified version of the Sampford sampling algorithm.  Given
a quantity assigned to each unit in the population, samples are drawn
with probability proportional to te product of the quantities of the
units included in the sample.
@item sampleSelection
Estimation of sample selection models.
@item sampling
A set of tools to select and to calibrate samples.
@item samr
Significance Analysis of Microarrays.
@item sandwich
Model-robust standard error estimators for time series and longitudinal
data.
@item sapa
Insightful Spectral Analysis for Physical Applications.
@item sbgcop
Semiparametric Bayesian Gaussian copula estimation.
@item sca
Simple Component Analysis.
@c <COMMENT>
@c Moved to the Archive on 2008-12-04 as requested by the maintainer.
@c @item scagnostics
@c Compute scagnostics.
@c </COMMENT>
@item scaleboot
Approximately unbiased @math{p}-values via multiscale bootstrap.
@item scape
functions to import and plot results from statistical catch-at-age
models, used in fisheries stock assessments.
@item scapeMCMC
Markov-chain Monte Carlo diagnostic plots, accompanying the
@strong{scape} package.
@item scatterplot3d
Plots a three dimensional (3D) point cloud perspectively.
@item schoolmath
Functions and datasets for math used in school.
@item sciplot
Scientific graphing functions for factorial designs.
@c <COMMENT>
@c Moved to the Archive on 2009-04-15 as requested by the maintainer.
@c @item scope
@c Data manipulation using arbitrary row and column criteria.
@c </COMMENT>
@item scout
Scout method for covariance-regularized regression.
@item scrime
Tools for the analysis of high-dimensional data developed/implemented at
the group ``Statistical Complexity Reduction In Molecular Epidemiology''
(SCRIME), with main focus on SNP data.
@item scuba
Scuba diving calculations and decompression models.
@item sda
Shrinkage Discriminant Analysis.
@item sdcMicro
Statistical Disclosure Control methods for the generation of public and
scientific use files.
@item sdcTable
Statistical Disclosure Control for tabular data.
@item sddpack
SemiDiscrete Decomposition.
@item sde
Simulation and inference for Stochastic Differential Equations.
@item sdtalt
Signal Detection Theory measures and ALTernatives.
@item sdtoolkit
Scenario discovery tools to support robust decision making.
@item seacarb
Calculates parameters of the seawater carbonate system.
@c <COMMENT>
@c Moved to the Archive on 2005-10-05 (Orphaned/2.2.0).
@c @item seao
@c Simple Evolutionary Algorithm Optimization.
@c </COMMENT>
@c <COMMENT>
@c Moved to the Archive on 2005-10-05 (Orphaned/2.2.0).
@c @item seao.gui
@c Simple Evolutionary Algorithm Optimization: graphical user interface.
@c </COMMENT>
@item seas
Detailed seasonal plots of temperature and precipitation data.
@item seewave
Time wave analysis and graphical representation.
@item segclust
Segmentation and segmentation/clustering.
@item segmented
Functions to estimate break-points of segmented relationships in
regression models (GLMs).
@item selectiongain
Calculate the gain from a model selection.
@item sem
Functions for fitting general linear Structural Equation Models (with
observed and unobserved variables) by the method of maximum likelihood
using the RAM approach.
@item sendplot
Tool for sending interactive plots.
@item sensR
Thurstonian models for sensory discrimination.
@item sensitivity
Sensitivity analysis.
@item seqinr
Exploratory data analysis and data visualization for biological sequence
(DNA and protein) data.
@item seqmon
Sequential monitoring of clinical trials.
@c <COMMENT>
@c Moved to the Archive as requested by the maintainer: serialize() et
@c al are available in R 1.8 or better.
@c @item serialize
@c Simple interfce for serializing to connections.
@c </COMMENT>
@item seriation
Infrastructure for seriation.
@item session
Functions for interacting with, saving and restoring R sessions.
@item setRNG
Set (normal) random number generator and seed.
@item sets
Data structures and basic operations for ordinary sets, and
generalizations such as fuzzy sets, multisets, and fuzzy multisets.
@item sfsmisc
Utilities from Seminar fuer Statistik ETH Zurich.
@item sgeostat
An object-oriented framework for geostatistical modeling.
@item shape
Functions for plotting graphical shapes.
@item shapefiles
Functions to read and write ESRI shapefiles.
@item shapes
Routines for the statistical analysis of shapes, including procrustes
analysis, displaying shapes and principal components, testing for mean
shape difference, thin-plate spline transformation grids and edge
superimposition methods.
@item siar
Stable Isotope Analysis in R.
@item sigma2tools
Test of hypothesis about sigma2.
@item signal
A set of generally Matlab/Octave-compatible signal processing
functions.
@item signalextraction
Real-time signal extraction (Direct Filter Approach).
@item simba
Functions for similarity calculation of binary data.
@item simco
Import Structure files and deduce similarity coefficients from them.
@item simecol
SIMulation of ECOLogical (and other) dynamic systems.
@item simctest
Sequential (or Safe) Implementation of Monte Carlo TESTs with uniformly
bounded resampling risk.
@item simex
SIMEX and MCSIMEX algorithms for measurement error models.
@item similarityRichards
Similarity of Richards curves.
@item simone
Statistical Inference for MOdular NEtworks (SIMoNe).
@item simpleboot
Simple bootstrap routines.
@item singlecase
Tests for single case studies in neuropsychology.
@item sisus
Stable Isotope Sourcing Using Sampling.
@item skewt
Density, distribution function, quantile function and random generation
for the skewed @math{t} distribution of Fernandez and Steel.
@item sm
Software linked to the book ``Applied Smoothing Techniques for Data
Analysis:  The Kernel Approach with @SPLUS{} Illustrations'' by
A. W. Bowman and A. Azzalini, 1997, Oxford University Press.
@item sma
Functions for exploratory (statistical) microarray analysis.
@item smacof
Multidimensional scaling based on stress minimization by means of
majorization (smacof).
@item smatr
(Standardized) Major Axis estimation and Testing Routines.
@item smoothSurv
Survival regression with smoothed error distribution.
@item smoothtail
Smooth estimation of generalized Pareto distribution shape parameter.
@item sn
Functions for manipulating skew-normal probability distributions and for
fitting them to data, in the scalar and the multivariate case.
@item sna
A range of tools for social network analysis, including node and
graph-level indices, structural distance and covariance methods,
structural equivalence detection, p* modeling, and network
visualization.
@c <COMMENT>
@c Removed ...
@c @item snns
@c An R interface to the Stuttgart Neural Networks Simulator (SNNS).
@c </COMMENT>
@item snow
Simple Network of Workstations: support for simple parallel computing in
R.
@item snowFT
Fault Tolerant Simple Network of Workstations.
@item snowfall
Wrapper around @strong{snow} for easier development of parallel R
programs.
@item snp.plotter
Plots of @math{p}-values using single SNP and/or haplotype data.
@item snpXpert
Tools to analyze SNP data.
@item som
Self-Organizing Maps (with application in gene clustering).
@item sound
A sound interface for R: Basic functions for dealing with @file{.wav}
files and sound samples.
@item sp
A package that provides classes and methods for spatial data, including
utility functions for plotting data as maps, spatial selection, amd much
more.
@item spBayes
Fit Gaussian models with potentially complex hierarchical error
structures by Markov chain Monte Carlo (MCMC).
@item space
Sparse PArtial Correlation Estimation.
@item spam
SPArse Matrix algebra.
@item sparseLDA
Sparse Linear Discriminant Analysis for gaussians and mixture of
gaussians models.
@item spatcounts
Fit spatial CAR count regression models using MCMC.
@item spatclus
Arbitrarily shaped multiple spatial cluster detection for case event
data.
@item spatgraphs
Graphs for 2-d point patterns.
@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.  @emph{Recommended}.
@item spatialCovariance
Computation of spatial covariance matrices for data on rectangles using
one dimensional numerical integration and analytic results.
@item spatialkernel
Nonparameteric estimation of spatial segregation in a multivariate point
process.
@item spatialsegregation
Segregation measures for multitype spatial point patterns.
@item spatstat
Data analysis and modelling of two-dimensional point patterns, including
multitype points and spatial covariates.
@item spc
Statistical Process Control: evaluation of control charts by means of
the zero-state, steady-state ARL (Average Run Length), setting up
control charts for given in-control ARL, and plotting of the related
figures.
@item spcosa
SPatial COverage SAmpling.
@item spdep
A collection of functions to create spatial weights matrix objects from
polygon contiguities, from point patterns by distance and tesselations,
for summarising these objects, and for permitting their use in spatial
data analysis; a collection of tests for spatial autocorrelation,
including global Moran's I and Geary's C, local Moran's I, saddlepoint
approximations for global and local Moran's I; and functions for
estimating spatial simultaneous autoregressive (SAR) models.  (Was
formerly the three packages: @strong{spweights}, @strong{sptests}, and
@strong{spsarlm}.)
@item spe
Stochastic Proximity Embedding.
@item spectralGP
Approximate Gaussian processes using the Fourier basis.
@item spectrino
Spectra organizer, visualization and data extraction from within R.
@item spgrass6
Interface between the GRASS 6.0 geographical information system and R.
@item spgwr
Geographically weighted regression.
@item splancs
Spatial and space-time point pattern analysis functions.
@item spls
Sparse Partial Least Squares (SPLS) regression.
@item splus2R
Insightful package providing missing S-PLUS functionality in R.
@c <COMMENT>
@c Deprecated in favor of new @strong{spdep} along with 1.5.0 release.
@c @item spsarlm
@c Functions for estimating spatial simultaneous autoregressive (SAR)
@c models, including sparse matrix methods for computing the Jacobian.
@c @item sptests
@c A collection of tests for spatial autocorrelation, including global
@c Moran's I and Geary's C.
@c @item spweights
@c A collection of functions to create spatial weights matrix objects from
@c polygon contiguities, from point patterns by distance and tesselations,
@c for summarising these objects, and for permitting their use in spatial
@c data analysis.
@c </COMMENT>
@item spssDDI
Read SPSS system files and produce valid DDI version 3.0 documents.
@item spsurvey
Spatial survey design and analysis.
@item spuRs
Functions and datasets from the book ``An Introduction to Scientific
Programming and Simulation Using R'' by O. Jones, R. Maillardet and
A. Robinson, 2009, CRC Press.
@item sqldf
Perform @acronym{SQL} selects on R data frames.
@item ssanv
Sample Size Adjusted for Nonadherence or Variability of input
parameters.
@item ssize.fdr
Sample size calculations for microarray experiments.
@item sspir
State SPace models In R.
@item sspline
Smoothing splines on the sphere.
@item st
Shrinkage @math{t} statistic.
@item staRt
Inferenza classica con TI-83 Plus.
@item stab
Data analysis of drug stability.
@c @item stable
@c Density, distribution, quantile and hazard functions of a stable
@c variate; generalized linear models for the parameters of a stable
@c distribution.
@item startupmsg
Utilities for start-up messages.
@item stashR
A Set of Tools for Administering SHared Repositories.
@c <COMMENT>
@c Merged into foreign.
@c @item stataread
@c Read and write Stata v5 and v6 @file{.dta} files.
@c </COMMENT>
@item statmod
Miscellaneous biostatistical modelling functions.
@item statnet
Software tools for the statistical modeling of network data.
@item stepPlr
L2 penalized logistic regression with a stepwise variable selection.
@item stepwise
A stepwise approach to identifying recombination breakpoints in a
sequence alignment.
@item stinepack
Stineman interpolation package.
@item stochasticGEM
Fitting Stochastic General Epidemic Models.
@item stochmod
Learning and inference algorithms for a variety of probabilistic
models.
@item stream.net
Building and analyzing binary stream networks.
@item strucchange
Various tests on structural change in linear regression models.
@item subplex
The subplex algorithm for unconstrained optimization.
@item subselect
A collection of functions which assess the quality of variable subsets
as surrogates for a full data set, and search for subsets which are
optimal under various criteria.
@item sudoku
Sudoku puzzle solver.
@item sugaR
Plots to help optimizing diabetes therapy.
@item supclust
Methodology for supervised grouping of predictor variables.
@item superpc
Supervised principal components.
@item surv2sample
Two-sample tests for survival analysis.
@item survBayes
Fits a proportional hazards model to time to event data by a Bayesian
approach.
@item survcomp
Performance assessment and comparison for survival analysis.
@item surveillance
Outbreak detection algorithms for surveillance data.
@item survey
Summary statistics, generalized linear models, and general maximum
likelihood estimation for stratified, cluster-sampled, unequally
weighted survey samples.
@item surveyNG
Complex survey samples: database interface, sparse matrices.
@c @item survival4
@c Functions for survival analysis, version 4 (requires
@c @strong{splines}).
@item survival
Functions for survival analysis, including penalised likelihood.
@emph{Recommended}.
@item survivalROC
Time-dependent ROC curve estimation from censored survival data.
@item survrec
Survival analysis for recurrent event data.
@item svGUI
SciViews @acronym{GUI} @acronym{API}: functions to manage @acronym{GUI}
clients.
@item svIDE
SciViews @acronym{GUI} @acronym{API}: functions to interact with
external IDE/code editors.
@item svMisc
SciViews @acronym{GUI} @acronym{API}: miscellaneous functions.
@item svSocket
SciViews @acronym{GUI} @acronym{API} socket server.
@item svcR
A support vector machine technique for clustering.
@item svcm
2d and 3d Space-Varying Coefficient Models.
@item svmpath
Computes the entire regularization path for the two-class svm classifier
with essentialy the same cost as a single SVM fit.
@item systemfit
Contains functions for fitting simultaneous systems of equations using
Ordinary Least Sqaures (OLS), Two-Stage Least Squares (2SLS), and
Three-Stage Least Squares (3SLS).
@c <COMMENT>
@c Moved to the Archive on 2007-04-11 as requested by the maintainer.
@c @item tapiR
@c Tools for accessing (UK) parliamentary information in R.
@c </COMMENT>
@item taskPR
Task-Parallel R package.
@item tawny
Various portfolio optimization strategies, including random matrix
theory and shrinkage estimators.
@item tcltk2
A series of widgets and functions to supplement @strong{tcltk}.
@item tdist
Computes the distribution of a linear combination of independent
Student's @math{t} variables.
@item tdm
A tool for Therapeutic Drug Monitoring.
@item tdthap
Transmission/disequilibrium tests for extended marker haplotypes.
@item tensor
Tensor product of arrays.
@item tensorA
Advanced tensors arithmetic with named indices.
@item termstrc
Term structure and credit spread estimation.
@item tframe
Time Frame coding kernel: functions for writing code that is independent
of the way time is represented.
@item tframePlus
Time Frame coding kernel extensions.
@item tgp
Bayesian regression and adaptive sampling with Treed Gaussian Process
models.
@item tiger
TIme series of Grouped ERrors.
@item tileHMM
Hidden Markov Models for ChIP-on-Chip analysis.
@item time
Time tracking for developers.
@item timeDate
The Rmetrics module for ``Chronological and Calendarical Objects''.
@item timeSeries
The Rmetrics module for ``Financial Time Series Objects''.
@item timereg
Code and data sets for the book ``Dynamic Regression Models for Survival
Data'' by T.  Martinussen and T. Scheike, 2006, Springer Verlag, plus
more recent developments.
@item timsac
TIMe Series Analysis and Control package.
@item tis
Time indexes and time indexed series.
@item titan
Titration analysis for mass spectrometry data.
@item titecrm
TIme-To-Event Continual Reassessment Method and calibration tools.
@item tkrgl
TK widget tools for @strong{rgl} package.
@item tkrplot
Simple mechanism for placing R graphics in a Tk widget.
@item tlemix
Trimmed maximum likelihood estimation for robust fitting of finite
mixture models.
@item tlnise
Two-level normal independent sampling estimation.
@item tm
A framework for text mining applications within R.
@item tmvtnorm
Truncated multivariate normal distribution.
@item tnet
Analysis of weighted and longitudinal networks.
@item topmodel
An R implementation of TOPMODEL.
@c <COMMENT>
@c Moved to the Archive on 2008-05-25 as requested by the maintainer.
@c (Replaced by randtoolbox.)
@c @item torus
@c Torus algorithm for quasi random number generation.
@c </COMMENT>
@item tossm
Testing Of Spatial Structure Methods.
@item tpr
Temporal Process Regression.
@item trackObjs
Track objects.
@item tractor.base
Basic TractoR (tractography with R) functions for working with magnetic
images.
@item tradeCosts
Post-trade analysis of transaction costs.
@item tree
Classification and regression trees.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item treeglia
@c Stem analysis functions for volume increment and carbon uptake
@c assessment from tree-rings.
@c </COMMENT>
@item treelet
Treelet: a novel construction of multi-scale bases that extends wavelets
to non-smooth signals.
@item triangle
Standard distribution functions for the triangle distribution.
@item trimcluster
Cluster analysis with trimming.
@item trip
Spatial analysis of animal track data.
@item tripEstimation
Metropolis sampler and supporting functions for estimating animal
movement from archival tags and satellite fixes.
@item tripack
A constrained two-dimensional Delaunay triangulation package.
@item truncgof
Goodness-of-fit tests allowing for left truncated data.
@item truncnorm
Truncated normal distribution.
@item truncreg
Truncated regression models.
@item trust
Local optimization using two derivatives and trust regions.
@item tsDyn
Time series analysis based on dynamical systems theory.
@item tsModel
Time series modeling for air pollution and health.
@item tseries
Package for time series analysis with emphasis on non-linear modelling.
@item tseriesChaos
Routines for the analysis of non-linear time series.
@item tsfa
Time Series Factor Analysis.
@item tslars
Least angle regression for time series analysis.
@item tuneR
Collection of tools to analyze music, handle wave files, transcription,
etc.
@item tutoR
Student-friendly package to mask common functions.
@item twang
Toolkit for Weighting and Analysis of Nonequivalent Groups.
@item tweedie
Maximum likelihood computations for Tweedie exponential family models.
@c <COMMENT>
@c Moved to the Archive on 2005-10-05 (Orphaned/2.2.0).
@c @item twostage
@c Functions for optimal design of two-stage-studies using the Mean Score
@c method.
@c </COMMENT>
@item twslm
A two-way semilinear model for normalization and analysis of cDNA
microarray data.
@item ucminf
Unconstrained nonlinear optimization via UCMINF.
@item udunits
Interface to Unidata's routines to convert units.
@item ump
Uniformly Most Powerful tests.
@item unbalhaar
Function estimation via Unbalanced Haar wavelets.
@item uncompress
For uncompressing @file{.Z} files.
@item uniCox
Univarate shrinkage prediction in the Cox model.
@item untb
Ecological drift under the UNTB (Unified Neutral Theory of
Biodiversity).
@item urca
Unit root and cointegration tests for time series data.
@item urn
Functions for sampling without replacement (simulated urns).
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item uroot
@c Unit root tests and graphics for seasonal time series.
@c </COMMENT>
@item vabayelMix
Variational Bayesian mixture model.
@item varSelRF
Variable selection using random forests.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item vardiag
@c Interactive variogram diagnostics.
@c </COMMENT>
@item varmixt
Mixture model on the variance for the analysis of gene expression data.
@item vars
VAR modeling.
@item vbmp
Variational Bayesian Multinomial Probit Regression.
@item vcd
Functions and data sets based on the book ``Visualizing Categorical
Data'' by Michael Friendly.
@item vegan
Various help functions for vegetation scientists and community
ecologists.
@item verification
Utilities for verification of discrete and probabilistic forecasts.
@c <COMMENT>
@c Moved to the Archive on 2009-06-23 (orphaned/QC).
@c @item verify
@c Construction of test suites using verify objects.
@c </COMMENT>
@item vioplot
Violin plots, which are a combination of a box plot and a kernel density
plot.
@item vowels
Vowel manipulation, normalization, and plotting.
@item vrmlgen
Create plots, charts and graphs for 3D data visualization as VRML
files.
@item vrtest
Variance ratio tests for weak-form market efficiency.
@item wasim
Tools for data processing and visualization of results of the WASIM-ETH
hydrological model.
@c <COMMENT>
@c Moved to the Archive on 2009-04-26 (Orphaned/QC).
@c @item waveclock
@c Time-frequency analysis of cycling cell luminescence data.
@c </COMMENT>
@item waved
WaveD transform in R.
@item wavelets
Functions for computing wavelet filters, wavelet transforms and
multiresolution analyses.
@item waveslim
Basic wavelet routines for time series analysis.
@item wavethresh
Software to perform 1-d and 2-d wavelet statistics and transforms.
@item wccsom
SOM networks for comparing patterns with peak shifts.
@item wgaim
Whole Genome Average Interval Mapping for QTL detection using mixed
models.
@item wikibooks
Functions and datasets for the German WikiBook ``GNU R''.
@item wle
Robust statistical inference via a weighted likelihood approach.
@item wmtsa
Insightful Wavelet Methods for Time Series Analysis.
@item wnominate
WNOMINATE roll call analysis software.
@item wombsoft
Wombling computation.
@item wordnet
WordNet interface.
@item write.snns
Function for exporting data to SNNS (Stuttgart Neural Network Simulator)
pattern files.
@item x12
A wrapper function and @acronym{GUI} for the X12 binaries under windows.
@item xgobi
Interface to the XGobi and XGvis programs for graphical data analysis.
@c <COMMENT>
@c Moved to the Archive on 2009-03-10 (Orphaned).
@c @item xlsReadWrite
@c Natively read and write Excel files.
@c </COMMENT>
@item xtable
Export data to @LaTeX{} and @HTML{} tables.
@item xterm256
Support for xterm256 escape sequences.
@item xts
Extensible time series.
@item yaImpute
Performs popular nearest neighbor routines.
@item yacca
Yet Another Canonical Correlation Analysis package.
@item yaml
Methods to convert R to YAML and back.
@item yest
Gaussian independence models.
@c <COMMENT>
@c Moved to the Archive on 2008-04-22 (Orphaned/2.6.0).
@c @item zicounts
@c Fit classical, zero-inflated and interval censored count data regression
@c models.
@c </COMMENT>
@item zipfR
Statistical models for word frequency distributions.
@item zoeppritz
Zoeppritz equations: calculate and plot scattering coefficients of
seismic waves when they interact at an interface between two layers.
@item zoo
A class with methods for totally ordered indexed observations such as
irregular time series.
@item zyp
Zhang & Yue-Pilon approach to determining trends in climate data.
@end table

@noindent
See @CRAN{} @file{src/contrib/PACKAGES} for more information.

Some @CRAN{} packages that do not build out of the box on Windows,
require additional software, or are shipping third party libraries for
Windows cannot be made available on @CRAN{} in form of a Windows binary
packages.  Nevertheless, some of these packages are available at the
``CRAN extras'' repository at @url{http://www.stats.ox.ac.uk/pub/RWin/}
kindly provided by Brian D. Ripley.  Note that this repository is a
default repository for recent versions of R for Windows.

There used to be a @CRAN{} @file{src/contrib/Devel} directory with
packages still ``under development'' or depending on features only
present in the current development versions of R.  This area is no
longer provided, with packages formerly in this area either in the
regular package area or the archive @file{src/contrib/Archive}.

@c <COMMENT>
@c CRAN's src/contrib/Devel discontinued on 2007-04-14.
@c @table @strong

@c @c <COMMENT>
@c @c Moved to Attic on 2004-12-14 as requested by maintainer.
@c @c @item Dopt
@c @c Finding D-optimal experimental designs.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Devel for 1.8 as it fails R CMD check.
@c @item GLMMGibbs
@c Generalised Linear Mixed Models by Gibbs sampling.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Devel for 1.6 as it fails R CMD check.
@c @item RPgSQL
@c Provides methods for accessing data stored in PostgreSQL tables.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Attic for 1.5.1 as no longer needed.
@c @c (See also the info on rdbi.sourceforge.net.)
@c @c @item Rdbi
@c @c Generic framework for database access in R.
@c @c @item Rdbi.PgSQL
@c @c Provides methods for accessing data stored in PostgreSQL tables.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Attic for 1.5 (as this contains the summary functions).
@c @c @item colSums
@c @c Matrix summary functions in C.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Attic for 1.5.1 as no longer needed.
@c @c @item cxx
@c @c A small C++ test package.
@c @c </COMMENT>

@c @item dseplus
@c Extensions to @strong{dse}, the Dynamic Systems Estimation multivariate
@c time series package.  Contains PADI, juice and monitoring extensions.

@c @item ensemble
@c Ensembles of tree classifiers.

@c @c <COMMENT>
@c @c Moved to Devel for 1.5 as it fails R CMD check.
@c @c Moved to Attic for 1.5.1 as apparently no longer actively
@c @c maintained.
@c @c @item event.chart
@c @c Package for creating event charts.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Attic for 1.5.1 as no longer maintained.
@c @c @item hpower
@c @c A suite of functions to compute power and sample size for tests of the
@c @c general linear hypothesis.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Attic on 2003-09-12 as requested by the package maintainer,
@c @c "kjetil brinchmann halvorsen" <kjetil@@entelnet.bo>.
@c @c @item pls
@c @c Univariate Partial Least Squares Regression.
@c @c </COMMENT>

@c @c <COMMENT>
@c @c Moved to Attic for 1.5.1 as no longer needed.
@c @c @item regexp
@c @c Simple regular expression interface.
@c @c </COMMENT>

@c @item runStat
@c Running median and mean.

@c @end table
@c </COMMENT>

@node Add-on packages from Omegahat, Add-on packages from Bioconductor, Add-on packages from CRAN, Which add-on packages exist for R?
@subsection Add-on packages from Omegahat

The @url{http://www.omegahat.org/, Omegahat Project for Statistical
Computing} provides a variety of open-source software for statistical
applications, with special emphasis on web-based software, Java, the
Java virtual machine, and distributed computing.  A @acronym{CRAN} style
R package repository is available via @url{http://www.omegahat.org/R/}.

Currently, there are the following packages.

@table @strong
@item Aspell
An interface to facilities in the aspell library.
@item CGIwithR
Facilities for the use of R to write CGI scripts.
@item CORBA
Dynamic CORBA client/server facilities for R.  Connects to other
CORBA-aware applications developed in arbitrary languages, on different
machines and allows R functionality to be exported in the same way to
other applications.
@item CodeDepends
Analysis of R code for reproducible research and code view.
@item Combinations
Compute the combinations of choosing @math{r} items from @math{n}
elements.
@item FlashMXML
A simple Flash graphics device for R.
@item IDocs
Infrastructure for interactive documents.
@item IDynDocs
Interactive and dynamic Documents with @XML{}/@XSL{}.
@item OOP
OOP style classes and methods for R and @SPLUS{}.  Object references and
class-based method definition are supported in the style of languages
such as Java and C++.
@item RCSS
Facilities for reading and working with CSS files in R.
@item RCurl
Allows one to compose HTTP requests to fetch URIs, post forms, etc., and
process the results returned by the Web server.
@item RDA
Read RDA files using R.
@item RDCOMClient
Provides dynamic client-side access to (D)COM applications from within
R.
@item RDCOMEvents
Provides facilities to use R functions and objects as handlers for DCOM
events.
@item RDCOMServer
Facilities for exporting S objects and functions as COM objects.
@item REmbeddedPostgres
Allows R functions and objects to be used to implement SQL functions ---
per-record, aggregate and trigger functions.
@item REventLoop
An abstract event loop mechanism that is toolkit independent and can be
used to to replace the R event loop.
@item RGdkPixbuf
S language functions to access the facilities in the GdkPixbuf library
for manipulating images.
@item RGnumeric
A plugin for the Gnumeric spreadsheet that allows R functions to be
called from cells within the sheet, automatic recalculation, etc.
@item RGoogleDocs
Initial, elementary interface to Google's Document @acronym{API}.
@item  RGraphicsDevice
A framework for developing R graphics devices entirely in R.
@item RGtk
Facilities in the S language for programming graphical interfaces using
Gtk, the Gnome @acronym{GUI} toolkit.
@item RGtkBindingGenerator
A meta-package which generates C and R code to provide bindings to a
Gtk-based library.
@item RGtkExtra
A collection of S functions that provide an interface to the widgets in
the gtk+extra library such as the GtkSheet data-grid display, icon list,
file list and directory tree.
@item RGtkGlade
S language bindings providing an interface to Glade, the interactive
Gnome @acronym{GUI} creator.
@item RGtkHTML
A collection of S functions that provide an interface to creating and
controlling an @HTML{} widget which can be used to display @HTML{}
documents from files or content generated dynamically in S.
@item RGtkIPrimitives
A collection of low-level primitives for interactive use with R graphics
and the gtkDevice using @strong{RGtk}.
@item RGtkViewers
A collection of tools for viewing different S objects, databases, class
and widget hierarchies, S source file contents, etc.
@item RJSONIO
Serialize R objects to JSON (JavaScript Object Notation).
@item RJavaDevice
A graphics device for R that uses Java components and graphics.
@acronym{API}s.
@item RKML
Simple tools for creating KML displays from R.
@item RMatlab
A bi-directional interface between R and Matlab.
@item RObjectTables
The C and S code allows one to define R objects to be used as elements
of the search path with their own semantics and facilities for reading
and writing variables.  The objects implement a simple interface via R
functions (either methods or closures) and can access external data,
e.g., in other applications, languages, formats, @dots{}
@item RSMethods
An implementation of S version 4 methods and classes for R, consistent
with the basic material in ``Programming with Data'' by John
M. Chambers, 1998, Springer NY.
@item RSPerl
An interface from R to an embedded, persistent Perl interpreter,
allowing one to call arbitrary Perl subroutines, classes and methods.
@item RSPython
Allows Python programs to invoke S functions, methods, etc., and S code
to call Python functionality.
@item RXLisp
An interface to call XLisp-Stat functions from within R.
@item Rcartogram
An interface to Mark Newman's cartogram software.
@item Rcompression
In-memory decompression for @acronym{GNU} zip and bzip2 formats.
@item Rexif
Extract meta-information from @acronym{JPEG} files.
@item Rflickr
R interface to Flickr @acronym{API}.
@item Rlibstree
Suffix Trees in R via the libstree C library.
@item Rstem
Interface to Snowball implementation of Porter's word stemming
algorithm.
@item RwxDevice
R graphics device using wxWidgets.
@item RwxWidgets
Facilities to program @acronym{GUI}s using wxWidgets in R.
@c @item Ryacas
@c R interface to yacas.
@item SASXML
Example for reading @XML{} files in SAS 8.2 manner.
@item SJava
An interface from R to Java to create and call Java objects and
methods.
@item SLanguage
Functions and C support utilities to support S language programming
that can work in both R and @SPLUS{}.
@item SNetscape
Plugin for Netscape and JavaScript.
@item SSOAP
A client interface to SOAP (Simple Object Access Protocol) servers from
within S.
@item SVGAnnotation
Tools for post-processing SVG plots created in R.
@item SWinRegistry
Provides access from within R to read and write the Windows registry.
@item SWinTypeLibs
Provides ways to extract type information from type libraries and/or
DCOM objects that describes the methods, properties, etc., of an
interface.
@item SXalan
Process @XML{} documents using @XSL{} functions implemented in R and
dynamically substituting output from R.
@item Slcc
Parses C source code, allowing one to analyze and automatically generate
interfaces from S to that code, including the table of S-accessible
native symbols, parameter count and type information, S constructors
from C objects, call graphs, etc.
@item Sxslt
An extension module for libxslt, the @XML{}-@XSL{} document translator,
that allows @XSL{} functions to be implemented via R functions.
@item XML
Tools for reading @XML{} documents and DTDs.
@item XMLRPC
RPC via @XML{}.
@item XMLSchema
R facilities to read @XML{} schema.
@item Zillow
Simple interface to Zillow.com's house price estimate @acronym{API}.
@end table

@node Add-on packages from Bioconductor, Other add-on packages, Add-on packages from Omegahat, Which add-on packages exist for R?
@subsection Add-on packages from Bioconductor

The @url{http://www.bioconductor.org/, Bioconductor Project} produces an
open source software framework that will assist biologists and
statisticians working in bioinformatics, with primary emphasis on
inference using DNA microarrays.  A @acronym{CRAN} style R package
repository is available via @url{http://www.bioconductor.org/}.

The following R packages are contained in the current release of
Bioconductor, with more packages under development.

@table @strong

@item ABarray
Microarray QA and statistical data analysis for Applied Biosystems
Genome Survey Micorarray (AB1700) gene expression data.
@item ACME
Algorithms for Calculating Microarray Enrichment (ACME).
@item AffyCompatible
Affymetrix GeneChip software compatibility
@item AffyExpress
Affymetrix quality assessment and analysis tool.
@item AffyTiling
Easy extraction of individual probes in Affymetrix tiling arrays.
@c <COMMENT>
@c Removed in BioC 2.4.
@c @item AnnBuilder
@c Processing annotation date from public data repositories and building
@c annoation data packages or @XML{} data documents using the source
@c data.
@c </COMMENT>
@item AnnotationDbi
Annotation DataBase Interface.
@item BAC
Bayesian Analysis of Chip-chip experiment.
@item BCRANK
Predicting binding site consensus from ranked DNA sequences.
@item BGmix
Bayesian models for differential gene expression.
@item BSgenome
Infrastructure for Biostrings-based genome data packages.
@c Still present in development branch but not in 2.2 release.
@c @item BeadExplorer
@c QC, normalization, annotation and exploration of Illumina BeadChip data.
@item BioMVCClass
Model-View-Controller (MVC) classes that use @strong{Biobase}.
@item Biobase
Object-oriented representation and manipulation of genomic data (S4
class structure).
@item BiocCaseStudies
Support for the Bioconductor Case Studies monograph.
@item Biostrings
Class definitions and generics for biological sequences along with
pattern matching algorithms.
@item BufferedMatrix
Microarray analysis methods that use BufferedMatrix objects.
@item BufferedMatrixMethods
A matrix data storage object held in temporary files.
@item CALIB
Calibration model for estimating absolute expression levels from
microarray data.
@item CAMERA
Collection of annotation related methods for mass spectrometry data.
@item CGHcall
Calling aberrations for array CGH tumor profiles.
@item CORREP
Multivariate correlation estimation and statistical inference.
@item Category
A collection of tools for performing category analysis.
@c Retired from Bioconductor as of 2.2 release.
@c @item ChromoViz
@c Draw gene expression profile onto chromosome using @acronym{SVG}.
@item CoCiteStats
A collection of software tools for dealing with co-citation data.
@item DAVIDQuery
Retrieval from the DAVID bioinformatics data resource into R.
@item DEDS
Differential Expression via Distance Summary for microarray data.
@item DNAcopy
Segments DNA copy number data using circular binary segmentation to
detect regions with abnormal copy number.
@item DynDoc
Functionality to create and interact with dynamic documents, vignettes,
and other navigable documents.
@item EBImage
Image processing and image analysis toolkit.
@item EBarrays
Empirical Bayes tools for the analysis of replicated microarray data
across multiple conditions.
@item GEOmetadb
A compilation of metadata from NCBI GEO.
@item GEOquery
Get data from NCBI Gene Expression Omnibus (GEO).
@item GGBase
Infrastructure for genetics of gene expression.
@item GGtools
Software and data for genetical genomics.
@item GLAD
Gain and Loss Analysis of DNA.
@item GOSemSim
GO-terms Semantic Similarity measures.
@item GOstats
Tools for manipulating GO and microarrays.
@item GSEABase
Gene set enrichment data structures and methods.
@item GSEAlm
Linear model toolset for Gene Set Enrichment Analysis.
@item GeneMeta
A collection of meta-analysis tools for analyzing high throughput
experimental data.
@item GeneR
Package manipulating nucleotidic sequences (Embl, Fasta, GenBank).
@item GeneRfold
R for genes and sequences, using viennaRNA package (fold).
@item GeneRegionScan
Analysis of Affymetrix data within discrete regions of the genome.
@item GeneSelectMMD
Gene selection based on the marginal distributions of gene profiles that
characterized by a mixture of three-component multivariate
distributions.
@item GeneSelector
GeneSelector.
@item GeneSpring
Functions and class definitions to be able to read and write GeneSpring
specific data objects and convert them to Bioconductor objects.
@c Retired from Bioconductor as of 2.2 release.
@c @item GeneTS
@c A package for analysing multiple gene expression time series data.
@c Currently, implements methods for cell cycle analysis and for inferring
@c large sparse graphical Gaussian models.
@item GeneTraffic
GeneTraffic R integration functions.
@item GeneticsBase
Classes and functions for handling genetic data.
@item GeneticsDesign
Functions for designing genetics studies.
@item GeneticsPed
Pedigree and genetic relationship functions.
@item GenomeGraphs
Plotting genomic information from Ensembl.
@item GlobalAncova
Calculates a global test for differential gene expression between
groups.
@item GraphAT
Graph theoretic Association Tests.
@item GraphAlignment
GraphAlignment.
@item HEM
Heterogeneous Error Model for analysis of microarray data.
@item Harshlight
A ``corrective make-up'' program for microarray chips.
@item Heatplus
A heat map displaying covariates and coloring clusters.
@item Icens
Functions for computing the NPMLE for censored and truncated data.
@item KEGGSOAP
Client-side SOAP access KEGG.
@item KEGGgraph
A graph approach to KEGG PATHWAY.
@item LBE
Estimation of the false discovery rate.
@item LMGene
Analysis of microarray data using a linear model and glog data
transformation.
@item LPE
Significance analysis of microarray data with small number of replicates
using the Local Pooled Error (LPE) method.
@item MANOR
Micro-Array NORmalization.
@item MCRestimate
Misclassification error estimation with cross-validation.
@item MLInterfaces
Uniform interfaces to machine learning code for the exprSet class from
Bioconductor.
@item MVCClass
Model-View-Controller (MVC) classes.
@item MantelCorr
Compute Mantel Cluster Correlations.
@item MassSpecWavelet
Mass spectrum processing by wavelet-based algorithms.
@item MeasurementError.cor
Two-stage measurement error model for correlation estimation with
smaller bias than the usual sample correlation.
@item MergeMaid
Cross-study comparison of gene expression array data.
@item Mfuzz
Soft clustering of time series gene expression data.
@item MiPP
Misclassification Penalized Posterior Classification.
@item OCplus
Operating characteristics plus sample size and local fdr for microarray
experiments.
@item OLIN
Optimized Local Intensity-dependent Normalisation of two-color
microarrays.
@item OLINgui
Graphical user interface for @strong{OLIN}.
@item OrderedList
Similarities of ordered gene lists.
@item OutlierD
Outlier detection using quantile regression on the M-A scatterplots of
high-throughput data.
@item PAnnBuilder
Protein annotation data package builder.
@item PCpheno
Phenotypes and cellular organizational units.
@item PGSEA
Parametric Gene Set Enrichment Analysis.
@item PROcess
Ciphergen SELDI-TOF processing.
@item RBGL
An interface between the graph package and the Boost graph libraries,
allowing for fast manipulation of graph objects in R.
@item RBioinf
Support for R for Bioinformatics monograph.
@item RLMM 
A genotype calling algorithm for Affymetrix SNP arrays. 
@item RMAGEML
Functionality to handle MAGEML documents.
@c Retired from Bioconductor as of 2.2 release.
@c @item RMAPPER
@c Interface to mapper.chip.org.
@item ROC
Receiver Operating Characteristic (ROC) approach for identifying genes
that are differentially expressed in two types of samples.
@c <COMMENT>
@c Removed in BioC 2.4.
@c @item RSNPper
@c Interface to chip.org::SNPper for SNP-related data.
@c </COMMENT>
@item RWebServices
Expose R functions as web services through Java/Axis/Apache.
@item RankProd
Rank Product method for identifying differentially expressed genes.
@item RbcBook1
Support for Springer monograph on Bioconductor.
@item Rdbi
Generic framework for database access in R.
@item RdbiPgSQL
Methods for accessing data stored in PostgreSQL tables.
@item Rdisop
Decomposition of isotopic patterns.
@item RefPlus
Functions for pre-processing Affymetrix data using the RMA+ and the
RMA++ methods.
@item Resourcerer
Read annotation data from TIGR Resourcerer or convert the annotation
data into Bioconductor data package.
@item Rgraphviz
An interface with Graphviz for plotting graph objects in R.
@item Ringo
R Investigation of NimbleGen Oligoarrays..
@item Rintact
Interface to EBI Intact protein interaction data base.
@item Rmagpie
Micro-array gene-expression-based program in error rate estimation.
@item Rredland
Interface to redland RDF utilities.
@item Rtreemix
Mutagenetic trees mixture models.
@item Ruuid
Creates Universally Unique ID values (UUIDs) in R.
@c Still present in development branch but not in 2.2 release.
@c @item SAGElyzer
@c Locates genes based on SAGE tags.
@item SAGx
Statistical Analysis of the GeneChip.
@item SBMLR
Systems Biology Markup Language (SBML) interface and biochemical system
analysis tools.
@item SLGI
Synthetic Lethal Genetic Interaction.
@item SLqPCR
Functions for analysis of real-time quantitative PCR data at SIRS-Lab
GmbH.
@item SMAP
A Segmental Maximum A Posteriori approach to array-CGH copy number
profiling.
@item SNPchip
Classes and methods for high throughput SNP chip data.
@item SPIA
Signaling Pathway Impact Analysis using combined evidence of pathway
over-representation and unusual signaling perturbations.
@item SSPA
Sample Size and Power Analysis for microarray data.
@item ScISI
In Silico Interactome.
@item SemSim
Gene ontology-based semantic similarity measures.
@item TargetSearch
Analysis of GC-MS metabolite profiling data.
@item TypeInfo
Optional type specification prototype.
@item VanillaICE
Methods for fitting Hidden Markov Models to SNP chip data.
@item XDE
A Bayesian hierarchical model for cross-study analysis of differential
gene expression.
@item aCGH
Classes and functions for Array Comparative Genomic Hybridization data.
@item adSplit
Annotation-driven clustering.
@item affxparser
Package for parsing Affymetrix files (CDF, CEL, CHP, BPMAP, BAR).
@item affy
Methods for Affymetrix Oligonucleotide Arrays.
@item affyPLM
For fitting Probe Level Models.
@item affyPara
Parallelized preprocessing methods for Affymetrix Oligonucleotide
Arrays.
@item affyQCReport
QC Report Generation for affyBatch objects.
@item affycomp
Graphics toolbox for assessment of Affymetrix expression measures.
@item affycoretools
Functions useful for those doing repetitive analyses.
@item affyio
Tools for parsing Affymetrix data files.
@item affylmGUI
Graphical User Interface for affy analysis using package @strong{limma}.
@item affypdnn
Probe Dependent Nearest Neighbors (PDNN) for the @strong{affy} package.
@item altcdfenvs
Utilities to handle cdfenvs.
@item annaffy
Functions for handling data from Bioconductor Affymetrix annotation data
packages.
@item annotate
Associate experimental data in real time to biological metadata from web
databases such as GenBank, LocusLink and PubMed.  Process and store
query results.  Generate @HTML{} reports of analyses.
@item annotationTools
Annotate microarrays and perform cross-species gene expression analyses
using flat file databases.
@item apComplex
Estimate protein complex membership using AP-MS protein data.
@item aroma.light
Light-weight methods for normalization and visualization of microarray
data using only basic R data types.
@c Retired from Bioconductor as of 2.2 release.
@c @item arrayMagic
@c Utilities for quality control and processing for two-color cDNA
@c microarray data.
@item arrayQuality
Performing print-run and array level quality assessment.
@item arrayQualityMetrics
Quality metrics on ExpressionSets.
@item beadarray
Quality control and low-level analysis of BeadArrays.
@item beadarraySNP
Normalization and reporting of Illumina SNP bead arrays.
@item betr
Identify differentially expressed genes in microarray time-course data.
@item bgafun
A method to identify specifity determining residues in protein
families.
@item bgx
Bayesian Gene eXpression.
@item bioDist
A collection of software tools for calculating distance measures.
@item biocDatasets
Synthetic datasets for bioconductor.
@item biocGraph
Graph examples and use cases in Bioinformatics.
@item biocViews
Categorized views of R package repositories.
@item biomaRt
Interface to BioMart databases (e.g., Ensembl)
@item bridge
Bayesian Robust Inference for Differential Gene Expression.
@item cellHTS
Analysis of cell-based screens.
@item cellHTS2
Analysis of cell-based screens --- revised version of @strong{cellHTS}.
@item cghMCR
Find chromosome regions showing common gains/losses.
@item clusterStab
Compute cluster stability scores for microarray data.
@item codelink
Manipulation of Codelink Bioarrays data.
@item convert
Convert Microarray Data Objects.
@item copa
Functions to perform cancer outlier profile analysis.
@item cosmo
Supervised detection of conserved motifs in DNA sequences.
@item cosmoGUI
GUI for constructing constraint sets used by the @strong{cosmo}
package.
@item crlmm
Genotype calling (CRLMM) and copy number analysis tool for Affymetrix 
SNP 5.0 and 6.0 and Illumina arrays.
@item ctc
Tools to export and import Tree and Cluster to other programs.
@item daMA
Functions for the efficient design of factorial two-color microarray
experiments and for the statistical analysis of factorial microarray
data.
@item diffGeneAnalysis
Performs differential Gene expression Analysis.
@item dyebias
Methods to correct for gene-specific dye bias.
@item ecolitk
Metadata and tools to work with E. coli.
@item edd
Expression density diagnostics: graphical methods and pattern
recognition algorithms for distribution shape classification.
@item exonmap
High level analysis of Affymetrix exon array data.
@item explorase
GUI for exploratory data analysis of systems biology data.
@item externalVector
Vector objects for R with external storage.
@item factDesign
A set of tools for analyzing data from factorial designed microarray
experiments.  The functions can be used to evaluate appropriate tests of
contrast and perform single outlier detection.
@item fbat
Family Based Association Tests for genetic data.
@item fdrame
FDR Adjustments of Microarray Experiments (FDR-AME).
@item flagme
Analysis of metabolomics GC/MS data.
@item flowClust
Clustering for flow cytometry.
@item flowCore
Basic structures for flow cytometry data.
@item flowFlowJo
Tools for extracting information from a FlowJo workspace and working 
with the data in the @strong{flowCore} paradigm.
@item flowQ
Qualitiy control for flow cytometry.
@item flowStats
Statistical methods for the analysis of flow cytometry data.
@item flowUtils
Utilities for flow cytometry.
@item flowViz
Visualization for flow cytometry.
@item gaga
GaGa hierarchical model for microarray data analysis.
@item gaggle
Broadcast data between R and Java bioinformatics programs.
@item gcrma
Background adjustment using sequence information.
@item genArise
A tool for dual color microarray data.
@item gene2pathway
Prediction of KEGG pathway membership for individual genes based on
InterPro domain signatures.
@item geneRecommender
A gene recommender algorithm to identify genes coexpressed with a query
set of genes.
@item genefilter
Tools for sequentially filtering genes using a wide variety of filtering
functions.  Example of filters include: number of missing value,
coefficient of variation of expression measures, ANOVA @math{p}-value,
Cox model @math{p}-values.  Sequential application of filtering
functions to genes.
@item geneplotter
Graphical tools for genomic data, for example for plotting expression
data along a chromosome or producing color images of expression data
matrices.
@item genomeIntervals
Operations on genomic intervals.
@item globaltest
Testing globally whether a group of genes is significantly related to
some clinical variable of interest.
@item goProfiles
Statistical analysis of functional profiles.
@item goTools
Functions for description/comparison of oligo ID list using the Gene
Ontology database.
@item gpls
Classification using generalized partial least squares for two-group and
multi-group classification.
@item graph
Classes and tools for creating and manipulating graphs within R.
@item hexbin
Binning functions, in particular hexagonal bins for graphing.
@item hopach
Hierarchical Ordered Partitioning and Collapsing Hybrid (HOPACH).
@item hypergraph
Capabilities for representing and manipulating hypergraphs.
@c Retired from Bioconductor as of 2.2 release.
@c @item iSNetwork
@c Interactive network plots.
@c Retired from Bioconductor as of 2.2 release.
@c @item iSPlot
@c Link views that are based on the same data set.
@item idiogram
Plotting genomic data by chromosomal location.
@item impute
Imputation for microarray data (currently KNN only).
@item keggorth
Graph support for KO, KEGG Orthology.
@item lapmix
Laplace mixture model in microarray experiments.
@item limma
Linear models for microarray data.
@item limmaGUI
Graphical User Interface for package @strong{limma}.
@item logicFS
Identification of SNP interactions.
@item lumi
BeadArray specific methods for Illumina microarrays.
@item maCorrPlot
Visualize artificial correlation in microarray data.
@item maDB
Microarray database and utility functions for microarray analysis.
@item maSigPro
Significant gene expression profile differeneces in time course
microarray data.
@item maanova
Tools for analyzing micro array experiments.
@item macat
MicroArray Chromosome Analysis Tool.
@item made4
Multivariate analysis of microarray data using ADE4.
@item maigesPack
Functions to handle cDNA microarray data, including several methods of
data analysis.
@item makePlatformDesign
Creates the Platform Design environments (PDenvs) required by
@strong{oligo}.
@item makecdfenv
Two functions.  One reads a Affymetrix chip description file (CDF) and
creates a hash table environment containing the location/probe set
membership mapping.  The other creates a package that automatically loads
that environment. 
@item marray
Exploratory analysis for two-color spotted microarray data.
@item matchprobes
Tools for sequence matching of probes on arrays.
@item mdqc
Mahalanobis Distance Quality Control for microarrays.
@item metaArray
Integration of microarray data for meta-analysis.
@item metahdep
Hierarchical dependence in meta-analysis.
@item multtest
Multiple testing procedures for controlling the family-wise error rate
(FWER) and the false discovery rate (FDR).  Tests can be based on
@math{t}- or @math{F}-statistics for one- and two-factor designs, and
permutation procedures are available to estimate adjusted
@math{p}-values.
@item nem
Nested Effects Models to reconstruct phenotypic hierarchies.
@item nnNorm
Spatial and intensity based normalization of cDNA microarray data based
on robust neural nets.
@item nudge
Normal Uniform Differential Gene Expression detection.
@item occugene
Functions for multinomial occupancy distribution.
@item oligo
Oligonucleotide arrays.
@item oligoClasses
Classes for high-throughput SNP arrays.
@item oneChannelGUI
Extend the capabilities of @strong{affylmGUI}.
@item ontoTools
Graphs and sparse matrices for working with ontologies; formal objects
for nomenclatures with provenance management.
@item pamr
@c CRAN
Pam: Prediction Analysis for Microarrays.
@item panp
Presence-Absence calls from Negative strand matching Probesets.
@item pathRender
Render molecular pathways.
@item pcaMethods
A collection of PCA methods.
@item pcot2
Principal coordinates and Hotelling's T-square method.
@item pdInfoBuilder
Platform design information package builder.
@item pdmclass
CLASSification of microarray samples using Penalized Discriminant
Methods.
@item pgUtils
Utility functions for PostgreSQL databases.
@item pickgene
Adaptive gene picking for microarray expression data analysis.
@item pkgDepTools
Package dependency tools.
@item plgem
Power Law Global Error Model.
@item plier
Implements the Affymetrix PLIER (Probe Logarithmic Error Intensity
Estimate) algorithm.
@item plw
Probe level Locally moderated Weighted @math{t}-tests.
@item ppiStats
Protein-Protein Interaction Statistical package.
@item prada
Tools for analyzing and navigating data from high-throughput phenotyping
experiments based on cellular assays and fluorescent detection.
@item preprocessCore
A collection of pre-processing functions.
@item puma
Propagating Uncertainty in Microarray Analysis.
@item qpcrNorm
Data-driven normalization strategies for high-throughput qPCR data.
@item qpgraph
Reverse engineering of molecular regulatory networks with qp-graphs.
@item quantsmooth
Quantile smoothing and genomic visualization of array data.
@item qvalue
Q-value estimation for false discovery rate control.
@item rHVDM
Hidden Variable Dynamic Modeling.
@item rMAT
R implementation from MAT program to normalize and analyze tiling arrays 
and ChIP-chip data.
@item rama
Robust Analysis of MicroArrays: robust estimation of cDNA microarray
intensities with replicates using a Bayesian hierarchical model.
@item rbsurv
Robust likelihood-based survival modeling with microarray data.
@item reb
Regional Expression Biases.
@item rflowcyt
Statistical tools and data structures for analytic flow cytometry.
@item rsbml
R support for SBML, using libsbml.
@item rtracklayer
R interface to genome browsers and their annotation tracks.
@item safe
Significance Analysis of Function and Expression.
@item sagenhaft
Functions for reading and comparing SAGE (Serial Analysis of Gene
Expression) libraries.
@item seqLogo
Sequence logos for DNA sequence alignments.
@item sigPathway
Pathway analysis.
@item siggenes
Identifying differentially expressed genes and estimating the False
Discovery Rate (FDR) with both the Significance Analysis of Microarrays
(SAM) and the Empirical Bayes Analyses of Microarrays (EBAM).
@item simpleaffy
Very simple high level analysis of Affymetrix data.
@item simulatorAPMS
Computationally simulates the AP-MS technology.
@item sizepower
Sample size and power calculation in microrarray studies.
@item snapCGH
Segmentation, normalization and processing of aCGH data.
@item snpMatrix
The snp.matrix and X.snp.matrix classes.
@item spikeLI
Affymetrix Spike-in Langmuir Isotherm data analysis tool.
@item spkTools
Methods for spike-in arrays.
@item splicegear
A set of tools to work with alternative splicing.
@item splots
Visualization routines for high throughput screens.
@item spotSegmentation
Microarray spot segmentation and gridding for blocks of microarray
spots.
@item sscore
S-score algorithm for Affymetrix oligonucleotide microarrays.
@item ssize
Estimate microarry sample size.
@item stam
STructured Analysis of Microarray data.
@item stepNorm
Stepwise normalization functions for cDNA microarrays.
@item tilingArray
Analysis of tiling arrays.
@item timecourse
Statistical analysis for developmental microarray time course data.
@item tkWidgets
Widgets in Tcl/Tk that provide functionality for Bioconductor packages.
@item topGO
Enrichment analysis for Gene Ontology.
@item tspair
Top scoring pairs for microarray classification.
@item twilight
Estimation of local false discovery rate.
@item vbmp
Variational Bayesian Multinomial Probit regression.
@item vsn
Calibration and variance stabilizing transformations for both Affymetrix
and cDNA array data.
@item weaver
Tools and extensions for processing Sweave documents.
@item webbioc
Integrated web interface for doing microarray analysis using several of
the Bioconductor packages.
@item widgetInvoke
Evaluation widgets for functions.
@item widgetTools
Tools for creating Tcl/Tk widgets, i.e., small-scale graphical user
interfaces.
@item xcms
LC/MS and GC/MS data analysis: framework for processing and
visualization of chromatographically separated mass spectral data.
@item xps
Methods for processing and analysis of Affymetrix Oligonucleotide
Arrays.
@item yaqcaffy
Affymetrix expression data quality control and reproducibility
analysis.
@end table

@c These packages will eventually also be made available via @CRAN{}
@c as well.

@node Other add-on packages,  , Add-on packages from Bioconductor, Which add-on packages exist for R?
@subsection Other add-on packages

@email{jlindsey@@gen.unimaas.nl, Jim Lindsey} has written a collection
of R packages for nonlinear regression and repeated measurements,
consisting of @strong{event} (event history procedures and models),
@strong{gnlm} (generalized nonlinear regression models), @strong{growth}
(multivariate normal and elliptically-contoured repeated measurements
models), @strong{repeated} (non-normal repeated measurements models),
@strong{rmutil} (utilities for nonlinear regression and repeated
measurements), and @strong{stable} (probability functions and
generalized regression models for stable distributions).  All analyses
in the new edition of his book ``Models for Repeated Measurements''
(1999, Oxford University Press) were carried out using these packages.
Jim has also started @strong{dna}, a package with procedures for the
analysis of DNA sequences.  Jim's packages can be obtained from
@url{http://popgen.unimaas.nl/~jlindsey/rcode.html}.

More code has been posted to the R-help mailing list, and can be
obtained from the mailing list archive.

@node How can add-on packages be installed?, How can add-on packages be used?, Which add-on packages exist for R?, R Add-On Packages
@section How can add-on packages be installed?

(Unix 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.  Provided that
@command{tar} and @command{gzip} are available on your system, type

@example
$ R CMD INSTALL /path/to/@var{pkg}_@var{version}.tar.gz
@end example

@noindent
at the shell prompt to install to the library tree rooted at the first
directory in your library search path (see the help page for
@code{.libPaths()} for details on how the search path is determined).

To install to another tree (e.g., your private one), use

@example
$ R CMD INSTALL -l @var{lib} /path/to/@var{pkg}_@var{version}.tar.gz
@end example

@noindent
where @var{lib} gives the path to the library tree to install to.

Even more conveniently, you can install and automatically update
packages from within R if you have access to repositories such as
@CRAN{}.  See the help page for @code{available.packages()} for more
information.

@c <COMMENT>
@c This is really no longer quite accurate (R_LIBS_USER is preferred to
@c R_LIBS), and described in ?libPaths anyways ... hence comment out.
@c You can use several library trees of add-on packages.  The easiest way
@c to tell R to use these is via the environment variable @env{R_LIBS}
@c which should be a colon-separated list of directories at which R library
@c trees are rooted.  You do not have to specify the default tree in
@c @env{R_LIBS}.  E.g., to use a private tree in @file{$HOME/lib/R} and a
@c public site-wide tree in @file{/usr/local/lib/R-contrib}, put

@c @example
@c R_LIBS="$HOME/lib/R:/usr/local/lib/R-contrib"; export R_LIBS
@c @end example

@c @noindent
@c into your (Bourne) shell profile or even preferably, add the line

@c @example
@c R_LIBS="~/lib/R:/usr/local/lib/R-contrib"
@c @end example

@c @noindent
@c your environment (e.g., @file{~/.Renviron}) file.  (Note that no
@c @code{export} statement is needed or allowed in this file; see the
@c on-line help for @code{Startup} for more information.)

@node How can add-on packages be used?, How can add-on packages be removed?, How can add-on packages be installed?, R Add-On Packages
@section How can add-on packages be used?

To find out which additional packages are available on your system, type

@example
library()
@end example

@noindent
at the R prompt.  

This produces something like

@quotation
@cartouche
@smallexample
Packages in `/home/me/lib/R':

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
Matrix        Sparse and Dense Matrix Classes and Methods
base          The R Base package
boot          Bootstrap R (S-Plus) Functions (Canty)
class         Functions for Classification
cluster       Functions for clustering (by 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,
              dBase, ...
grDevices     The R Graphics Devices and Support for Colours and Fonts
graphics      The R Graphics Package
grid          The Grid Graphics Package
lattice       Lattice Graphics
methods       Formal Methods and Classes
mgcv          GAMs with GCV/AIC/REML smoothness estimation and GAMMs
              by PQL
nlme          Linear and Nonlinear Mixed Effects Models
nnet          Feed-forward Neural Networks and Multinomial Log-Linear
              Models
rpart         Recursive Partitioning
spatial       Functions for Kriging and Point Pattern Analysis
splines       Regression Spline Functions and Classes
stats         The R Stats Package
stats4        Statistical functions using S4 Classes
survival      Survival analysis, including penalised likelihood
tcltk         Tcl/Tk Interface
tools         Tools for Package Development
utils         The R Utils Package
@end smallexample
@end cartouche
@end quotation

You can ``load'' the installed package @var{pkg} by

@example
library(@var{pkg})
@end example

You can then find out which functions it provides by typing one of

@example
library(help = @var{pkg})
help(package = @var{pkg})
@end example

You can unload the loaded package @var{pkg} by

@example
detach("package:@var{pkg}")
@end example

@node How can add-on packages be removed?, How can I create an R package?, How can add-on packages be used?, R Add-On Packages
@section How can add-on packages be removed?

Use

@example
$ R CMD REMOVE @var{pkg_1} @dots{} @var{pkg_n}
@end example

@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.)

To remove from library @var{lib}, do

@example
$ R CMD REMOVE -l @var{lib} @var{pkg_1} @dots{} @var{pkg_n}
@end example

@node How can I create an R package?, How can I contribute to R?, How can add-on packages be removed?, R Add-On Packages
@section How can I create an R package?

A package consists of a subdirectory containing the files
@file{DESCRIPTION} and @file{INDEX}, and the subdirectories @file{R},
@file{data}, @file{demo}, @file{exec}, @file{inst}, @file{man},
@file{src}, and @file{tests} (some of which can be missing).  Optionally
the package can also contain script files @file{configure} and
@file{cleanup} which are executed before and after installation.

@ifclear UseExternalXrefs
See section ``Creating R packages'' in @cite{Writing R Extensions}, for
details.  This manual is included in the R distribution, @pxref{What
documentation exists for R?}, and gives information on package
structure, the configure and cleanup mechanisms, and on automated
package checking and building.
@end ifclear
@ifset UseExternalXrefs
@xref{Creating R packages, , Creating R packages, R-exts, Writing R
Extensions}, for details.
@end ifset

R version 1.3.0 has added the function @code{package.skeleton()} which
will set up directories, save data and code, and create skeleton help
files for a set of R functions and datasets.

@xref{What is CRAN?}, for information on uploading a package to @CRAN{}.

@node How can I contribute to R?,  , How can I create an R package?, R Add-On Packages
@section How can I contribute to R?

R is in active development and there is always a risk of bugs creeping
in.  Also, the developers do not have access to all possible machines
capable of running R.  So, simply using it and communicating problems is
certainly of great value.

One place where functionality is still missing is the modeling software
as described in ``Statistical Models in S'' (see @ref{What is S?}); some
of the nonlinear modeling code is not there yet.

The @url{http://developer.R-project.org/, R Developer Page} acts as an
intermediate repository for more or less finalized ideas and plans for
the R statistical system.  It contains (pointers to) TODO lists, RFCs,
various other writeups, ideas lists, and CVS miscellanea.

Many (more) of the packages available at the Statlib S Repository might
be worth porting to R.

If you are interested in working on any of these projects, please notify
@email{Kurt.Hornik@@R-project.org, Kurt Hornik}.

@node R and Emacs, R Miscellanea, R Add-On Packages, Top
@chapter R and Emacs

@menu
* Is there Emacs support for R?::  
* Should I run R from within Emacs?::  
* Debugging R from within Emacs::  
@end menu

@node Is there Emacs support for R?, Should I run R from within Emacs?, R and Emacs, R and Emacs
@section Is there Emacs support for R?

There is an Emacs package called @acronym{ESS} (``Emacs Speaks
Statistics'') which provides a standard interface between statistical
programs and statistical processes.  It is intended to provide
assistance for interactive statistical programming and data analysis.
Languages supported include: S dialects (R, S 3/4, and @SPLUS{}
3.x/4.x/5.x/6.x/7.x), LispStat dialects (XLispStat, ViSta), SAS, Stata,
and BUGS.

@acronym{ESS} grew out of the need for bug fixes and extensions to
S-mode 4.8 (which was a @acronym{GNU} Emacs interface to S/@SPLUS{}
version 3 only).  The current set of developers desired support for
XEmacs, R, S4, and MS Windows.  In addition, with new modes being
developed for R, Stata, and SAS, it was felt that a unifying interface
and framework for the user interface would benefit both the user and the
developer, by helping both groups conform to standard Emacs usage.  The
end result is an increase in efficiency for statistical programming and
data analysis, over the usual tools.

R support contains code for editing R source code (syntactic indentation
and highlighting of source code, partial evaluations of code, loading
and error-checking of code, and source code revision maintenance) and
documentation (syntactic indentation and highlighting of source code,
sending examples to running @acronym{ESS} process, and previewing),
interacting with an inferior R process from within Emacs (command-line
editing, searchable command history, command-line completion of R object
and file names, quick access to object and search lists, transcript
recording, and an interface to the help system), and transcript
manipulation (recording and saving transcript files, manipulating and
editing saved transcripts, and re-evaluating commands from transcript
files).

The latest stable version of @acronym{ESS} are available via @CRAN{} or
the @url{http://ESS.R-project.org/, ESS web page}.  The @HTML{} version
of the documentation can be found at @url{http://stat.ethz.ch/ESS/}.

@acronym{ESS} comes with detailed installation instructions.

For help with @acronym{ESS}, send email to
@email{ESS-help@@stat.math.ethz.ch}.

Please send bug reports and suggestions on @acronym{ESS} to
@email{ESS-bugs@@stat.math.ethz.ch}.  The easiest way to do this from is
within Emacs by typing @kbd{M-x ess-submit-bug-report} or using the
[ESS] or [iESS] pulldown menus.

@node Should I run R from within Emacs?, Debugging R from within Emacs, Is there Emacs support for R?, R and Emacs
@section Should I run R from within Emacs?

Yes, @emph{definitely}.  Inferior R mode provides a readline/history
mechanism, object name completion, and syntax-based highlighting of the
interaction buffer using Font Lock mode, as well as a very convenient
interface to the R help system.

Of course, it also integrates nicely with the mechanisms for editing R
source using Emacs.  One can write code in one Emacs buffer and send
whole or parts of it for execution to R; this is helpful for both data
analysis and programming.  One can also seamlessly integrate with a
revision control system, in order to maintain a log of changes in your
programs and data, as well as to allow for the retrieval of past
versions of the code.

In addition, it allows you to keep a record of your session, which can
also be used for error recovery through the use of the transcript mode.

To specify command line arguments for the inferior R process, use
@kbd{C-u M-x R} for starting R.

@c This prompts you for the arguments; in particular, you can increase
@c the memory size this way (@pxref{Why does R run out of memory?}).

@node Debugging R from within Emacs,  , Should I run R from within Emacs?, R and Emacs
@section Debugging R from within Emacs

To debug R ``from within Emacs'', there are several possibilities.  To
use the Emacs GUD (Grand Unified Debugger) library with the recommended
debugger GDB, type @kbd{M-x gdb} and give the path to the R
@emph{binary} as argument.  At the @command{gdb} prompt, set
@env{R_HOME} and other environment variables as needed (using e.g.@:
@kbd{set env R_HOME /path/to/R/}, but see also below), and start the
binary with the desired arguments (e.g., @kbd{run --quiet}).

If you have @acronym{ESS}, you can do @kbd{C-u M-x R @key{RET} - d
@key{SPC} g d b @key{RET}} to start an inferior R process with arguments
@option{-d gdb}.

A third option is to start an inferior R process via @acronym{ESS}
(@kbd{M-x R}) and then start GUD (@kbd{M-x gdb}) giving the R binary
(using its full path name) as the program to debug.  Use the program
@command{ps} to find the process number of the currently running R
process then use the @code{attach} command in gdb to attach it to that
process.  One advantage of this method is that you have separate
@code{*R*} and @code{*gud-gdb*} windows.  Within the @code{*R*} window
you have all the @acronym{ESS} facilities, such as object-name
completion, that we know and love.

When using GUD mode for debugging from within Emacs, you may find it
most convenient to use the directory with your code in it as the current
working directory and then make a symbolic link from that directory to
the R binary.  That way @file{.gdbinit} can stay in the directory with
the code and be used to set up the environment and the search paths for
the source, e.g.@: as follows:

@example
set env R_HOME /opt/R
set env R_PAPERSIZE letter
set env R_PRINTCMD lpr
dir /opt/R/src/appl
dir /opt/R/src/main
dir /opt/R/src/nmath
dir /opt/R/src/unix
@end example

@node R Miscellanea, R Programming, R and Emacs, Top
@chapter R Miscellanea

@menu
* How can I set components of a list to NULL?::  
* How can I save my workspace?::  
* How can I clean up my workspace?::  
* How can I get eval() and D() to work?::  
* Why do my matrices lose dimensions?::  
* How does autoloading work?::  
* How should I set options?::   
* How do file names work in Windows?::  
* Why does plotting give a color allocation error?::  
* How do I convert factors to numeric?::  
* Are Trellis displays implemented in R?::  
* What are the enclosing and parent environments?::  
* How can I substitute into a plot label?::  
* What are valid names?::       
* Are GAMs implemented in R?::  
* Why is the output not printed when I source() a file?::  
* Why does outer() behave strangely with my function?::  
* Why does the output from anova() depend on the order of factors in the model?::  
* How do I produce PNG graphics in batch mode?::  
* How can I get command line editing to work?::  
* How can I turn a string into a variable?::  
* Why do lattice/trellis graphics not work?::  
* How can I sort the rows of a data frame?::  
* Why does the help.start() search engine not work?::  
* Why did my .Rprofile stop working when I updated R?::  
* Where have all the methods gone?::  
* How can I create rotated axis labels?::  
* Why is read.table() so inefficient?::  
* What is the difference between package and library?::  
* I installed a package but the functions are not there::  
* Why doesn't R think these numbers are equal?::  
* How can I capture or ignore errors in a long simulation?::  
* Why are powers of negative numbers wrong?::  
* How can I save the result of each iteration in a loop into a separate file?::  
* Why are p-values not displayed when using lmer()?::  
* Why are there unwanted borders::  
* Why does backslash behave strangely inside strings?::  
@end menu

@c @node Why does R run out of memory?, Why does sourcing a correct file fail?, R Miscellanea, R Miscellanea
@c @section Why does R run out of memory?

@c Versions of R prior to 1.2.0 used a @emph{static} memory model.  At
@c startup, R asked the operating system to reserve a fixed amount of
@c memory for it.  The size of this chunk could not be changed
@c subsequently.  Hence, it could happen that not enough memory was
@c allocated, e.g., when trying to read large data sets into R.  In such
@c cases, it was necessary to restart R with more memory available, as
@c controlled by the command line options @option{--nsize} and
@c @option{--vsize}.

@c R version 1.2.0 introduces a new ``generational'' garbage collector,
@c which will increase the memory available to R as needed.  Hence, user
@c intervention is no longer necessary for ensuring that enough memory is
@c available.

@c The new garbage collector does not move objects in memory, meaning that
@c it is possible for the free memory to become fragmented so that large
@c objects cannot be allocated even when there is apparently enough memory
@c for them.

@c @node Why does sourcing a correct file fail?, How can I set components of a list to NULL?, Why does R run out of memory?, R Miscellanea
@c @section Why does sourcing a correct file fail?

@c Versions of R prior to 1.2.1 may have had problems parsing files not
@c ending in a newline.  Earlier R versions had a similar problem when
@c reading in data files.  This should no longer happen.

@node How can I set components of a list to NULL?, How can I save my workspace?, R Miscellanea, R Miscellanea
@section How can I set components of a list to NULL?

You can use

@example
x[i] <- list(NULL)
@end example

@noindent
to set component @code{i} of the list @code{x} to @code{NULL}, similarly
for named components.  Do not set @code{x[i]} or @code{x[[i]]} to
@code{NULL}, because this will remove the corresponding component from
the list.

For dropping the row names of a matrix @code{x}, it may be easier to use
@code{rownames(x) <- NULL}, similarly for column names.

@node How can I save my workspace?, How can I clean up my workspace?, How can I set components of a list to NULL?, R Miscellanea
@section How can I save my workspace?

@code{save.image()} saves the objects in the user's @code{.GlobalEnv} to
the file @file{.RData} in the R startup directory.  (This is also what
happens after @kbd{q("yes")}.)  Using @code{save.image(@var{file})} one
can save the image under a different name.

@node How can I clean up my workspace?, How can I get eval() and D() to work?, How can I save my workspace?, R Miscellanea
@section How can I clean up my workspace?

To remove all objects in the currently active environment (typically
@code{.GlobalEnv}), you can do

@example
rm(list = ls(all = TRUE))
@end example

@noindent
(Without @option{all = TRUE}, only the objects with names not starting
with a @samp{.} are removed.)

@node How can I get eval() and D() to work?, Why do my matrices lose dimensions?, How can I clean up my workspace?, R Miscellanea
@section How can I get eval() and D() to work?

Strange things will happen if you use @code{eval(print(x), envir = e)}
or @code{D(x^2, "x")}.  The first one will either tell you that
"@code{x}" is not found, or print the value of the wrong @code{x}.
The other one will likely return zero if @code{x} exists, and an error
otherwise.

This is because in both cases, the first argument is evaluated in the
calling environment first.  The result (which should be an object of
mode @code{"expression"} or @code{"call"}) is then evaluated or
differentiated.  What you (most likely) really want is obtained by
``quoting'' the first argument upon surrounding it with
@code{expression()}.  For example,

@example
R> D(expression(x^2), "x")
2 * x
@end example

Although this behavior may initially seem to be rather strange, is
perfectly logical.  The ``intuitive'' behavior could easily be
implemented, but problems would arise whenever the expression is
contained in a variable, passed as a parameter, or is the result of a
function call.  Consider for instance the semantics in cases like

@example
D2 <- function(e, n) D(D(e, n), n)
@end example

@noindent
or

@example
g <- function(y) eval(substitute(y), sys.frame(sys.parent(n = 2)))
g(a * b)
@end example

See the help page for @code{deriv()} for more examples.

@node Why do my matrices lose dimensions?, How does autoloading work?, How can I get eval() and D() to work?, R Miscellanea
@section Why do my matrices lose dimensions?

When a matrix with a single row or column is created by a subscripting
operation, e.g., @code{row <- mat[2, ]}, it is by default turned into a
vector.  In a similar way if an array with dimension, say, @w{2 x 3 x 1
x 4} is created by subscripting it will be coerced into a @w{2 x 3 x 4}
array, losing the unnecessary dimension.  After much discussion this has
been determined to be a @emph{feature}.

To prevent this happening, add the option @option{drop = FALSE} to the
subscripting.  For example,

@example
rowmatrix <- mat[2, , drop = FALSE]  # @r{creates a row matrix}
colmatrix <- mat[, 2, drop = FALSE]  # @r{creates a column matrix}
a <- b[1, 1, 1, drop = FALSE]        # @r{creates a 1 x 1 x 1 array}
@end example

The @option{drop = FALSE} option should be used defensively when
programming.  For example, the statement

@example
somerows <- mat[index, ]
@end example

@noindent
will return a vector rather than a matrix if @code{index} happens to
have length 1, causing errors later in the code.  It should probably be
rewritten as

@example
somerows <- mat[index, , drop = FALSE]
@end example

@node How does autoloading work?, How should I set options?, Why do my matrices lose dimensions?, R Miscellanea
@section How does autoloading work?

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
containing it, stores some information in this environment.  When R
tries to evaluate @var{name}, it loads the corresponding package
@var{pkg} and reevaluates @var{name} in the new package's
environment.

Using this mechanism makes R behave as if the package was loaded, but
does not occupy memory (yet).

See the help page for @code{autoload()} for a very nice example.

@node How should I set options?, How do file names work in Windows?, How does autoloading work?, R Miscellanea
@section How should I set options?

The function @code{options()} allows setting and examining a variety of
global ``options'' which affect the way in which R computes and displays
its results.  The variable @code{.Options} holds the current values of
these options, but should never directly be assigned to unless you want
to drive yourself crazy---simply pretend that it is a ``read-only''
variable.

For example, given

@example
test1 <- function(x = pi, dig = 3) @{
  oo <- options(digits = dig); on.exit(options(oo));
  cat(.Options$digits, x, "\n")
@}
test2 <- function(x = pi, dig = 3) @{
  .Options$digits <- dig
  cat(.Options$digits, x, "\n")
@}
@end example

@noindent
we obtain:

@example
R> test1()
3 3.14 
R> test2()
3 3.141593
@end example

What is really used is the @emph{global} value of @code{.Options}, and
using @kbd{options(OPT = VAL)} correctly updates it.  Local copies of
@code{.Options}, either in @code{.GlobalEnv} or in a function
environment (frame), are just silently disregarded.

@node How do file names work in Windows?, Why does plotting give a color allocation error?, How should I set options?, R Miscellanea
@section How do file names work in Windows?

As R uses C-style string handling, @samp{\} is treated as an escape
character, so that for example one can enter a newline as @samp{\n}.
When you really need a @samp{\}, you have to escape it with another
@samp{\}.

Thus, in filenames use something like @code{"c:\\data\\money.dat"}.  You
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?

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.

You could also set the @code{colortype} of @code{X11()} to
@code{"pseudo.cube"} rather than the default @code{"pseudo"}.  See the
help page for @code{X11()} for more information.

@c  @node Is R Y2K-compliant?, How do I convert factors to numeric?, Why does plotting give a color allocation error?, R Miscellanea
@c  @section Is R Y2K-compliant?

@c  We expect R to be Y2K compliant when compiled and run on a Y2K compliant
@c  system.  In particular R does not internally represent or manipulate
@c  dates as two-digit quantities.  However, no guarantee of Y2K compliance
@c  is provided for R.  R is free software and comes with @emph{no warranty
@c  whatsoever}.

@c  R, like any other programming language, can be used to write programs
@c  and manipulate data in ways that are not Y2K compliant.

@node How do I convert factors to numeric?, Are Trellis displays implemented in R?, Why does plotting give a color allocation error?, R Miscellanea
@section How do I convert factors to numeric?

It may happen that when reading numeric data into R (usually, when
reading in a file), they come in as factors.  If @code{f} is such a
factor object, you can use

@example
as.numeric(as.character(f))
@end example

@noindent
to get the numbers back.  More efficient, but harder to remember, is

@example
as.numeric(levels(f))[as.integer(f)]
@end example

In any case, do not call @code{as.numeric()} or their likes directly for
the task at hand (as @code{as.numeric()} or @code{unclass()} give the
internal codes).

@node Are Trellis displays implemented in R?, What are the enclosing and parent environments?, How do I convert factors to numeric?, R Miscellanea
@section Are Trellis displays implemented in R?

The recommended package @strong{lattice} (which is based on another
recommended package, @strong{grid}) provides graphical functionality
that is compatible with most Trellis commands.

You could also look at @code{coplot()} and @code{dotchart()} which might
do at least some of what you want.  Note also that the R version of
@code{pairs()} is fairly general and provides most of the functionality
of @code{splom()}, and that R's default plot method has an argument
@code{asp} allowing to specify (and fix against device resizing) the
aspect ratio of the plot.

(Because the word ``Trellis'' has been claimed as a trademark we do not
use it in R.  The name ``lattice'' has been chosen for the R
equivalent.)

@node What are the enclosing and parent environments?, How can I substitute into a plot label?, Are Trellis displays implemented in R?, R Miscellanea
@section What are the enclosing and parent environments?

Inside a function you may want to access variables in two additional
environments: the one that the function was defined in (``enclosing''),
and the one it was invoked in (``parent'').

If you create a function at the command line or load it in a package its
enclosing environment is the global workspace.  If you define a function
@code{f()} inside another function @code{g()} its enclosing environment
is the environment inside @code{g()}.  The enclosing environment for a
function is fixed when the function is created.  You can find out the
enclosing environment for a function @code{f()} using
@code{environment(f)}.

The ``parent'' environment, on the other hand, is defined when you
invoke a function.  If you invoke @code{lm()} at the command line its
parent environment is the global workspace, if you invoke it inside a
function @code{f()} then its parent environment is the environment
inside @code{f()}.  You can find out the parent environment for an
invocation of a function by using @code{parent.frame()} or
@code{sys.frame(sys.parent())}.

So for most user-visible functions the enclosing environment will be the
global workspace, since that is where most functions are defined.  The
parent environment will be wherever the function happens to be called
from.  If a function @code{f()} is defined inside another function
@code{g()} it will probably be used inside @code{g()} as well, so its
parent environment and enclosing environment will probably be the same.

Parent environments are important because things like model formulas
need to be evaluated in the environment the function was called from,
since that's where all the variables will be available.  This relies on
the parent environment being potentially different with each invocation.

Enclosing environments are important because a function can use
variables in the enclosing environment to share information with other
functions or with other invocations of itself (see the section on
lexical scoping).  This relies on the enclosing environment being the
same each time the function is invoked.  (In C this would be done with
static variables.)

Scoping @emph{is} hard.  Looking at examples helps.  It is particularly
instructive to look at examples that work differently in R and S and try
to see why they differ.  One way to describe the scoping differences
between R and S is to say that in S the enclosing environment is
@emph{always} the global workspace, but in R the enclosing environment
is wherever the function was created.

@node How can I substitute into a plot label?, What are valid names?, What are the enclosing and parent environments?, R Miscellanea
@section How can I substitute into a plot label?

Often, it is desired to use the value of an R object in a plot label,
e.g., a title.  This is easily accomplished using @code{paste()} if the
label is a simple character string, but not always obvious in case the
label is an expression (for refined mathematical annotation).  In such a
case, either use @code{parse()} on your pasted character string or use
@code{substitute()} on an expression.  For example, if @code{ahat} is an
estimator of your parameter @math{a} of interest, use

@example
title(substitute(hat(a) == ahat, list(ahat = ahat)))
@end example

@noindent
(note that it is @samp{==} and not @samp{=}).  Sometimes @code{bquote()}
gives a more compact form, e.g.,

@example
title(bquote(hat(a) = .(ahat)))
@end example

@noindent
where subexpressions enclosed in @samp{.()} are replaced by their
values.

There are more worked examples in the mailing list achives.

@node What are valid names?, Are GAMs implemented in R?, How can I substitute into a plot label?, R Miscellanea
@section What are valid names?

When creating data frames using @code{data.frame()} or
@code{read.table()}, R by default ensures that the variable names are
syntactically valid.  (The argument @option{check.names} to these
functions controls whether variable names are checked and adjusted by
@code{make.names()} if needed.)

To understand what names are ``valid'', one needs to take into account
that the term ``name'' is used in several different (but related) ways
in the 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
version 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.
@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
of an assignment operation or as an argument to the @code{assign()}
function.  It is usually a syntactic name as well, but can be any
non-empty string if it is quoted (and it is always quoted in the call to
@code{assign()}).

@item
An @emph{argument name} is what appears to the left of the equals sign
when supplying an argument in a function call (for example,
@code{f(trim=.5)}).  Argument names are also usually syntactic names,
but again can be anything if they are quoted.

@item
An @emph{element name} is a string that identifies a piece of an object
(a component of a list, for example.)  When it is used on the right of
the @samp{$} operator, it must be a syntactic name, or quoted.
Otherwise, element names can be any strings.  (When an object is used as
a database, as in a call to @code{eval()} or @code{attach()}, the
element names become object names.)

@item
Finally, a @emph{file name} is a string identifying a file in the
operating system for reading, writing, etc.  It really has nothing much
to do with names in the language, but it is traditional to call these
strings file ``names''.
@end enumerate

@node Are GAMs implemented in R?, Why is the output not printed when I source() a file?, What are valid names?, R Miscellanea
@section Are GAMs implemented in R?

Package @strong{gam} from @CRAN{} implements all the Generalized
Additive Models (GAM) functionality as described in the GAM chapter of
the White Book.  In particular, it implements backfitting with both
local regression and smoothing splines, and is extendable.  There is a
@code{gam()} function for GAMs in package @strong{mgcv}, but it is not
an exact clone of what is described in the White Book (no @code{lo()}
for example).  Package @strong{gss} can fit spline-based GAMs too.  And
if you can accept regression splines you can use @code{glm()}.  For
gaussian GAMs you can use @code{bruto()} from package @strong{mda}.

@node Why is the output not printed when I source() a file?, Why does outer() behave strangely with my function?, Are GAMs implemented in R?, R Miscellanea
@section Why is the output not printed when I source() a file?

Most R commands do not generate any output. The command

@example
1+1
@end example

@noindent
computes the value 2 and returns it; the command

@example
summary(glm(y~x+z, family=binomial))
@end example

@noindent
fits a logistic regression model, computes some summary information and
returns an object of class @code{"summary.glm"} (@pxref{How should I
write summary methods?}).

If you type @samp{1+1} or @samp{summary(glm(y~x+z, family=binomial))} at
the command line the returned value is automatically printed (unless it
is @code{invisible()}), but in other circumstances, such as in a
@code{source()}d file or inside a function it isn't printed unless you
specifically print it.

To print the value use

@example
print(1+1)
@end example

@noindent
or

@example
print(summary(glm(y~x+z, family=binomial)))
@end example

@noindent
instead, or use @code{source(@var{file}, echo=TRUE)}.

@node Why does outer() behave strangely with my function?, Why does the output from anova() depend on the order of factors in the model?, Why is the output not printed when I source() a file?, R Miscellanea
@section Why does outer() behave strangely with my function?

As the help for @code{outer()} indicates, it does not work on arbitrary
functions the way the @code{apply()} family does.  It requires functions
that are vectorized to work elementwise on arrays.  As you can see by
looking at the code, @code{outer(x, y, FUN)} creates two large vectors
containing every possible combination of elements of @code{x} and
@code{y} and then passes this to @code{FUN} all at once.  Your function
probably cannot handle two large vectors as parameters.

If you have a function that cannot handle two vectors but can handle two
scalars, then you can still use @code{outer()} but you will need to wrap
your function up first, to simulate vectorized behavior.  Suppose your
function is

@example
foo <- function(x, y, happy) @{
  stopifnot(length(x) == 1, length(y) == 1) # scalars only!
  (x + y) * happy
@}
@end example

@noindent
If you define the general function

@example
wrapper <- function(x, y, my.fun, ...) @{
  sapply(seq(along = x), FUN = function(i) my.fun(x[i], y[i], ...))
@}
@end example

@noindent
then you can use @code{outer()} by writing, e.g.,

@example
outer(1:4, 1:2, FUN = wrapper, my.fun = foo, happy = 10)
@end example

@node Why does the output from anova() depend on the order of factors in the model?, How do I produce PNG graphics in batch mode?, Why does outer() behave strangely with my function?, R Miscellanea
@section Why does the output from anova() depend on the order of factors in the model?

In a model such as @code{~A+B+A:B}, R will report the difference in sums
of squares between the models @code{~1}, @code{~A}, @code{~A+B} and
@code{~A+B+A:B}.  If the model were @code{~B+A+A:B}, R would report
differences between @code{~1}, @code{~B}, @code{~A+B}, and
@code{~A+B+A:B} . In the first case the sum of squares for @code{A} is
comparing @code{~1} and @code{~A}, in the second case it is comparing
@code{~B} and @code{~B+A}.  In a non-orthogonal design (i.e., most
unbalanced designs) these comparisons are (conceptually and numerically)
different.

Some packages report instead the sums of squares based on comparing the
full model to the models with each factor removed one at a time (the
famous `Type III sums of squares' from SAS, for example).  These do not
depend on the order of factors in the model.  The question of which set
of sums of squares is the Right Thing provokes low-level holy wars on
R-help from time to time.

There is no need to be agitated about the particular sums of squares
that R reports.  You can compute your favorite sums of squares quite
easily.  Any two models can be compared with @code{anova(@var{model1},
@var{model2})}, and @code{drop1(@var{model1})} will show the sums of
squares resulting from dropping single terms.

@node How do I produce PNG graphics in batch mode?, How can I get command line editing to work?, Why does the output from anova() depend on the order of factors in the model?, R Miscellanea
@section How do I produce PNG graphics in batch mode?

Under a Unix-alike, if your installation supports the
@code{type="cairo"} option to the @code{png()} device there should be no
problems, and the default settings should just work.  This option is not
available for versions of R prior to 2.7.0, or without support for
cairo.  From R 2.7.0 @code{png()} by default uses the Quartz device
on Mac OS X, and that too works in batch mode.

Earlier versions of the @code{png()} device uses the X11 driver, which is 
a problem in batch mode or for remote operation.  If you have Ghostscript 
you can use @code{bitmap()}, which produces a PostScript or 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{http://www.x.org/Downloads.html, X.Org} (possibly as an optional 
install), which is an X11 server that does not require a screen; and there 
is the @strong{GDD} package from @CRAN{}, which produces 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?

The Unix command-line interface to R can only provide the inbuilt
command line editor which allows recall, editing and re-submission of
prior commands provided that the @acronym{GNU} readline library is
available at the time R is configured for compilation.  Note that the
`development' version of readline including the appropriate headers is
needed: users of Linux binary distributions will need to install
packages such as @code{libreadline-dev} (Debian) or
@code{readline-devel} (Red Hat).

@node How can I turn a string into a variable?, Why do lattice/trellis graphics not work?, How can I get command line editing to work?, R Miscellanea
@section How can I turn a string into a variable?

If you have

@example
varname <- c("a", "b", "d")
@end example

@noindent
you can do

@example
get(varname[1]) + 2
@end example

@noindent
for

@example
a + 2
@end example

@noindent
or

@example
assign(varname[1], 2 + 2)
@end example

@noindent
for

@example
a <- 2 + 2
@end example

@noindent
or

@example
eval(substitute(lm(y ~ x + variable),
                list(variable = as.name(varname[1]))))
@end example

@noindent
for

@example
lm(y ~ x + a)
@end example

At least in the first two cases it is often easier to just use a list,
and then you can easily index it by name

@example
vars <- list(a = 1:10, b = rnorm(100), d = LETTERS)
vars[["a"]]
@end example

@noindent
without any of this messing about.

@node Why do lattice/trellis graphics not work?, How can I sort the rows of a data frame?, How can I turn a string into a variable?, R Miscellanea
@section Why do lattice/trellis graphics not work?

The most likely reason is that you forgot to tell R to display the
graph.  Lattice functions such as @code{xyplot()} create a graph object,
but do not display it (the same is true of Trellis graphics in
@SPLUS{}).  The @code{print()} method for the graph object produces the
actual display.  When you use these functions interactively at the
command line, the result is automatically printed, but in
@code{source()} or inside your own functions you will need an explicit
@code{print()} statement.

@node How can I sort the rows of a data frame?, Why does the help.start() search engine not work?, Why do lattice/trellis graphics not work?, R Miscellanea
@section How can I sort the rows of a data frame?

To sort the rows within a data frame, with respect to the values in one
or more of the columns, simply use @code{order()} (e.g.,
@code{DF[order(DF$a, DF[["b"]]), ]} to sort the data frame @code{DF} on
columns named @code{a} and @code{b}).

@node Why does the help.start() search engine not work?, Why did my .Rprofile stop working when I updated R?, How can I sort the rows of a data frame?, R Miscellanea
@section Why does the help.start() search engine not work?

The browser-based search engine in @code{help.start()} utilizes a Java
applet.  In order for this to function properly, a compatible version of
Java must installed on your system and linked to your browser, and both
Java @emph{and} JavaScript need to be enabled in your browser.

There have been a number of compatibility issues with versions of Java
and of browsers.  
@ifclear UseExternalXrefs
For further details please consult section ``Enabling search in HTML
help'' in @cite{R Installation and Administration}.  This manual is
included in the R distribution, @pxref{What documentation exists for
R?}, and its @acronym{HTML} version is linked from the @acronym{HTML}
search page.
@end ifclear
@ifset UseExternalXrefs
@xref{Enabling search in HTML help, , Enabling search in HTML help,
R-admin, R Installation and Administration}, for further details.
@end ifset

@node Why did my .Rprofile stop working when I updated R?, Where have all the methods gone?, Why does the help.start() search engine not work?, R Miscellanea
@section Why did my .Rprofile stop working when I updated R?

Did you read the @file{NEWS} file?  For functions that are not in the
@strong{base} package you need to specify the correct package namespace,
since the code will be run @emph{before} the packages are loaded.  E.g.,

@example
ps.options(horizontal = FALSE)
help.start()
@end example

@noindent
needs to be

@example
grDevices::ps.options(horizontal = FALSE)
utils::help.start()
@end example

@c <FIXME>
@c 3.0.0
@noindent
(@code{graphics::ps.options(horizontal = FALSE)} in R 1.9.x).
@c </FIXME>

@node Where have all the methods gone?, How can I create rotated axis labels?, Why did my .Rprofile stop working when I updated R?, R Miscellanea
@section Where have all the methods gone?

Many functions, particularly S3 methods, are now hidden in namespaces.
This has the advantage that they cannot be called inadvertently with
arguments of the wrong class, but it makes them harder to view.

To see the code for an S3 method (e.g., @code{[.terms}) use

@example
getS3method("[", "terms")
@end example

@noindent
To see the code for an unexported function @code{foo()} in the namespace
of package @code{"bar"} use @code{bar:::foo}.  Don't use these
constructions to call unexported functions in your own code---they are
probably unexported for a reason and may change without warning.

@node How can I create rotated axis labels?, Why is read.table() so inefficient?, Where have all the methods gone?, R Miscellanea
@section How can I create rotated axis labels?

To rotate axis labels (using base graphics), you need to use
@code{text()}, rather than @code{mtext()}, as the latter does not
support @code{par("srt")}.

@example
## @r{Increase bottom margin to make room for rotated labels}
par(mar = c(7, 4, 4, 2) + 0.1)
## @r{Create plot with no x axis and no x axis label}
plot(1 : 8, xaxt = "n",  xlab = "")
## @r{Set up x axis with tick marks alone}
axis(1, labels = FALSE)
## @r{Create some text labels}
labels <- paste("Label", 1:8, sep = " ")
## @r{Plot x axis labels at default tick marks}
text(1:8, par("usr")[3] - 0.25, srt = 45, adj = 1,
     labels = labels, xpd = TRUE)
## @r{Plot x axis label at line 6 (of 7)}
mtext(1, text = "X Axis Label", line = 6)
@end example

@noindent
When plotting the x axis labels, we use @code{srt = 45} for text
rotation angle, @code{adj = 1} to place the right end of text at the
tick marks, and @code{xpd = TRUE} to allow for text outside the plot
region.  You can adjust the value of the @code{0.25} offset as required
to move the axis labels up or down relative to the x axis.  See
@code{?par} for more information.

Also see Figure 1 and associated code in Paul Murrell (2003),
``Integrating grid Graphics Output with Base Graphics Output'',
@emph{R News}, @strong{3/2}, 7--12.

@node Why is read.table() so inefficient?, What is the difference between package and library?, How can I create rotated axis labels?, R Miscellanea
@section Why is read.table() so inefficient?

By default, @code{read.table()} needs to read in everything as character
data, and then try to figure out which variables to convert to numerics
or factors.  For a large data set, this takes condiderable amounts of
time and memory.  Performance can substantially be improved by using the
@code{colClasses} argument to specify the classes to be assumed for the
columns of the table.

@node What is the difference between package and library?, I installed a package but the functions are not there, Why is read.table() so inefficient?, R Miscellanea
@section What is the difference between package and library?

A @dfn{package} is a standardized collection of material extending R,
e.g.@: providing code, data, or documentation.  A @dfn{library} is a
place (directory) where R knows to find packages it can use (i.e., which
were @dfn{installed}).  R is told to use a package (to ``load'' it and
add it to the search path) via calls to the function @code{library}.
I.e., @code{library()} is employed to load a package from libraries
containing packages.

@xref{R Add-On Packages}, for more details.  See also Uwe Ligges (2003),
``R Help Desk: Package Management'', @emph{R News}, @strong{3/3},
37--39.

@node I installed a package but the functions are not there, Why doesn't R think these numbers are equal?, What is the difference between package and library?, R Miscellanea
@section I installed a package but the functions are not there

To actually @emph{use} the package, it needs to be @emph{loaded} using
@code{library()}.

See @ref{R Add-On Packages} and @ref{What is the difference between
package and library?} for more information.

@node Why doesn't R think these numbers are equal?, How can I capture or ignore errors in a long simulation?, I installed a package but the functions are not there, R Miscellanea
@section Why doesn't R think these numbers are equal?

The only numbers that can be represented exactly in R's numeric type 
are integers and fractions whose denominator is a power of 2.  Other 
numbers have to be rounded to (typically) 53 binary digits accuracy.  As a 
result, two floating point numbers will not reliably be equal unless they 
have been computed by the same algorithm, and not always even then.  For 
example

@example
R> a <- sqrt(2)
R> a * a == 2
[1] FALSE
R> a * a - 2
[1] 4.440892e-16
@end example

The function @code{all.equal()} compares two objects using a numeric
tolerance of @code{.Machine$double.eps ^ 0.5}.  If you want much greater
accuracy than this you will need to consider error propagation
carefully.

For more information, see e.g.@: David Goldberg (1991), ``What Every
Computer Scientist Should Know About Floating-Point Arithmetic'',
@emph{ACM Computing Surveys}, @strong{23/1}, 5--48, also available via
@url{http://docs.sun.com/source/806-3568/ncg_goldberg.html}.

To quote from ``The Elements of Programming Style'' by Kernighan and
Plauger:

@quotation
@emph{10.0 times 0.1 is hardly ever 1.0}.
@end quotation


@node How can I capture or ignore errors in a long simulation?, Why are powers of negative numbers wrong?, Why doesn't R think these numbers are equal?, R Miscellanea
@section How can I capture or ignore errors in a long simulation?

Use @code{try()}, which returns an object of class @code{"try-error"}
instead of an error, or preferably @code{tryCatch()}, where the return
value can be configured more flexibly.  For example

@example
beta[i,] <- tryCatch(coef(lm(formula, data)),
                     error = function(e) rep(NaN, 4))
@end example

@noindent
would return the coefficients if the @code{lm()} call succeeded and
would return @code{c(NaN, NaN, NaN, NaN)} if it failed (presumably there
are supposed to be 4 coefficients in this example).

@node Why are powers of negative numbers wrong?, How can I save the result of each iteration in a loop into a separate file?, How can I capture or ignore errors in a long simulation?, R Miscellanea
@section Why are powers of negative numbers wrong?

You are probably seeing something like

@example
R> -2^2
[1] -4
@end example

@noindent
and misunderstanding the precedence rules for expressions in R.
Write

@example
R> (-2)^2
[1] 4
@end example

@noindent
to get the square of @math{-2}.

The precedence rules are documented in @code{?Syntax}, and to see how R
interprets  an expression you can look at the parse tree

@example
R> as.list(quote(-2^2))
[[1]]
`-`

[[2]]
2^2
@end example

@node How can I save the result of each iteration in a loop into a separate file?, Why are p-values not displayed when using lmer()?, Why are powers of negative numbers wrong?, R Miscellanea
@section How can I save the result of each iteration in a loop into a separate file?

One way is to use @code{paste()} (or @code{sprintf()}) to concatenate a
stem filename and the iteration number while @code{file.path()}
constructs the path.  For example, to save results into files
@file{result1.rda}, @dots{}, @file{result100.rda} in the subdirectory
@file{Results} of the current working directory, one can use

@example
for(i in 1:100) @{
  ## Calculations constructing "some_object" ...
  fp <- file.path("Results", paste("result", i, ".rda", sep = ""))
  save(list = "some_object", file = fp)
@}
@end example

@node Why are p-values not displayed when using lmer()?, Why are there unwanted borders, How can I save the result of each iteration in a loop into a separate file?, R Miscellanea
@section Why are @math{p}-values not displayed when using lmer()?

Doug Bates has kindly provided an extensive response in a post to the 
r-help list, which can be reviewed at
@uref{https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html}.

@node Why are there unwanted borders, Why does backslash behave strangely inside strings?, Why are p-values not displayed when using lmer()?, R Miscellanea
@section Why are there unwanted borders, lines or grid-like artifacts when viewing a plot saved to a PS or PDF file?

This can occur when using functions such as @code{polygon()},
@code{filled.contour()}, @code{image()} or other functions which may
call these internally.  In the case of @code{polygon()}, you may observe
unwanted borders between the polygons even when setting the
@code{border} argument to @code{NA} or @code{"transparent"}.

The source of the problem is the PS/PDF viewer when the plot is
anti-aliased.  The details for the solution will be different depending
upon the viewer used, the operating system and may change over time.
For some common viewers, consider the following:

@ftable @asis
@item Acrobat Reader (cross platform)
There are options in Preferences to enable/disable text smoothing, image
smoothing and line art smoothing.
Disable line art smoothing.
@item Preview (Mac OS X)
There is an option in Preferences to enable/disable anti-aliasing of
text and line art.
Disable this option. 
@item GSview (cross platform)
There are settings for Text Alpha and Graphics Alpha.
Change Graphics Alpha from 4 bits to 1 bit to disable graphic
anti-aliasing.
@item gv (Linux/Unix X)
There is an option to enable/disable anti-aliasing.
Disable this option.
@item Evince (Linux/GNOME)
There is not an option to disable anti-aliasing in this viewer.
@item Okular (Linux/KDE)
There is not an option in the GUI to enable/disable anti-aliasing.
From a console command line, use:
@smallexample
$ kwriteconfig --file okularpartrc --group 'Dlg Performance' \
               --key TextAntialias Disabled
@end smallexample
Then restart Okular.  Change the final word to @samp{Enabled} to restore
the original setting.
@end ftable

@node Why does backslash behave strangely inside strings?,  , Why are there unwanted borders, R Miscellanea
@section Why does backslash behave strangely inside strings?

This question most often comes up in relation to file names (see
@ref{How do file names work in Windows?})  but it also happens that
people complain that they cannot seem to put a single @samp{\} character
into a text string unless it happens to be followed by certain other
characters.

To understand this, you have to distinguish between character strings
and @emph{representations} of character strings.  Mostly, the
representation in R is just the string with a single or double quote at
either end, but there are strings that cannot be represented that way,
e.g., strings that themselves contains the quote character.  So

@example
> str <- "This \"text\" is quoted"
> str
[1] "This \"text\" is quoted"
> cat(str, "\n")
This "text" is quoted
@end example

@noindent
The @emph{escape sequences} @samp{\"} and @samp{\n} represent a double
quote and the newline character respectively. Printing text strings,
using @code{print()} or by typing the name at the prompt will use the
escape sequences too, but the @code{cat()} function will display the
string as-is. Notice that @samp{"\n"} is a one-character string, not
two; the backslash is not actually in the string, it is just generated
in the printed representation.

@example
> nchar("\n")
[1] 1
> substring("\n", 1, 1)
[1] "\n"
@end example

So how do you put a backslash in a string? For this, you have to
escape the escape character. I.e., you have to double the backslash.
as in

@example
> cat("\\n", "\n")
\n
@end example

Some functions, particularly those involving regular expression
matching, themselves use metacharacters, which may need to be escaped by
the backslash mechanism.  In those cases you may need a @emph{quadruple}
backslash to represent a single literal one.

In versions of R up to 2.4.1 an unknown escape sequence like @samp{\p}
was quietly interpreted as just @samp{p}.  Current versions of R emit a
warning.

@node R Programming, R Bugs, R Miscellanea, Top
@chapter R Programming

@menu
* How should I write summary methods?::  
* How can I debug dynamically loaded code?::  
* How can I inspect R objects when debugging?::  
* How can I change compilation flags?::  
* How can I debug S4 methods?::  
@end menu

@node How should I write summary methods?, How can I debug dynamically loaded code?, R Programming, R Programming
@section How should I write summary methods?

Suppose you want to provide a summary method for class @code{"foo"}.
Then @code{summary.foo()} should not print anything, but return an
object of class @code{"summary.foo"}, @emph{and} you should write a
method @code{print.summary.foo()} which nicely prints the summary
information and invisibly returns its object.  This approach is
preferred over having @code{summary.foo()} print summary information and
return something useful, as sometimes you need to grab something
computed by @code{summary()} inside a function or similar.  In such
cases you don't want anything printed.

@node How can I debug dynamically loaded code?, How can I inspect R objects when debugging?, How should I write summary methods?, R Programming
@section How can I debug dynamically loaded code?

Roughly speaking, you need to start R inside the debugger, load the
code, send an interrupt, and then set the required breakpoints.

@ifclear UseExternalXrefs
See section ``Finding entry points in dynamically loaded code'' in
@cite{Writing R Extensions}.  This manual is included in the R
distribution, @pxref{What documentation exists for R?}.
@end ifclear
@ifset UseExternalXrefs
@xref{Finding entry points, , Finding entry points in dynamically loaded
code, R-exts, Writing R Extensions}.
@end ifset

@node How can I inspect R objects when debugging?, How can I change compilation flags?, How can I debug dynamically loaded code?, R Programming
@section How can I inspect R objects when debugging?

The most convenient way is to call @code{R_PV} from the symbolic
debugger.

@ifclear UseExternalXrefs
See section ``Inspecting R objects when debugging'' in @cite{Writing R
Extensions}.
@end ifclear
@ifset UseExternalXrefs
@xref{Inspecting R objects, , Inspecting R objects when debugging,
R-exts, Writing R Extensions}.
@end ifset

@node How can I change compilation flags?, How can I debug S4 methods?, How can I inspect R objects when debugging?, R Programming
@section How can I change compilation flags?

Suppose you have C code file for dynloading into R, but you want to use
@code{R CMD SHLIB} with compilation flags other than the default ones
(which were determined when R was built).

Starting with R 2.1.0, users can provide personal Makevars configuration
files in @file{$@env{HOME}/.R} to override the default flags.
@ifclear UseExternalXrefs
See section ``Add-on packages'' in @cite{R Installation and
Administration}.
@end ifclear
@ifset UseExternalXrefs
@xref{Add-on packages, , Add-on packages, R-admin,
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

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

Use the @code{trace()} function with argument @code{signature=} to add
calls to the browser or any other code to the method that will be
dispatched for the corresponding signature.  See @code{?trace} for
details.

@node R Bugs, Acknowledgments, R Programming, Top
@chapter R Bugs

@menu
* What is a bug?::              
* How to report a bug::         
@end menu

@node What is a bug?, How to report a bug, R Bugs, R Bugs
@section What is a bug?

If R executes an illegal instruction, or dies with an operating system
error message that indicates a problem in the program (as opposed to
something like ``disk full''), then it is certainly a bug.  If you call
@code{.C()}, @code{.Fortran()}, @code{.External()} or @code{.Call()} (or
@code{.Internal()}) yourself (or in a function you wrote), you can
always crash R by using wrong argument types (modes).  This is not a
bug.

Taking forever to complete a command can be a bug, but you must make
certain that it was really R's fault.  Some commands simply take a long
time.  If the input was such that you @emph{know} it should have been
processed quickly, report a bug.  If you don't know whether the command
should take a long time, find out by looking in the manual or by asking
for assistance.

If a command you are familiar with causes an R error message in a case
where its usual definition ought to be reasonable, it is probably a bug.
If a command does the wrong thing, that is a bug.  But be sure you know
for certain what it ought to have done.  If you aren't familiar with the
command, or don't know for certain how the command is supposed to work,
then it might actually be working right.  For example, people sometimes
think there is a bug in R's mathematics because they don't understand
how finite-precision arithmetic works.  Rather than jumping to
conclusions, show the problem to someone who knows for certain.
Unexpected results of comparison of decimal numbers, for example
@code{0.28 * 100 != 28} or @code{0.1 + 0.2 != 0.3}, are not a bug.
@xref{Why doesn't R think these numbers are equal?}, for more details.

Finally, a command's intended definition may not be best for statistical
analysis.  This is a very important sort of problem, but it is also a
matter of judgment.  Also, it is easy to come to such a conclusion out
of ignorance of some of the existing features.  It is probably best not
to complain about such a problem until you have checked the
documentation in the usual ways, feel confident that you understand it,
and know for certain that what you want is not available.  If you are
not sure what the command is supposed to do after a careful reading of
the manual this indicates a bug in the manual.  The manual's job is to
make everything clear.  It is just as important to report documentation
bugs as program bugs.  However, we know that the introductory
documentation is seriously inadequate, so you don't need to report this.

If the online argument list of a function disagrees with the manual, one
of them must be wrong, so report the bug.

@node How to report a bug,  , What is a bug?, R Bugs
@section How to report a bug

When you decide that there is a bug, it is important to report it and to
report it in a way which is useful.  What is most useful is an exact
description of what commands you type, starting with the shell command
to run R, until the problem happens.  Always include the version of R,
machine, and operating system that you are using; type @kbd{version} in
R to print this.

The most important principle in reporting a bug is to report
@emph{facts}, not hypotheses or categorizations.  It is always easier to
report the facts, but people seem to prefer to strain to posit
explanations and report them instead.  If the explanations are based on
guesses about how R is implemented, they will be useless; others will
have to try to figure out what the facts must have been to lead to such
speculations.  Sometimes this is impossible.  But in any case, it is
unnecessary work for the ones trying to fix the problem.

For example, suppose that on a data set which you know to be quite large
the command

@example
R> data.frame(x, y, z, monday, tuesday)
@end example

@noindent
never returns.  Do not report that @code{data.frame()} fails for large
data sets.  Perhaps it fails when a variable name is a day of the week.
If this is so then when others got your report they would try out the
@code{data.frame()} command on a large data set, probably with no day of
the week variable name, and not see any problem.  There is no way in the
world that others could guess that they should try a day of the week
variable name.

Or perhaps the command fails because the last command you used was a
method for @code{"["()} that had a bug causing R's internal data
structures to be corrupted and making the @code{data.frame()} command
fail from then on.  This is why others need to know what other commands
you have typed (or read from your startup file).

It is very useful to try and find simple examples that produce
apparently the same bug, and somewhat useful to find simple examples
that might be expected to produce the bug but actually do not.  If you
want to debug the problem and find exactly what caused it, that is
wonderful.  You should still report the facts as well as any
explanations or solutions.  Please include an example that reproduces
(e.g., @url{http://en.wikipedia.org/wiki/Reproducibility}) the problem,
preferably the simplest one you have found.

Invoking R with the @option{--vanilla} option may help in isolating a
bug.  This ensures that the site profile and saved data files are not
read.

Before you actually submit a bug report, you should check whether the
bug has already been reported and/or fixed.  First, try the ``Search
Existing Reports'' facility in the Bug Tracking page at
@url{http://bugs.R-project.org/}.  Second, consult
@url{https://svn.R-project.org/R/trunk/NEWS}, which records changes that
will appear in the @emph{next} release of R, including some bug fixes
that do not appear in Bug Tracking.  (Windows users should additionally
consult
@url{https://svn.R-project.org/@/R/@/trunk/@/src/@/gnuwin32/@/CHANGES}.)
Third, if possible try the current r-patched or r-devel version of R.
If a bug has already been reported or fixed, please do not submit
further bug reports on it.  Finally, check carefully whether the bug is
with R, or a contributed package.  Bug reports on contributed packages
should be sent first to the package maintainer, and only submitted to
the R-bugs repository by package maintainers, mentioning the package in
the subject line.

On Unix systems a bug report can be generated using the function
@code{bug.report()}.  This automatically includes the version
information and sends the bug to the correct address.  Alternatively the
bug report can be emailed to @email{R-bugs@@R-project.org} or submitted
to the Web page at @url{http://bugs.R-project.org/}.  Please try
including results of @code{sessionInfo()} in your bug report.

There is a section of the bug repository for suggestions for
enhancements for R labelled @samp{wishlist}.  Suggestions can be
submitted in the same ways as bugs, but please ensure that the subject
line makes clear that this is for the wishlist and not a bug report, for
example by starting with @samp{Wishlist:}.

Comments on and suggestions for the Windows port of R should be sent to
@email{R-windows@@R-project.org}.

Corrections to and comments on message translation should be sent to the
last translator (listed at the top of the appropriate @samp{.po} file)
or to the translation team as listed at
@url{http://developer.R-project.org/TranslationTeams.html}.

@node Acknowledgments,  , R Bugs, Top
@chapter Acknowledgments

Of course, many many thanks to Robert and Ross for the R system, and to
the package writers and porters for adding to it.

Special thanks go to Doug Bates, Peter Dalgaard, Paul Gilbert, Stefano
Iacus, Fritz Leisch, Jim Lindsey, Thomas Lumley, Martin Maechler, Brian
D. Ripley, Anthony Rossini, and Andreas Weingessel for their comments
which helped me improve this @acronym{FAQ}.

More to come soon @dots{}

@bye

@c Local Variables: ***
@c mode: TeXinfo ***
@c End: ***
