R FAQ Frequently Asked Questions on R Version 2.7.2008-05-05 ISBN 3-900051-08-9 Kurt Hornik Table of Contents ***************** R FAQ 1 Introduction 1.1 Legalese 1.2 Obtaining this document 1.3 Citing this document 1.4 Notation 1.5 Feedback 2 R Basics 2.1 What is R? 2.2 What machines does R run on? 2.3 What is the current version of R? 2.4 How can R be obtained? 2.5 How can R be installed? 2.5.1 How can R be installed (Unix) 2.5.2 How can R be installed (Windows) 2.5.3 How can R be installed (Macintosh) 2.6 Are there Unix binaries for R? 2.7 What documentation exists for R? 2.8 Citing R 2.9 What mailing lists exist for R? 2.10 What is CRAN? 2.11 Can I use R for commercial purposes? 2.12 Why is R named R? 2.13 What is the R Foundation? 3 R and S 3.1 What is S? 3.2 What is S-PLUS? 3.3 What are the differences between R and S? 3.3.1 Lexical scoping 3.3.2 Models 3.3.3 Others 3.4 Is there anything R can do that S-PLUS cannot? 3.5 What is R-plus? 4 R Web Interfaces 5 R Add-On Packages 5.1 Which add-on packages exist for R? 5.1.1 Add-on packages in R 5.1.2 Add-on packages from CRAN 5.1.3 Add-on packages from Omegahat 5.1.4 Add-on packages from Bioconductor 5.1.5 Other add-on packages 5.2 How can add-on packages be installed? 5.3 How can add-on packages be used? 5.4 How can add-on packages be removed? 5.5 How can I create an R package? 5.6 How can I contribute to R? 6 R and Emacs 6.1 Is there Emacs support for R? 6.2 Should I run R from within Emacs? 6.3 Debugging R from within Emacs 7 R Miscellanea 7.1 How can I set components of a list to NULL? 7.2 How can I save my workspace? 7.3 How can I clean up my workspace? 7.4 How can I get eval() and D() to work? 7.5 Why do my matrices lose dimensions? 7.6 How does autoloading work? 7.7 How should I set options? 7.8 How do file names work in Windows? 7.9 Why does plotting give a color allocation error? 7.10 How do I convert factors to numeric? 7.11 Are Trellis displays implemented in R? 7.12 What are the enclosing and parent environments? 7.13 How can I substitute into a plot label? 7.14 What are valid names? 7.15 Are GAMs implemented in R? 7.16 Why is the output not printed when I source() a file? 7.17 Why does outer() behave strangely with my function? 7.18 Why does the output from anova() depend on the order of factors in the model? 7.19 How do I produce PNG graphics in batch mode? 7.20 How can I get command line editing to work? 7.21 How can I turn a string into a variable? 7.22 Why do lattice/trellis graphics not work? 7.23 How can I sort the rows of a data frame? 7.24 Why does the help.start() search engine not work? 7.25 Why did my .Rprofile stop working when I updated R? 7.26 Where have all the methods gone? 7.27 How can I create rotated axis labels? 7.28 Why is read.table() so inefficient? 7.29 What is the difference between package and library? 7.30 I installed a package but the functions are not there 7.31 Why doesn't R think these numbers are equal? 7.32 How can I capture or ignore errors in a long simulation? 7.33 Why are powers of negative numbers wrong? 7.34 How can I save the result of each iteration in a loop into a separate file? 7.35 Why are p-values not displayed when using lmer()? 7.36 Why are there unwanted lines between polygons in PDF output viewed in Adobe Reader? 7.37 Why does backslash behave strangely inside strings? 8 R Programming 8.1 How should I write summary methods? 8.2 How can I debug dynamically loaded code? 8.3 How can I inspect R objects when debugging? 8.4 How can I change compilation flags? 8.5 How can I debug S4 methods? 9 R Bugs 9.1 What is a bug? 9.2 How to report a bug 10 Acknowledgments R FAQ ***** 1 Introduction ************** This document contains answers to some of the most frequently asked questions about R. 1.1 Legalese ============ This document is copyright (C) 1998-2008 by Kurt Hornik. This document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free 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 GNU General Public License for more details. A copy of the GNU General Public License is available via WWW at `http://www.gnu.org/copyleft/gpl.html'. 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. 1.2 Obtaining this document =========================== The latest version of this document is always available from `http://CRAN.R-project.org/doc/FAQ/' From there, you can obtain versions converted to plain ASCII text, DVI, GNU info, HTML, PDF, PostScript as well as the Texinfo source used for creating all these formats using the GNU Texinfo system (http://texinfo.org/). You can also obtain the R FAQ from the `doc/FAQ' subdirectory of a CRAN site (*note What is CRAN?::). 1.3 Citing this document ======================== In publications, please refer to this FAQ as Hornik (2008), "The R FAQ", and give the above, _official_ URL and the ISBN 3-900051-08-9: @Misc{, author = {Kurt Hornik}, title = {The {R} {FAQ}}, year = {2008}, note = {{ISBN} 3-900051-08-9}, url = {http://CRAN.R-project.org/doc/FAQ/R-FAQ.html} } 1.4 Notation ============ Everything should be pretty standard. `R>' is used for the R prompt, and a `$' for the shell prompt (where applicable). 1.5 Feedback ============ Feedback via email to 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 "R for Windows FAQ" (http://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) and the "R for Mac OS X FAQ (http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html). If you have information on Macintosh or Windows systems that you think should be added to this document, please let me know. 2 R Basics ********** 2.1 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 (*note What is S?::) and Sussman's Scheme (http://www.cs.indiana.edu/scheme-repository/home.html). Whereas the resulting language is very similar in appearance to S, the underlying implementation and semantics are derived from Scheme. *Note What are the differences 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 (*note R Add-On Packages::). R was initially written by Ross Ihaka and 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 `http://www.R-project.org/'. It is free software (http://www.gnu.org/philosophy/free-sw.html) distributed under a GNU-style copyleft (http://www.gnu.org/copyleft/copyleft.html), and an official part of the GNU (http://www.gnu.org/) project ("GNU S"). 2.2 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 CPU-linux-gnu for the i386, alpha, arm, hppa, ia64, m68k, mips/mipsel, powerpc, s390, sparc (e.g., `http://buildd.debian.org/build.php?&pkg=r-base'), and x86_64 CPUs, powerpc-apple-darwin, mips-sgi-irix, rs6000-ibm-aix, and sparc-sun-solaris. If you know about other platforms, please drop us a note. 2.3 What is the current version of R? ===================================== The current released version is 2.7.0. 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. 2.4 How can R be obtained? ========================== Sources, binaries and documentation for R can be obtained via CRAN, the "Comprehensive R Archive Network" (see *note What is CRAN?::). Sources are also available via `https://svn.R-project.org/R/', the R Subversion repository, but currently not via anonymous rsync (nor CVS). Tarballs with daily snapshots of the r-devel and r-patched development versions of R can be found at `ftp://ftp.stat.math.ethz.ch/Software/R'. 2.5 How can R be installed? =========================== 2.5.1 How can R be installed (Unix) ----------------------------------- If R is already installed, it can be started by typing `R' at the shell prompt (of course, provided that the executable is in your path). If binaries are available for your platform (see *note 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 *note What machines does R run on?::). The file `INSTALL' that comes with the R distribution contains a brief introduction, and the "R Installation and Administration" guide (*note What documentation exists for R?::) has full details. Note that you need a FORTRAN compiler or perhaps `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): $ ./configure $ make If these commands execute successfully, the R binary and a shell script front-end called `R' are created and copied to the `bin' directory. You can copy the script to a place where users can invoke it, for example to `/usr/local/bin'. In addition, plain text help pages as well as HTML and LaTeX versions of the documentation are built. Use `make dvi' to create DVI versions of the R manuals, such as `refman.dvi' (an R object reference index) and `R-exts.dvi', the "R Extension Writers Guide", in the `doc/manual' subdirectory. These files can be previewed and printed using standard programs such as `xdvi' and `dvips'. You can also use `make pdf' to build PDF (Portable Document Format) version of the manuals, and view these using e.g. Acrobat. Manuals written in the GNU Texinfo system can also be converted to info files suitable for reading online with Emacs or stand-alone GNU Info; use `make info' to create these versions (note that this requires Makeinfo version 4.5). Finally, use `make check' to find out whether your R system works correctly. You can also perform a "system-wide" installation using `make install'. By default, this will install to the following directories: `${prefix}/bin' the front-end shell script `${prefix}/man/man1' the man page `${prefix}/lib/R' all the rest (libraries, on-line help system, ...). This is the "R Home Directory" (`R_HOME') of the installed system. In the above, `prefix' is determined during configuration (typically `/usr/local') and can be set by running `configure' with the option $ ./configure --prefix=/where/you/want/R/to/go (E.g., the R executable will then be installed into `/where/you/want/R/to/go/bin'.) To install DVI, info and PDF versions of the manuals, use `make install-dvi', `make install-info' and `make install-pdf', respectively. 2.5.2 How can R be installed (Windows) -------------------------------------- The `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 95, 98, ME, NT4, 2000, and XP (at least) on Intel and clones (but not on other platforms). The Windows version of R was created by Robert Gentleman and Guido Masarotto, and is now being developed and maintained by Duncan Murdoch and Brian D. Ripley . For most installations the Windows installer program will be the easiest tool to use. See the "R for Windows FAQ" (http://CRAN.R-project.org/bin/windows/baserw-FAQ.html) for more details. 2.5.3 How can R be installed (Macintosh) ---------------------------------------- The `bin/macosx' directory of a CRAN site contains a standard Apple installer package inside a disk image named `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 GUI. Inside `bin/macosx/powerpc/contrib/X.Y' there are prebuilt binary packages (for powerpc version of Mac OS X) to be used with RAqua corresponding to the "X.Y" release of R. The installation of these packages is available through the "Package" menu of the R.app GUI. This port of R for Mac OS X is maintained by Stefano Iacus . The "R for Mac OS X FAQ (http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html) has more details. The `bin/macos' directory of a CRAN site contains bin-hexed (`hqx') and stuffit (`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. 2.6 Are there Unix binaries for R? ================================== The `bin/linux' directory of a CRAN site contains the following packages. CPU Versions Provider --------------------------------------------------------------------- Debian i386/amd64 stable/oldstable Johannes Ranke Red Hat i386/x86_64 fedora7/fedora8 Martyn Plummer i386/x86_64 el4/el5 Bob Kinney SuSE i586/x86_64 10.0/10.1/10.2/10.3 Detlef Steuer Ubuntu i386 dapper/feisty/gutsy/hardy Vincent Goulet amd64 dapper/feisty/gutsy/hardy Michael Rutter 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. `apt-get install r-base r-recommended' to install the R environment and recommended packages. If you also want to build R packages from source, also run `apt-get install r-base-dev' to obtain the additional tools required for this. So-called "backports" of the current R packages for the "stable" distribution of Debian are provided by Johannes Ranke, and available from CRAN. Simply add the line deb http://CRAN.R-project.org/bin/linux/debian stable/ (feel free to use a CRAN mirror instead of the master) to the file `/etc/apt/sources.list', and install as usual. More details on installing and administering R on Debian Linux can be found at `http://CRAN.R-project.org/bin/linux/debian/README'. These backports 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.) Protocol: HTTP Server name: software.openSUSE.org Directory: /download/home:/dsteuer/openSUSE_10.2/ With this setting, online updates will check for new versions of R. No other binary distributions are currently publically available via CRAN. A "live" Linux distribution with a particular focus on R is "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 GUI for R, the Ggobi visualization tool as well as several other R interfaces. The "Quantian" website at `http://dirk.eddelbuettel.com/quantian/' contains more details as well download information. 2.7 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 `help(NAME)' (or `?NAME') at the R prompt, where 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 *note How can R be installed?::. An up-to-date HTML version is always available for web browsing at `http://stat.ethz.ch/R-manual/'. Printed copies of the R reference manual for some version(s) are available from Network Theory Ltd, at `http://www.network-theory.co.uk/R/base/'. For each set of manuals sold, the publisher donates USD 10 to the R Foundation (*note What is the R Foundation?::). The R distribution also comes with the following manuals. * "An Introduction to R" (`R-intro') includes information on data types, programming elements, statistical modeling and graphics. This document is based on the "Notes on S-PLUS" by Bill Venables and David Smith. * "Writing R Extensions" (`R-exts') currently describes the process of creating R add-on packages, writing R documentation, R's system and foreign language interfaces, and the R API. * "R Data Import/Export" (`R-data') is a guide to importing and exporting data to and from R. * "The R Language Definition" (`R-lang'), a first version of the "Kernighan & Ritchie of R", explains evaluation, parsing, object oriented programming, computing on the language, and so forth. * "R Installation and Administration" (`R-admin'). * "R Internals" (`R-ints') is a guide to R's internal structures. (Added in R 2.4.0.) Books on R include P. Dalgaard (2002), "Introductory Statistics with R", Springer: New York, ISBN 0-387-95475-9, `http://www.biostat.ku.dk/~pd/ISwR.html'. J. Fox (2002), "An R and S-PLUS Companion to Applied Regression", Sage Publications, ISBN 0-761-92280-6 (softcover) or 0-761-92279-2 (hardcover), `http://socserv.socsci.mcmaster.ca/jfox/Books/Companion/'. J. Maindonald and J. Braun (2003), "Data Analysis and Graphics Using R: An Example-Based Approach", Cambridge University Press, ISBN 0-521-81336-0, `http://wwwmaths.anu.edu.au/~johnm/'. S. M. Iacus and G. Masarotto (2002), "Laboratorio di statistica con R", McGraw-Hill, ISBN 88-386-6084-0 (in Italian), `http://www.ateneonline.it/LibroAteneo.asp?item_id=1436'. P. Murrell (2005), "R Graphics", Chapman & Hall/CRC, ISBN: 1-584-88486-X, `http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html'. The book W. N. Venables and B. D. Ripley (2002), "Modern Applied Statistics with S. Fourth Edition". Springer, ISBN 0-387-95457-0 has a home page at `http://www.stats.ox.ac.uk/pub/MASS4/' providing additional material. Its companion is W. N. Venables and B. D. Ripley (2000), "S Programming". Springer, ISBN 0-387-98966-8 and provides an in-depth guide to writing software in the S language which forms the basis of both the commercial S-PLUS and the Open Source R data analysis software systems. See `http://www.stats.ox.ac.uk/pub/MASS3/Sprog/' for more information. In addition to material written specifically or explicitly for R, documentation for S/S-PLUS (see *note R and S::) can be used in combination with this FAQ (*note What are the differences between R and S?::). Introductory books include P. Spector (1994), "An introduction to S and S-PLUS", Duxbury Press. A. Krause and M. Olsen (2005), "The Basics of S-PLUS" (Fourth Edition). Springer, ISBN 0-387-26109-5. The book J. C. Pinheiro and D. M. Bates (2000), "Mixed-Effects Models in S and S-PLUS", Springer, ISBN 0-387-98957-0 provides a comprehensive guide to the use of the *nlme* package for linear and nonlinear mixed-effects models. As an example of how R can be used in teaching an advanced introductory statistics course, see D. Nolan and T. Speed (2000), "Stat Labs: Mathematical Statistics Through Applications", Springer Texts in Statistics, ISBN 0-387-98974-9 This integrates theory of statistics with the practice of statistics through a collection of case studies ("labs"), and uses R to analyze the data. More information can be found at `http://www.stat.Berkeley.EDU/users/statlabs/'. Last, but not least, Ross' and Robert's experience in designing and implementing R is described in Ihaka & Gentleman (1996), "R: A Language for Data Analysis and Graphics", _Journal of Computational and Graphical Statistics_, *5*, 299-314. An annotated bibliography (BibTeX format) of R-related publications which includes most of the above references can be found at `http://www.R-project.org/doc/bib/R.bib' 2.8 Citing R ============ To cite R in publications, use @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 = 2008, note = {{ISBN} 3-900051-07-0}, url = {http://www.R-project.org} } Citation strings (or BibTeX entries) for R and R packages can also be obtained by `citation()'. 2.9 What mailing lists exist for R? =================================== Thanks to Martin Maechler , there are four mailing lists devoted to R. `R-announce' A moderated list for major announcements about the development of R and the availability of new code. `R-packages' A moderated list for announcements on the availability of new or enhanced contributed packages. `R-help' The `main' R mailing list, for discussion about problems and solutions using R, announcements (not covered by `R-announce' and `R-packages') about the development of R and the availability of new code. `R-devel' This list is for questions and discussion about code development in R. Please read the posting guide (http://www.R-project.org/posting-guide.html) _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 `http://stat.ethz.ch/mailman/listinfo/'. One can also subscribe (or unsubscribe) via email, e.g. to R-help by sending `subscribe' (or `unsubscribe') in the _body_ of the message (not in the subject!) to . Send email to to send a message to everyone on the R-help mailing list. Subscription and posting to the other lists is done analogously, with `R-help' replaced by `R-announce', `R-packages', and `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 *note R Bugs:: for more details. See `http://www.R-project.org/mail.html' for more information on the R mailing lists. The R Core Team can be reached at for comments and reports. Many of the R project's mailing lists are also available via Gmane (http://gmane.org), from which they can be read with a web browser, using an NNTP news reader, or via RSS feeds. See `http://dir.gmane.org/index.php?prefix=gmane.comp.lang.r.' for the available mailing lists, and `http://www.gmane.org/rss.php' for details on RSS feeds. 2.10 What is 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ät Wien, Austria, can be found at the URL `http://CRAN.R-project.org/' Daily mirrors are available at URLs including `http://cran.at.R-project.org/' (WU Wien, Austria) `http://cran.au.R-project.org/' (PlanetMirror, Australia) `http://cran.br.R-project.org/' (Universidade Federal do Paraná, Brazil) `http://cran.ch.R-project.org/' (ETH Zürich, Switzerland) `http://cran.dk.R-project.org/' (SunSITE, Denmark) `http://cran.es.R-project.org/' (Spanish National Research Network, Madrid, Spain) `http://cran.fr.R-project.org/' (INRA, Toulouse, France) `http://cran.pt.R-project.org/' (Universidade do Porto, Portugal) `http://cran.uk.R-project.org/' (U of Bristol, United Kingdom) `http://cran.za.R-project.org/' (Rhodes U, South Africa) See `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 `ftp://CRAN.R-project.org/incoming/' and send an email to . 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. Note: It is very important that you indicate the copyright (license) information (GPL-2, GPL-3, BSD, Artistic, ...) in your submission. Please always use the URL of the master site when referring to CRAN. 2.11 Can I use R for commercial purposes? ========================================= R is released under the GNU General Public License (GPL). 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 Open Source Definition (http://www.opensource.org/docs/definition.html): 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. It is also explicitly stated in clause 0 of the GPL, which says in part 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. 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. 2.12 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' (*note What is S?::). 2.13 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 `http://www.R-project.org/foundation/' for more information. 3 R and S ********* 3.1 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 (ACM) presented its Software System Award to John M. Chambers, the principal designer of S, for the S system, which has forever altered the way people analyze, visualize, and manipulate data ... S is an elegant, widely accepted, and enduring software system, with conceptual integrity, thanks to the insight, taste, and effort of John Chambers. The evolution of the S language is characterized by four books by John Chambers and coauthors, which are also the primary references for S. * Richard A. Becker and John M. Chambers (1984), "S. An Interactive Environment for Data Analysis and Graphics," Monterey: Wadsworth and Brooks/Cole. This is also referred to as the "_Brown Book_", and of historical interest only. * Richard A. Becker, John M. Chambers and Allan R. Wilks (1988), "The New S Language," London: Chapman & Hall. This book is often called the "_Blue Book_", and introduced what is now known as S version 2. * John M. Chambers and Trevor J. Hastie (1992), "Statistical Models in S," London: Chapman & Hall. This is also called the "_White Book_", and introduced S version 3, which added structures to facilitate statistical modeling in S. * John M. Chambers (1998), "Programming with Data," New York: Springer, ISBN 0-387-98503-4 (`http://cm.bell-labs.com/cm/ms/departments/sia/Sbook/'). This "_Green Book_" describes version 4 of S, a major revision of S designed by John Chambers to improve its usefulness at every stage of the programming process. See `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 S Repository (http://lib.stat.cmu.edu/S/) at CMU. 3.2 What is S-PLUS? =================== S-PLUS is a value-added version of S sold by Insightful Corporation. Based on the S language, S-PLUS 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 Insightful S-PLUS page (http://www.insightful.com/products/splus/) for further information. 3.3 What are the differences between R and S? ============================================= We can regard S as a language with three current implementations or "engines", the "old S engine" (S version 3; S-PLUS 3.x and 4.x), the "new S engine" (S version 4; S-PLUS 5.x and above), and R. Given this understanding, asking for "the differences between R and S" really amounts to asking for the specifics of the R implementation of the S language, i.e., the difference between the R and S _engines_. For the remainder of this section, "S" refers to the S engines and not the S language. 3.3.1 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 _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: cube <- function(n) { sq <- function() n * n n * sq() } Under S, `sq()' does not "know" about the variable `n' unless it is defined globally: S> cube(2) Error in sq(): Object "n" not found Dumped S> n <- 3 S> cube(2) [1] 18 In R, the "environment" created when `cube()' was invoked is also looked in: R> cube(2) [1] 8 As a more "interesting" real-world problem, suppose you want to write a function which returns the density function of the r-th order statistic from a sample of size n from a (continuous) distribution. For simplicity, we shall use both the cdf and pdf of the distribution as explicit arguments. (Example compiled from various postings by Luke Tierney.) The S-PLUS documentation for `call()' basically suggests the following: 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 } 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 `substitute()' and seems to work under both S and R is 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))) } (the `eval()' is not needed in S). However, in R there is a much easier solution: 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) } } 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 _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 `MC()' (for "make closure"): 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)) } 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, `MC()' simply is MC <- function(f, env) f (lexical scope!), a version for S is 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) } 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 `demo("scoping")' at the R prompt. Further information is provided in the standard R reference "R: A Language for Data Analysis and Graphics" (*note What documentation exists for R?::) and in Robert Gentleman and Ross Ihaka (2000), "Lexical Scope and Statistical Computing", _Journal of Computational and Graphical Statistics_, *9*, 491-508. Nested lexically scoped functions also imply a further major difference. Whereas S stores all objects as separate files in a directory somewhere (usually `.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 _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 *note 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 `source()'. Note: If you run R from within Emacs (see *note R and Emacs::), you can save the contents of the interaction buffer to a file and conveniently manipulate it using `ess-transcript-mode', as well as save source copies of all functions and data used. 3.3.2 Models ------------ There are some differences in the modeling code, such as * Whereas in S, you would use `lm(y ~ x^3)' to regress `y' on `x^3', in R, you have to insulate powers of numeric vectors (using `I()'), i.e., you have to use `lm(y ~ I(x^3))'. * The glm family objects are implemented differently in R and S. The same functionality is available but the components have different names. * Option `na.action' is set to `"na.omit"' by default in R, but not set in S. * 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. * Finally, in R `y ~ x + 0' is an alternative to `y ~ x - 1' for specifying a model with no intercept. Models with no parameters at all can be specified by `y ~ 0'. 3.3.3 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. * In R, if `x' is a list, then `x[i] <- NULL' and `x[[i]] <- NULL' remove the specified elements from `x'. The first of these is incompatible with S, where it is a no-op. (Note that you can set elements to `NULL' using `x[i] <- list(NULL)'.) * In S, the functions named `.First' and `.Last' in the `.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. R first sources the system startup file ``$R_HOME'/library/base/R/Rprofile'. Then, it searches for a site-wide startup profile unless the command line option `--no-site-file' was given. The name of this file is taken from the value of the `R_PROFILE' environment variable. If that variable is unset, the default is ``$R_HOME'/etc/Rprofile.site'. This code is loaded in package *base*. Then, unless `--no-init-file' was given, R searches for a file called `.Rprofile' in the current directory or in the user's home directory (in that order) and sources it into the user workspace. It then loads a saved image of the user workspace from `.RData' in case there is one (unless `--no-restore' was specified). If needed, the functions `.First()' and `.Last()' should be defined in the appropriate startup profiles. * In R, `T' and `F' are just variables being set to `TRUE' and `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 `"T"' or `"F"'.) Hence, when writing code you should always use `TRUE' and `FALSE'. * In R, `dyn.load()' can only load _shared objects_, as created for example by `R CMD SHLIB'. * In R, `attach()' currently only works for lists and data frames, but not for directories. (In fact, `attach()' also works for R data files created with `save()', which is analogous to attaching directories in S.) Also, you cannot attach at position 1. * Categories do not exist in R, and never will as they are deprecated now in S. Use factors instead. * In R, `For()' loops are not necessary and hence not supported. * In R, `assign()' uses the argument `envir=' rather than `where=' as in S. * The random number generators are different, and the seeds have different length. * R passes integer objects to C as `int *' rather than `long *' as in S. * R has no single precision storage mode. However, as of version 0.65.1, there is a single precision interface to C/FORTRAN subroutines. * By default, `ls()' returns the names of the objects in the current (under R) and global (under S) environment, respectively. For example, given x <- 1; fun <- function() {y <- 1; ls()} then `fun()' returns `"y"' in R and `"x"' (together with the rest of the global environment) in S. * R allows for zero-extent matrices (and arrays, i.e., some elements of the `dim' attribute vector can be 0). This has been determined a useful feature as it helps reducing the need for special-case tests for empty subsets. For example, if `x' is a matrix, `x[, FALSE]' is not `NULL' but a "matrix" with 0 columns. Hence, such objects need to be tested for by checking whether their `length()' is zero (which works in both R and S), and not using `is.null()'. * Named vectors are considered vectors in R but not in S (e.g., `is.vector(c(a = 1:3))' returns `FALSE' in S and `TRUE' in R). * Data frames are not considered as matrices in R (i.e., if `DF' is a data frame, then `is.matrix(DF)' returns `FALSE' in R and `TRUE' in S). * 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. * In R, the argument of a replacement function which corresponds to the right hand side must be named `value'. E.g., `f(a) <- b' is evaluated as `a <- "f<-"(a, value = b)'. S always takes the last argument, irrespective of its name. * In S, `substitute()' searches for names for substitution in the given expression in three places: the actual and the default arguments of the matching call, and the local frame (in that order). R looks in the local frame only, with the special rule to use a "promise" if a 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. * In S, the index variable in a `for()' loop is local to the inside of the loop. In R it is local to the environment where the `for()' statement is executed. * In S, `tapply(simplify=TRUE)' returns a vector where R returns a one-dimensional array (which can have named dimnames). * In S(-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 `"aA" < "Bb"' is true or false). From version 1.2.0 the locale can be (re-)set in R by the `Sys.setlocale()' function. * In S, `missing(ARG)' remains `TRUE' if ARG is subsequently modified; in R it doesn't. * From R version 1.3.0, `data.frame' strips `I()' when creating (column) names. * In R, the string `"NA"' is not treated as a missing value in a character variable. Use `as.character(NA)' to create a missing character value. * R disallows repeated formal arguments in function calls. * In S, `dump()', `dput()' and `deparse()' are essentially different interfaces to the same code. In R from version 2.0.0, this is only true if the same `control' argument is used, but by default it is not. By default `dump()' tries to write code that will evaluate to reproduce the object, whereas `dput()' and `deparse()' default to options for producing deparsed code that is readable. * In R, indexing a vector, matrix, array or data frame with `[' using a character vector index looks only for exact matches (whereas `[[' and `$' allow partial matches). In S, `[' allows partial matches. * S has a two-argument version of `atan' and no `atan2'. A call in S such as `atan(x1, x2)' is equivalent to R's `atan2(x1, x2)'. However, beware of named arguments since S's `atan(x = a, y = b)' is equivalent to R's `atan2(y = a, x = b)' with the meanings of `x' and `y' interchanged. (R used to have undocumented support for a two-argument `atan' with positional arguments, but this has been withdrawn to avoid further confusion.) * Numeric constants with no fractional and exponent (i.e., only integer) part are taken as integer in S-PLUS 6.x or later, but as double in R. 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. 3.4 Is there anything R can do that S-PLUS cannot? ================================================== Since almost anything you can do in R has source code that you could port to S-PLUS with little effort there will never be much you can do in R that you couldn't do in S-PLUS if you wanted to. (Note that using lexical scoping may simplify matters considerably, though.) R offers several graphics features that S-PLUS 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 `plotmath', which features an impressive on-line example. More details can be found in Paul Murrell and Ross Ihaka (2000), "An Approach to Providing Mathematical Annotation in Plots", _Journal of Computational and Graphical Statistics_, *9*, 582-599. 3.5 What is R-plus? =================== For a very long time, there was no such thing. XLSolutions Corporation (http://www.xlsolutions-corp.com/) is currently beta testing a commercially supported version of R named R+ (read R plus). In addition, REvolution Computing (http://www.revolution-computing.com/) has released RPro (http://www.revolution-computing.com/rpro.html), an enterprise-class statistical analysis system based on R, suitable for deployment in professional, commercial and regulated environments. Random Technologies (http://www.random-technologies-llc.com/) offers RStat (http://random-technologies-llc.com/products/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. 4 R Web Interfaces ****************** *Rweb* is developed and maintained by Jeff Banfield . The Rweb Home Page (http://www.math.montana.edu/Rweb/) 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 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 (`http://www.jstatsoft.org/v04/i01/'). Ulf Bartel has developed *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 `http://osvisions.com/r-online/' for more information. *Rcgi* is a CGI WWW interface to R by 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. Currently, a modified version of *Rcgi* by Mai Zhou (actually, two versions: one with (bitmap) graphics and one without) as well as the original code are available from `http://www.ms.uky.edu/~statweb/'. CGI-based web access to R is also provided at `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 `http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/StatCompCourse'. David Firth (http://www.warwick.ac.uk/go/dfirth) has written *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 (`http://www.jstatsoft.org/v08/i10/'). The package is now maintained by Duncan Temple Lang and has a web page at `http://www.omegahat.org/CGIwithR/'. Rpad (http://www.rpad.org/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 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 `http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/RApacheProject'. Rserve (http://stats.math.uni-augsburg.de/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). OpenStatServer (http://openstatserver.org/index.html) 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. R_PHP_Online (http://steve-chen.net/R_PHP/) by Steve Chen (though it is unclear if this project is still active) is somewhat similar to the above Rcgi and Rweb. R-php (http://dssm.unipa.it/R-php/?cmd=home) 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. webbioc (http://www.bioconductor.org/) 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, Rwui (http://rwui.cryst.bbk.ac.uk) 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. 5 R Add-On Packages ******************* 5.1 Which add-on packages exist for R? ====================================== 5.1.1 Add-on packages in R -------------------------- The R distribution comes with the following packages: *base* Base R functions (and datasets before R 2.0.0). *datasets* Base R datasets (added in R 2.0.0). *grDevices* Graphics devices for base and grid graphics (added in R 2.0.0). *graphics* R functions for base graphics. *grid* A rewrite of the graphics layout capabilities, plus some support for interaction. *methods* Formally defined methods and classes for R objects, plus other programming tools, as described in the Green Book. *splines* Regression spline functions and classes. *stats* R statistical functions. *stats4* Statistical functions using S4 classes. *tcltk* Interface and language bindings to Tcl/Tk GUI elements. *tools* Tools for package development and administration. *utils* R utility functions. These "base packages" were substantially reorganized in R 1.9.0. The former *base* was split into the four packages *base*, *graphics*, *stats*, and *utils*. Packages *ctest*, *eda*, *modreg*, *mva*, *nls*, *stepfun* and *ts* were merged into *stats*, package *lqs* returned to the recommended package *MASS*, and package *mle* moved to *stats4*. 5.1.2 Add-on packages from CRAN ------------------------------- The following packages are available from the CRAN `src/contrib' area. (Packages denoted as _Recommended_ are to be included in all binary distributions of R.) *ADaCGH* Analysis of data from aCGH experiments. *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. *AIS* Tools to look at the data ("Ad Inidicia Spectata"). *AMORE* A MORE flexible neural network package, providing the TAO robust neural network algorithm. *ARES* Allelic richness estimation, with extrapolation beyond the sample size. *AcceptanceSampling* Creation and evaluation of acceptance sampling plans, *AdaptFit* Adaptive semiparametic regression. *AlgDesign* Algorithmic experimental designs. Calculates exact and approximate theory experimental designs for D, A, and I criteria. *Amelia* Amelia II: a program for missing data. *AnalyzeFMRI* Functions for I/O, visualisation and analysis of functional Magnetic Resonance Imaging (fMRI) datasets stored in the ANALYZE format. *ArDec* Time series autoregressive decomposition. *BACCO* Bayesian Analysis of Computer Code Output. Contains *approximator*, *calibrator*, and *emulator*, for Bayesian prediction of complex computer codes, calibration of computer models, and emulation of computer programs, respectively. *BARD* Better Automated ReDistricting. *BAYSTAR* Bayesian analysis of threshold autoregressive models. *BB* Barzilai-Borwein spectral methods for solving nonlinear system of equations, and for optimizing nonlinear objective functions subject to simple constraints. *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. *BMA* Bayesian Model Averaging for linear models, generalizable linear models and survival models (Cox regression). *BPHO* Bayesian Prediction with High-order Interactions. *BRugs* OpenBUGS and its R interface BRugs. *BayHaz* Functions for Bayesian Hazard rate estimation. *BayesTree* Bayesian methods for tree based models. *BayesValidate* Bayesian software validation using posterior quantiles. *Bchron* Create chronologies based on radiocarbon and non-radiocarbon dated depths. *Bhat* Functions for general likelihood exploration (MLE, MCMC, CIs). *BiasedUrn* Biased urn model distributions. *BioIDMapper* Mapping between BioIDs. *Biodem* A number of functions for biodemographycal analysis. *BiodiversityR* GUI for biodiversity and community ecology analysis. *Bolstad* Functions and data sets for the book "Introduction to Bayesian Statistics" by W. M. Bolstad, 2004, John Wiley and Sons. *BootCL* Bootstrapping test for chromosomal localization. *BootPR* Bootstrap prediction intervals and bias-corrected forecasting. *BradleyTerry* Specify and fit the Bradley-Terry model and structured versions. *Brobdingnag* Very large numbers in R. *BSDA* Data sets for the book "Basic Statistics and Data Analysis" by L. J. Kitchens, 2003, Duxbury. *BsMD* Bayes screening and model discrimination follow-up designs. *CCA* Canonical correlation analysis. *CDNmoney* Components of Canadian monetary aggregates. *CGIwithR* Facilities for the use of R to write CGI scripts. *CORREP* Multivariate correlation estimation. *COZIGAM* Constrained Zero-Inflated Generalized Additive Model. *CPE* Concordance probability estimates in survival analysis. *CTFS* The CTFS large plot forest dynamics analyses. *CVThresh* Level-dependent Cross-Validation Thresholding. *Cairo* Graphics device using cairographics library for creating high-quality PNG, PDF, SVG, PostScript output and interactive display devices such as X11. *CarbonEL* Carbon Event Loop. *CellularAutomaton* One-dimensional cellular automata. *ChainLadder* Mack- and Munich-chain-ladder methods for insurance claims reserving. *CircStats* Circular Statistics, from "Topics in Circular Statistics" by S. Rao Jammalamadaka and A. SenGupta, 2001, World Scientific. *CoCo* Graphical modeling for contingency tables using CoCo. *ComPairWise* Compare phylogenetic or population genetic data alignments. *CombMSC* Combined Model Selection Criteria. *CompetingRiskFrailty* Competing risk model with frailties for right censored survival data. *Containers* Object-oriented data structures including stack, queue, and binary search tree. *CoxBoost* Cox survival models by likelihood based boosting. *CreditMetrics* Functions for calculating the CreditMetrics risk model. *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. *DAAGbio* Data sets and functions, for demonstrations with expression arrays. *DAAGxtras* Data sets and functions additional to *DAAG*. *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. *DCluster* A set of functions for the detection of spatial clusters of diseases using count data. *DDHFm* Variance stabilization by Data-Driven Haar-Fisz (for microarrays). *DEA* Data Envelopment Analysis. *DEoptim* Differential Evolution Optimization. *DICOM* Import and manipulate medical imaging data using the Digital Imaging and Communications in Medicine (DICOM) Standard. *DPpackage* Semiparametric Bayesian analysis using Dirichlet process priors. *Davies* Functions for the Davies quantile function and the Generalized Lambda distribution. *Defaults* Create global function defaults. *DescribeDisplay* R interface to the DescribeDisplay GGobi plugin. *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. *Devore5* Data sets and sample analyses from "Probability and Statistics for Engineering and the Sciences (5th ed)" by Jay L. Devore, 2000, Duxbury. *Devore6* Data sets and sample analyses from "Probability and Statistics for Engineering and the Sciences (6th ed)" by Jay L. Devore, 2003, Duxbury. *Devore7* Data sets and sample analyses from "Probability and Statistics for Engineering and the Sciences (7th ed)" by Jay L. Devore, 2008, Thomson. *DierckxSpline* R companion to "Curve and Surface Fitting with Splines" by Paul Dierckx, 1993, Oxford University Press. *EDR* Estimation of the effective dimension reduction (EDR) space. *EMC* Evolutionary Monte Carlo (EMC) algorithm. *EMCC* Evolutionary Monte Carlo (EMC) methods for clustering. *EMD* Empirical mode decomposition and Hilbert spectral analysis. *EMV* Estimation of missing values in a matrix by a k-th nearest neighboors algorithm. *ETC* Tests and simultaneous confidence intervals for equivalence to control. *EbayesThresh* Empirical Bayes thresholding and related methods. *Ecdat* Data sets from econometrics textbooks. *EffectiveDose* Estimate the effective dose level for quantal bioassay data by nonparametric techniques. *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. *Epi* Statistical analysis in epidemiology, with functions for demographic and epidemiological analysis in the Lexis diagram. *FAiR* Factor Analysis in R, using genetic algorithms. *FGN* Fractional Gaussian Noise model fitting. *FKBL* Fuzzy Knowledge Base Learning. *FactoMineR* Factor analysis and data mining with R. *Fahrmeir* Data from the book "Multivariate Statistical Modelling Based on Generalized Linear Models" by Ludwig Fahrmeir and Gerhard Tutz (1994), Springer. *FieldSim* Random fields simulations. *FinTS* Companion to the book "Analysis of Financial Time Series" by Ruey Tsay (2005), Wiley (2nd edition). *FitAR* Subset AR model fitting. *Flury* Data sets from from "A First Course in Multivariate Statistics" by Bernard Flury (1997), Springer. *FrF2* Analysis of fractional factorial designs with 2-level factors. *FracSim* Simulation of one- and two-dimensional fractional and multifractional Levy motions. *FunCluster* Functional profiling of cDNA microarray expression data. *FunNet* Functional analysis of gene co-expression networks. *G1DBN* Dynamic Bayesian Network inference using 1st order conditional dependencies. *GAMBoost* Generalized additive models by likelihood based boosting. *GDD* Platform and X11 independent device for creating bitmaps (png, gif and jpeg) using the GD graphics library. *GEOmap* Topographic and geologic mapping. *GLDEX* Fit RS and FMKL generalised lambda distributions using discretized and maximum likelihood methods. *GOSim* Computation of functional similarities between GO terms and gene products. *GPArotation* Gradient Projection Algorithm rotation for factor analysis. *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. *GSA* Gene set analysis. *GSM* Gamma Shape Mixture. *GenABEL* Genome-wide SNP association analysis. *GenKern* Functions for generating and manipulating generalised binned kernel density estimates. *GeneCycle* Identification of periodically expressed genes. *GeneF* Generalized F-statistics. *GeneNT* Relevance or Dependency network and signaling pathway discovery. *GeneNet* Modeling and inferring gene networks. *GeneTS* A package for analysing multiple gene expression time series data. Currently, implements methods for cell cycle analysis and for inferring large sparse graphical Gaussian models. *Geneland* MCMC inference from individual genetic data based on a spatial statistical model. *GeoXp* Interactive exploratory spatial data analysis. *GillespieSSA* Gillespie's Stochastic Simulation Algorithm (SSA). *GroupSeq* Computations related to group-seqential boundaries. *HH* Support software for "Statistical Analysis and Data Display" by Richard M. Heiberger and Burt Holland, Springer, 2005. *HI* Simulation from distributions supported by nested hyperplanes. *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. *HTMLapplets* Functions inserting dynamic scatterplots and grids in documents generated by *R2HTML*. *HFWutils* Utilities by H. Felix Wittmann: Excel connections, string matching, and passing by reference. *HardyWeinberg* Graphical tests for Hardy-Weinberg equilibrium. *HiddenMarkov* Hidden Markov Models. *HighProbability* Estimation of the alternative hypotheses having frequentist or Bayesian probabilities at least as great as a specified threshold, given a list of p-values. *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. *HydroMe* Estimation of soil hydraulic parameters from experimental data. *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. *IBrokers* R API to Interactive Brokers Trader Workstation. *ICE* Iterated Conditional Expectation: kernel estimators for interval-censored data. *ICEinfer* Incremental Cost-Effectiveness (ICE) statistical inference (from two unbiased samples). *ICS* ICS/ICA computation based on two scatter matrices. *ICSNP* Tools for multivariate nonparametrics. *IDPmisc* Utilities from the Institute of Data Analyses and Process Design, IDP/ZHW. *ISA* Functions to support "Introduzione alla Statistica Applicata con esempi in R" by Federico M. Stefanini, Pearson Education Milano, 2007. *ISOcodes* ISO language, territory, currency, script and character codes. *ISwR* Data sets for "Introductory Statistics with R" by Peter Dalgaard, 2002, Springer. *Icens* Functions for computing the NPMLE for censored and truncated data. *Iso* Functions to perform isotonic regression. *JADE* JADE and ICA performance criteria. *JGR* Java Gui for R. *JM* Joint Modeling of longitudinal and survival data. *JavaGD* Java Graphics Device. *JointGLM* Joint modeling of mean and dispersion through two interlinked GLM's. _Defunct_ in favor of *JointModeling*. *JointModeling* Joint modeling of mean and dispersion. *JudgeIt* Calculates bias, responsiveness, and other characteristics of two-party electoral systems, with district-level electoral and other data. *KMsurv* Data sets and functions for "Survival Analysis, Techniques for Censored and Truncated Data" by Klein and Moeschberger, 1997, Springer. *Kendall* Kendall rank correlation and Mann-Kendall trend test. *KernSmooth* Functions for kernel smoothing (and density estimation) corresponding to the book "Kernel Smoothing" by M. P. Wand and M. C. Jones, 1995. _Recommended_. *LDheatmap* Heat maps of linkage disequilibrium measures. *LLAhclust* Hierarchical clustering of variables or objects based on the likelihood linkage analysis method. *LLN* Learning with latent networks. *LMGene* Date transformation and identification of differentially expressed genes in gene expression arrays. *LearnBayes* Functions for Learning Bayesian Inference. *Lmoments* Estimation of L-moments and the parameters of normal and Cauchy polynomial quantile mixtures. *LogConcDEAD* Maximum likelihood estimation of a log-concave density. *LogicReg* Routines for Logic Regression. *LoopAnalyst* A collection of tools to conduct Levins' Loop Analysis. *LowRankQP* Low Rank Quadratic Programming: QP problems where the hessian is represented as the product of two matrices. *MASS* Functions and datasets from the main package of Venables and Ripley, "Modern Applied Statistics with S". Contained in the `VR' bundle. _Recommended_. *MBA* Multilevel B-spline Approximation. *MBESS* Methods for the Behavioral, Educational, and Social Sciences. *MCMCpack* Markov chain Monte Carlo (MCMC) package: functions for posterior simulation for a number of statistical models. *MCPAN* Multiple comparisons using normal approximation. *MCPMod* Design and analysis of dose-finding studies. *MChtest* Monte Carlo hypothesis tests. *MEMSS* Data sets and sample analyses from "Mixed-effects Models in S and S-PLUS" by J. Pinheiro and D. Bates, 2000, Springer. *MFDA* Model Based Functional Data Analysis. *MKLE* Maximum kernel likelihood estimation. *MLDS* Maximum Likelihood Difference Scaling. *MLEcens* Computation of the MLE for bivariate (interval) censored data. *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. *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. *MSBVAR* Bayesian vector autoregression models, impulse responses and forecasting. *MarkedPointProcess* Non-parametric analysis of the marks of marked point processes. *MasterBayes* Maximum likelihood and Markov chain Monte Carlo methods for pedigree reconstruction, analysis and simulation. *MatchIt* Select matched samples of the original treated and control groups with similar covariate distributions. *Matching* Multivariate and propensity score matching with formal tests of balance. *Matrix* A Matrix package. *MiscPsycho* Miscellaneous Psychometrics. *MultEq* Equivalence tests and simultaneous confidence intervals for multiple endpoints. *NADA* Methods described in "Nondetects And Data Analysis: Statistics for Censored Environmental Data" by Dennis R. Helsel, 2004, John Wiley and Sons. *NISTnls* A set of test nonlinear least squares examples from NIST, the U.S. National Institute for Standards and Technology. *NMMAPSlite* U.S. National Morbidity, Mortality, and Air Pollution Study data lite. *NORMT3* Evaluates complex erf, erfc and density of sum of Gaussian and Student's t. *NRAIA* Data sets with sample code from "Nonlinear Regression Analysis and Its Applications" by Doug Bates and Donald Watts, 1988, Wiley. *NestedCohort* Survival analysis for cohorts with missing covariate information. *ORMDR* Odds ratio based multivactor-dimensionality reduction method for detecting gene-gene interactions. *Oarray* Arrays with arbitrary offsets. *PARccs* Estimation of partial attributable risks (PAR) from case-control data. *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. *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. *PBSmodelling* Software to facilitate the design, testing, and operation of computer models. *PET* Simulation and reconstruction of PET images. *PHYLOGR* Manipulation and analysis of phylogenetically simulated data sets (as obtained from PDSIMUL in package PDAP) and phylogenetically-based analyses using GLS. *PK* Estimation of pharmacokinetic parameters. *PKfit* A nonlinear regression (including a genetic algorithm) program designed to deal with curve fitting for pharmacokinetics. ** Unified computational interfaces for pop PK. *POT* Generalized Pareto distribution and Peaks Over Threshold. *PSAgraphics* Propensity Score Analysis Graphics. *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. *Peaks* Spectrum manipulation: background estimation, Markov smoothing, deconvolution and peaks search functions. *PearsonICA* Independent component analysis using score functions from the Pearson system. *PerformanceAnalytics* Econometric tools for performance and risk analysis. *PhySim* Phylogenetic tree simulation. *PresenceAbsence* Presence-absence model evaluation. *ProbForecastGOP* Probabilistic weather field forecasts using the Geostatistical Output Perturbation method introduced by Gel, Raftery and Gneiting (2004). *ProbeR* Reliability for gene expression from Affymetrix chip. *ProfessR* Programs to determine student grades and create examinations from question banks. *PwrGSD* Power in a Group Sequential Design. *QCA* Qualitative Comparative Analysis for crisp sets. *QCAGUI* QCA Graphical User Interface. *QRMlib* Code to examine Quantitative Risk Management concepts. *QuantPsyc* Quantitative Psychology tools. *R.cache* Fast and light-weight caching of objects. *R.huge* Methods for accessing huge amounts of data. *R.matlab* Read and write of MAT files together with R-to-Matlab connectivity. *R.methodsS3* Utility functions for defining S3 methods. *R.oo* R object-oriented programming with or without references. *R.rsp* R server pages. *R.utils* Utility classes and methods useful when programming in R and developing R packages. *R2HTML* Functions for exporting R objects & graphics in an HTML document. *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. *RArcInfo* Functions to import Arc/Info V7.x coverages and data. *RBGL* Interface to the boost C++ graph library. *RBloomberg* Fetch data from a Bloomberg API using COM. *RColorBrewer* ColorBrewer palettes for drawing nice maps shaded according to a variable. *RDieHarder* R interface to the dieharder random number generator test suite. *RExcelInstaller* Integration of R and Excel under MS Windows. *RFA* Regional Frequency Analysis. *RFOC* Graphics for spherical distributions and earthquake focal mechanisms. *RFreak* An R interface to a modified version of the Free Evolutionary Algorithm Kit FrEAK.g *RGtk2* Facilities for programming graphical interfaces using Gtk (the Gimp Tool Kit) version 2. *RGrace* Mouse/menu driven interactive plotting application. *RGraphics* Data and functions from the book "R Graphics" by Paul Murrell, 2005, Chapman & Hall/CRC. *RHmm* Hidden Markov Model simulations and estimations. *RII* Estimation of the relative index of inequality for interval-censored data using natural cubic splines. *RJDBC* Access to databases through the JDBC interface. *RJaCGH* Reversible Jump MCMC for the analysis of CGH arrays. *RLMM* A genotype calling algorithm for Affymetrix SNP arrays. *RLRsim* Exact (Restricted) Likelihood Ratio tests for mixed and additive models. *RLadyBug* Analysis of infectious diseases using stochastic epidemic models. *RMySQL* An interface between R and the MySQL database system. *RNetCDF* An interface to Unidata's NetCDF library functions (version 3) and furthermore access to Unidata's udunits calendar conversions. *ROCR* Visualizing the performance of scoring classifiers. *RODBC* An ODBC database interface. *ROptEst* Optimally robust estimation. *ROptEstTS* Optimally robust estimation for regression-type models. *ROracle* Oracle Database Interface driver for R. Uses the ProC/C++ embedded SQL. *RPMG* Poor Man's Gui: create interactive R analysis sessions. *RPyGeo* ArcGIS Geoprocessing in R via Python. *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. *RSAGA* SAGA geoprocessing and terrain analysis in R. *RSEIS* Seismic time series analysis tools. *RSQLite* Database Interface R driver for SQLite. Embeds the SQLite database engine in R. *RScaLAPACK* An interface to ScaLAPACK functions from R. *RSVGTipsDevice* An R SVG graphics device with dynamic tips and hyperlinks. *RSeqMeth* analysis of Sequenom EpiTYPER data. *RSvgDevice* A graphics device for R that uses the new w3.org XML standard for Scalable Vector Graphics. *RTOMO* Visualization for seismic tomography. *RTisean* R interface to Tisean algorithms. *RUnit* Functions implementing a standard Unit Testing framework, with additional code inspection and report generation tools. *RWeka* An R interface to Weka, a rich collection of machine learning algorithms for data mining tasks. *RWinEdt* A plug in for using WinEdt as an editor for R. *RXshrink* Maximum Likelihood Shrinkage via Ridge or Least Angle Regression. *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). *RandVar* Implementation of random variables by means of S4 classes and methods. *RandomFields* Creating random fields using various methods. *RankAggreg* Weighted rank aggregation. *RaschSampler* Sampling binary matrices with fixed margins. *Rcapture* Loglinear models in capture-recapture experiments. *Rcmdr* A platform-independent basic-statistics GUI (graphical user interface) for R, based on the *tcltk* package. *RcmdrPlugin.Export* Graphically export objects to LaTeX or HTML. *RcmdrPlugin.FactoMineR* Rcmdr plug-in for the *FactoMineR* package. *RcmdrPlugin.HH* Rcmdr support for the introductory course at Temple University. *RcmdrPlugin.IPSUR* Rcmdr plugin for "Introduction to Probability and Statistics Using R". *RcmdrPlugin.TeachingDemos* Rcmdr Teaching Demos plug-in. *RcmdrPlugin.epack* Rcmdr epack demos plug-in. *Rcplex* R interface to CPLEX solvers for linear, quadratic, and (linear and quadratic) mixed integer programs. *Reliability* Functions for estimating parameters in software reliability models. *ResistorArray* Electrical properties of resistor networks. *Rfwdmv* Forward Search for Multivariate Data. *Rglpk* R/GNU Linear Programming Kit interface. *RiboSort* Classification and analysis of microbial community profiles. *Rigroup* Provides small integer group functions. *Rlab* Functions and data sets for the NCSU ST370 class. *Rlsf* Interface to the LSF queuing system. *Rmdr* R-Multifactor Dimensionality Reduction. *Rmetrics* Financial engineering and computational finance. *Rmpi* An interface (wrapper) to MPI (Message-Passing Interface) APIs. It also provides an interactive R slave environment in which distributed statistical computing can be carried out. *RobLox* Optimally robust influence curves for location and scale. *RobRex* Optimally robust influence curves for regression and scale. *Rpad* Utility functions for the Rpad workbook-style interface. *Rsac* Seismic tools for R. *Rserve* A socket server (TCP/IP or local sockets) which allows binary requests to be sent to R. *Rsundials* SUite of Nonlinear DIfferential ALgebraic equations Solvers in R. *Rsymphony* An R interface to the SYMPHONY mixed integer linear program (MILP) solver. *Runuran* Interface to the UNU.RAN library for Universal Non-Uniform RANdom variate generators. *Rvelslant* Downhole seismic analysis. *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. *Ryacas* An R interfaces to the yacas computer algebra system. *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. *SASxport* Read and write SAS XPORT files. *SIN* A SINful approach to selection of Gaussian Graphical Markov Models. *SLmisc* Miscellaneous Functions for analysis of gene expression data at SIRS-Lab GmbH. *SMC* Sequential Monte Carlo (SMC) Algorithm. *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. *SNPassoc* SNP-based whole genome association studies. *SNPmaxsel* Maximally selected statistics for SNP data. *SRPM* Shared Reproducibility Package Management. *SQLiteDF* Stores data frames and matrices in SQLite tables. *SciViews* A bundle of packages to implement a full reusable GUI API for R. Contains *svGUI* with the main GUI features, *svDialogs* for the dialog boxes, *svIO* for data import/export, *svMisc* with miscellaneous supporting functions, and *svViews* providing views and report features (views are HTML presentations of the content of R objects, combining text, tables and graphs in the same document). *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. *SenSrivastava* Collection of datasets from "Regression Analysis, Theory, Methods and Applications" by A. Sen and M. Srivastava, 1990, Springer. *SensoMineR* Sensory data analysis. *SeqKnn* Sequential KNN imputation. *SharedHT2* Shared Hotelling T^2 test for small sample microarray experiments. *SimHap* A comprehensive modeling framework for epidemiological outcomes and a multiple-imputation approach to haplotypic analysis of population-based data. *Snowball* Snowball stemmers. *SoDA* Utilities and examples from the book "Software for Data Analysis: Programming with R" by John Chambers, Springer, 2008. *SoPhy* Soil Physics Tools: simulation of water flux and solute transport in soil. *SparseLogReg* Sparse logistic regression. *SparseM* Basic linear algebra for sparse matrices. *SpatialNP* Multivariate nonparametric methods based on spatial signs and ranks. *SpherWave* Spherical Wavelets and SW-based spatially adaptive methods. *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. *StatDataML* Read and write StatDataML. *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). *SwissAir* Air quality data of Switzerland for one year in 30 min resolution. *SyNet* Inference and analysis of sympatry networks. *Synth* Causal inference using the synthetic control group method. *TIMP* A problem solving environment for fitting superposition models. *TRAMPR* Terminal Restriction Fragment Length Polymorphism (TRFLP) Analysis and Matching Package for R. *TSA* Functions and datasets detailed in the book "Time Series Analysis With Applications in R" (second edition) by Jonathan Cryer and Kung-Sik Chan, 2008, Springer. *TSHRC* Two Stage Hazard Rate Comparison. *TSMySQL* Time Series Database Interface extensions for MySQL. *TSP* Traveling Salesperson Problem (TSP). *TSSQLite* Time Series Database Interface extensions for SQLite. *TSdbi* Time Series Database Interface. *TSpadi* Connect to a time series database (e.g., Fame) via PADI (Protocol for Application Database Interface), using the *TSdbi* infrastructure. *TTR* Technical Trading Rules. *TWIX* Trees WIth eXtra splits. *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. *TwslmSpikeWeight* Normalization of cDNA microarray data with the two-way semilinear model (TW-SLM). *TwoWaySurvival* Additive two-way hazards modeling of right censored survival data. *UNF* Tools for creating universal numeric fingerprints for data. *USPS* Unsupervised and Supervised methods of Propensity Score adjustment for bias. *Umacs* Universal MArkov Chain Sampler. *UsingR* Data sets to accompany the textbook "Using R for Introductory Statistics" by J. Verzani, 2005, Chapman & Hall/CRC. *VDCutil* Utilities supporting VDC, an open source digital library system for quantitative data. *VGAM* Vector Generalized Linear and Additive Models. *VIM* Visualization and Imputation of Missing Values. *VLMC* Functions, classes & methods for estimation, prediction, and simulation (bootstrap) of VLMC (Variable Length Markov Chain) models. *VaR* Methods for calculation of Value at Risk (VaR). *WINRPACK* Reads in WIN pickfile and waveform files. *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. *WeedMap* Map of weed intensity. *WhatIf* Software for evaluating counterfactuals. *XML* Tools for reading XML documents and DTDs. *XReg* Extreme regression. *YaleToolkit* Data exploration tools from Yale University. *ZIGP* Zero Inflated Generalized Poisson (ZIGP) regression models. *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. *aaMI* Mutual information for protein sequence alignments. *abind* Combine multi-dimensional arrays. *accuracy* A suite of tools designed to test and improve the accuracy of statistical computation. *acepack* ACE (Alternating Conditional Expectations) and AVAS (Additivity and VAriance Stabilization for regression) methods for selecting regression transformations. *actuar* Functions related to actuarial science applications. *ada* Performs boosting algorithms for a binary response. *adabag* Adaboost.M1 and Bagging. *adapt* Adaptive quadrature in up to 20 dimensions. *ade4* Multivariate data analysis and graphical display. *ade4TkGUI* Tcl/Tk Graphical User Interface for *ade4*. *adegenet* Genetic data handling for multivariate analysis using *ade4*. *adehabitat* A collection of tools for the analysis of habitat selection by animals. *adimpro* Adaptive smoothing of digital images. *adk* Anderson-Darling K-sample test and combinations of such tests. *adlift* Adaptive Wavelet transforms for signal denoising. *ads* Spatial point patterns analysis. *agce* Analysis of growth curve experiments. *agricolae* Statistical procedures for agricultural research. *agsemisc* Miscellaneous plotting and utility functions. *akima* Linear or cubic spline interpolation for irregularly gridded data. *allelic* A fast, unbiased and exact allelic exact test. *alr3* Methods and data to accompany the textbook "Applied Linear Regression" by S. Weisberg, 2005, Wiley. *amap* Another Multidimensional Analysis Package. *anacor* Simple and Canonical Correspondence Analysis. *analogue* Analogue methods for palaeoecology. *anapuce* Tools for microarray data analysis. *animation* Demonstrate animations in statistics. *anm* Analog model for statistical/empirical downscaling. *aod* Analysis of Overdispersed Data. *apTreeshape* Analyses of phylogenetic treeshape. *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. *aplpack* Another PLot PACKage: stem.leaf, bagplot, faces, spin3R, .... *argosfilter* Argos locations filter. *arm* Data Analysis using Regression and Multilevel/hierarchical models. *arrayImpute* Missing imputation for microarray data. *arrayMissPattern* Exploratory analysis of missing patterns for microarray data. *ars* Adaptive Rejection Sampling. *arules* Mining association rules and frequent itemsets with R. *arulesSequences* Mining frequent sequences. *ash* David Scott's ASH routines for 1D and 2D density estimation. *aspace* Estimating centrographic statistics and computational geometries from spatial point patterns. *assist* A suite of functions implementing smoothing splines. *aster* Functions and datasets for Aster modeling (forest graph exponential family conditional or unconditional canonical statistic models for life history trait modeling). *asypow* A set of routines that calculate power and related quantities utilizing asymptotic likelihood ratio methods. *asuR* Functions and data sets for a lecture in "Advanced Statistics using R". *aws* Functions to perform adaptive weights smoothing. *backfitRichards* Backfitted independent values of Richards curves. *backtest* Exploring portfolio-based hypotheses about financial instruments. *bayesSurv* Bayesian survival regression with flexible error and (later on also random effects) distributions. *bayescount* Bayesian analysis of count distributions with JAGS. *bayesm* Bayes Inference for Marketing/Micro-econometrics. *bayesmix* Bayesian mixture models of univariate Gaussian distributions using JAGS. *bbmle* Modifications and extensions of *stats4* MLE code. *bcp* Bayesian Change Point based on the Barry and Hartigan product partition model. *benchden* 28 benchmark densities from Berlinet/Devroye (1994). *bentcableAR* Bent-cable regression for independent data or autoregressive time series. *betareg* Beta regression for modeling rates and proportions. *bs* Utilities for the Birnbaum-Saunders distribution. *biOps* Basic image operations and image processing. *biOpsGUI* GUI for Basic image operations. *biclust* BiCluster algorithms. *bicreduc* Reduction algorithm for the NPMLE for the distribution function of bivariate interval-censored data. *bifactorial* Inferences for bi- and trifactorial trial designs. *biglm* Linear regression for data too large to fit in memory. *bim* Bayesian interval mapping diagnostics: functions to interpret QTLCart and Bmapqtl samples. *binGroup* Evaluation and experimental design for binomial group testing. *binMto* Asymptotic simultaneous confidence intervals for many-to-one comparisons of proportions. *bindata* Generation of correlated artificial binary data. *binom* Binomial confidence intervals for several parameterizations. *bio.infer* Compute biological inferences. *biopara* Self-contained parallel system for R. *bipartite* Visualises bipartite networks and calculates some ecological indices. *birch* Dealing with very large datasets using BIRCH. *bitops* Functions for Bitwise operations on integer vectors. *bivpois* Bivariate Poisson models using the EM algorithm. *blighty* Function for drawing the coastline of the United Kingdom. *blockTools* Block, randomly assign, and diagnose potential problems between units in randomized experiments. *blockrand* Randomization for block random clinical trials. *bnlearn* Bayesian network structure learning. *boa* Bayesian Output Analysis Program for MCMC. *boolean* Boolean logit and probit: a procedure for testing Boolean hypotheses. *boost* Boosting methods for real and simulated data, featuring `BagBoost', `LogitBoost', `AdaBoost', and `L2Boost'. *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. _Recommended_. *bootStepAIC* Model selection by bootstrapping the `stepAIC()' procedure. *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. *bqtl* QTL mapping toolkit for inbred crosses and recombinant inbred lines. Includes maximum likelihood and Bayesian tools. *brainwaver* Basic wavelet analysis of multivariate time series with a vizualisation and parametrization using graph theory. *brew* Templating framework for report generation. *brglm* Bias-reduction in binomial-response GLMs. *brlr* Bias-reduced logistic regression: fits logistic regression models by maximum penalized likelihood. *bspec* Bayesian inference on the (discrete) power spectrum of time series. *bvls* The Stark-Parker algorithm for bounded-variable least squares. *ca* Simple, multiple and joint Correspondence Analysis. *caMassClass* Processing and Classification of protein mass spectra (SELDI) data. *caTools* Miscellaneous utility functions, including reading/writing ENVI binary files, a LogitBoost classifier, and a base64 encoder/decoder. *cacheSweave* Tools for caching Sweave computations. *cacher* Tools for caching and distributing statistical analyses. *cairoDevice* Loadable CAIRO/GTK device driver. *calib* Statistical tool for calibration of plate based bioassays. *calibrate* Calibration of biplot axes. *candisc* Generalized canonical discriminant analysis. *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. *caret* Classification and REgression Training. *caretLSF* Classification and REgression Training, LSF style. *caretNWS* Classification and REgression Training in parallel using NetworkSpaces. *cat* Analysis of categorical-variable datasets with missing values. *catmap* Case-control and TDT meta-analysis package. *catspec* Special models for categorical variables. *cba* Clustering for Business Analytics, including implementations of Proximus and Rock. *cclust* Convex clustering methods, including 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. *celsius* Retrieve Affymetrix microarray measurements and metadata from Celsius. *cfa* Analysis of configuration frequencies. *cggd* Continuous Generalized Gradient Descent. *cgh* Analysis of microarray comparative genome hybridisation data using the Smith-Waterman algorithm. *cghFLasso* Hot spot detecting for CGH array data with fused lasso regression. *chplot* Augmented convex hull plots: informative and nice plots for grouped bivariate data. *changeLOS* Change in length of hospital stay (LOS). *cheb* Discrete linear Chebyshev approximation. *chemCal* Calibration functions for analytical chemistry. *chemometrics* Companion to the book "Introduction to Multivariate Statistical Analysis in Chemometrics" by K. Varmuza and P. Filzmoser, CRC Press, to appear. *choplump* Choplump tests (permutation tests for comparing two groups with some positive but many zero responses). *chron* A package for working with chronological objects (times and dates). *cir* Nonparametric estimation of monotone functions via isotonic regression and centered isotonic regression. *circular* Circular statistics, from "Topics in Circular Statistics" by Rao Jammalamadaka and A. SenGupta, 2001, World Scientific. *clValid* Statistical and biological validation of clustering results. *clac* Clust Along Chromosomes, a method to call gains/losses in CGH array data. *class* Functions for classification (k-nearest neighbor and LVQ). Contained in the `VR' bundle. _Recommended_. *classGraph* Construct graph of S4 class hierarchies. *classInt* Choose univariate class intervals for mapping or other graphics purposes. *classPP* Projection Pursuit for supervised classification. *classifly* Explore classification models in high dimensions. *clim.pact* Climate analysis and downscaling for monthly and daily data. *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. *clinfun* Utilities for clinical study design and data analyses. *clue* CLUster Ensembles. *clustTool* GUI for clustering data with spatial information. *cluster* Functions for cluster analysis. _Recommended_. *clusterGeneration* Random cluster generation (with specified degree of separation). *clusterRepro* Reproducibility of gene expression clusters. *clusterSim* Searching for optimal clustering procedure for a data set. *clusterfly* Explore clustering interactively using R and GGobi. *clustvarsel* Variable selection for model-based clustering. *clv* Cluster validation techniques. *cmprsk* Estimation, testing and regression modeling of subdistribution functions in competing risks. *cobs99* Constrained B-splines: outdated 1999 version. *cobs* Constrained B-splines: qualitatively constrained (regression) smoothing via linear programming and sparse matrices. *cocorresp* Co-correspondence analysis ordination methods for community ecology. *coda* Output analysis and diagnostics for Markov Chain Monte Carlo (MCMC) simulations. *codetools* Code analysis tools. _Recommended_ for R 2.5.0 or later. *coin* COnditional INference procedures for the general independence problem including two-sample, K-sample, correlation, censored, ordered and multivariate problems. *colorRamp* Builds single and double gradient color maps. *colorspace* Mapping between assorted color spaces. *combinat* Combinatorics utilities. *compHclust* Complementary hierarchical clustering. *compOverlapCorr* Comparing overlapping correlation coefficients. *compositions* Functions for the consistent analysis of compositional data (e.g., portions of substances) and positive numbers (e.g., concentrations). *concor* Concordance, providing "SVD by blocks". *concord* Measures of concordance and reliability. *conf.design* A series of simple tools for constructing and manipulating confounded and fractional factorial designs. *connectedness* Find disconnected sets for two-way classification. *contfrac* Continued fractions. *contrast* A collection of contrast methods. *copula* Classes of commonly used copulas (including elliptical and Archimedian), and methods for density, distribution, random number generators, and plotting. *corpora* Utility functions for the statistical analysis of corpus frequency data. *corpcor* Efficient estimation of covariance and (partial) correlation. *corrgram* Plot a correlogram. *corrperm* Permutation tests of correlation with repeated measurements. *covRobust* Robust covariance estimation via nearest neighbor cleaning. *coxphf* Cox regression with Firth's penalized likelihood. *coxrobust* Robust Estimation in the Cox proportional hazards regression model. *cramer* Routine for the multivariate nonparametric Cramer test. *crank* Functions for completing and recalculating rankings. *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. *crosshybDetector* Detection of cross-hybridization events in microarray experiments. *crq* Quantile regression for randomly censored data. *cslogistic* Likelihood and posterior analysis of conditionally specified logistic regression models. *cts* Continuous time autoregressive models and the Kalman filter. *ctv* Server-side and client-side tools for CRAN task views. *cwhmisc* Miscellaneous functions by Christian W. Hoffmann. *cyclones* Cyclone identification. *date* Functions for dealing with dates. The most useful of them accepts a vector of input dates in any of the forms `8/30/53', `30Aug53', `30 August 1953', ..., `August 30 53', or any mixture of these. *dblcens* Calculates the NPMLE of the survival distribution for doubly censored data. *ddesolve* Solver for Delay Differential Equations. *deal* Bayesian networks with continuous and/or discrete variables can be learned and compared from data. *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. *degreenet* Models for skewed count distributions relevant to networks. *deldir* Calculates the Delaunay triangulation and the Dirichlet or Voronoi tesselation (with respect to the entire plane) of a planar point set. *delt* Estimation of multivariate densities with adaptive histograms. *demogR* Analysis of age-structured demographic models. *denpro* Visualization of multivariate density functions and estimates with level set trees and shape trees, and visualization of multivariate data with tail trees. *depmix* Dependent Mixture Models: fit (multi-group) mixtures of latent Markov models on mixed categorical and continuous (time series) data. *depmixS4* Dependent Mixture Models: fit latent (hidden) Markov models on mixed categorical and continuous (time series) data. *desirability* Desirabiliy function optimization and ranking. *dglm* Double generalized linear models. *diagram* Functions for visualising simple graphs (networks) and plotting flow diagrams. *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. *dice* Calculate probabilities of various dice-rolling events. *dichromat* Color schemes for dichromats: collapse red-green distinctions to simulate the effects of colour-blindness. *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. *diptest* Compute Hartigan's dip test statistic for unimodality. *dispmod* Functions for modelling dispersion in GLMs. *distr* An object orientated implementation of distributions and some additional functionality. *distrDoc* Documentation for packages *distr*, *distrEx*, *distrSim*, and *distrTEst*. *distrEx* Extensions of package *distr*. *distrSim* Simulation classes based on package *distr*. *distrTEst* Estimation and Testing classes based on package *distr*. *distributions* Probability distributions based on TI-83 Plus. *diveMove* Dive analysis and calibration. *dlm* Maximum likelihood and Bayesian analysis of Dynamic Linear Models. *doBy* Facilities for groupwise computations. *dplR* Dendrochronology Program Library in R. *dprep* Data preprocessing and visualization functions for classification. *dr* Functions, methods, and datasets for fitting dimension reduction regression, including pHd and inverse regression methods SIR and SAVE. *drc* Non-linear regression analysis for multiple curves with focus on concentration-response, dose-response and time-response curves. *drm* Regression and association models for clustered categorical responses. *drfit* Dose-response data evaluation. *dse* Dynamic System Estimation, a multivariate time series package bundle. Contains *dse1* (the base system, including multivariate ARMA and state space models) and *dse2* (extensions for evaluating estimation techniques, forecasting, and for evaluating forecasting model). *dtt* Discrete Trigonometric Transforms. *dtw* Dynamic Time Warping algorithms. *dyn* Time series regression. *dynamicGraph* Interactive graphical tool for manipulating graphs. *dynamicTreeCut* Methods for detection of clusters in hierarchical clustering dendrograms. *dynlm* Dynamic linear models and time series regression. *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. *eRm* Estimating extended Rasch models. *earth* Earth: multivariate adaptive regression spline models. *eba* Fitting and testing probabilistic choice models, especially the BTL, elimination-by-aspects (EBA), and preference tree (Pretree) models. *ecespa* Functions and data for spatial point pattern analysis. *eco* Fitting Bayesian models of ecological inference in 2 by 2 tables. *ecodist* Dissimilarity-based functions for ecological analysis. *effects* Graphical and tabular effect displays, e.g., of interactions, for linear and generalised linear models. *eha* A package for survival and event history analysis. *eiPack* Ecological inference and higher-dimension data management. *eigenmodel* Semiparametric factor and regression models for symmetric relational data. *elasticnet* Elastic net regularization and variable selection. *ellipse* Package for drawing ellipses and ellipse-like confidence regions. *elliptic* A suite of elliptic and related functions including Weierstrass and Jacobi forms. *elrm* Exact Logistic Regression via MCMC. *emdbook* Data sets and auxiliary functions for "Ecological Models and Data" by Ben Bolker (work in progress). *emme2* Functions to read from and write to an EMME/2 databank. *emplik* Empirical likelihood ratio for means/quantiles/hazards from possibly right censored data. *emu* Interface to the Emu speech database system. *energy* E-statistics (energy) tests for comparing distributions: multivariate normality, Poisson test, multivariate k-sample test for equal distributions, hierarchical clustering by e-distances. *ensembleBMA* Probabilistic forecasting using Bayesian Model Averaging of ensembles using a mixture of normal distributions. *epiR* Functions for analyzing epidemiological data. *epibasix* Elementary functions for epidemiological analysis. *epicalc* Epidemiological calculator. *epitools* Basic tools for applied epidemiology. *equivalence* Tests and graphics for assessing tests of equivalence. *ergm* An integrated set of tools to analyze and simulate networks based on exponential-family random graph models (ERGM). *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. *evdbayes* Functions for the bayesian analysis of extreme value models, using MCMC methods. *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. *exactLoglinTest* Monte Carlo exact tests for log-linear models. *exactRankTests* Computes exact p-values and quantiles using an implementation of the Streitberg/Roehmel shift algorithm. *exactmaxsel* Exact methods for maximally selected statistics for binary response variables. *experiment* Designing and analyzing randomized experiments. *extRemes* Extreme value toolkit. *fArma* The Rmetrics module for "ARMA Time Series Modelling". *fAsianOptions* The Rmetrics module for "Option Valuation". *fAssets* The Rmetrics module for "Assets Selection and Modelling". *fBasics* The Rmetrics module for "Markets and Basic Statistics". *fBonds* The Rmetrics module for "Bonds and Interest Rate Models". *fCalendar* The Rmetrics module for "Chronological and Calendarical Objects". *fCopulae* The Rmetrics module for "Dependence Structures with Copulas". *fEcofin* The Rmetrics module for "Economic and Financial Data Sets". *fExoticOptions* The Rmetrics module for "Option Valuation". *fExtremes* The Rmetrics module for "Extreme Financial Market Data". *fGarch* The Rmetrics module for "Autoregressive Conditional Heteroskedastic Modelling". *fImport* The Rmetrics module for "Chronological and Calendarical Objects". *fMultivar* The Rmetrics module for "Multivariate Market Analysis". *fNonlinear* The Rmetrics module for "Nonlinear and Chaotic Time Series Modelling". *fOptions* The Rmetrics module for "Basics of Option Valuation". *fPortfolio* The Rmetrics module for "Portfolio Selection and Optimization". *fRegression* The Rmetrics module for "Regression Based Decision and Prediction". *fSeries* The Rmetrics module for "Financial Time Series Objects". *fTrading* The Rmetrics module for "Technical Trading Analysis". *fUnitRoots* The Rmetrics module for "The Dynamical Process Behind Markets". *fUtilities* The Rmetrics module for "Rmetrics Function Utilities". *fame* Interface for FAME time series database. *far* Modelization for Functional AutoRegressive processes. *faraway* Functions and datasets for books by Julian Faraway. *fastICA* Implementation of FastICA algorithm to perform Independent Component Analysis (ICA) and Projection Pursuit. *fda* Functional Data Analysis: analysis of data where the basic observation is a function of some sort. *fdim* Functions for calculating fractal dimension. *fdrtool* Estimation and control of (local) False Discovery Rates. *feature* Feature significance for multivariate kernel density estimation. *femmeR* Output analysis of FEMME model results. *ff* Flat file database designed for large vectors and multi-dimensional arrays. *ffmanova* Fifty-fifty MANOVA. *fgac* Families of Generalized Archimedean Copulas. *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. *filehash* Simple file-based hash table. *filehashSQLite* Simple key-value database using SQLite as the backend. *financial* Solving financial problems in R. *fingerprint* Functions to operate on binary fingerprint data. *flexclust* Flexible cluster algorithms. *flexmix* Flexible Mixture Modeling: a general framework for finite mixtures of regression models using the EM algorithm. *fmri* Functions for the analysis of fMRI experiments. *forecasting* A bundle with functions and datasets for forecasting. Contains *forecast* (time series forecasting), *fma* (data sets from the book "Forecasting: Methods and Applications" by Makridakis, Wheelwright & Hyndman, 1998), and *Mcomp* (data from the M-competitions). *foreign* Functions for reading and writing data stored by statistical software like Minitab, S, SAS, SPSS, Stata, Systat, etc. _Recommended_. *forensic* Statistical methods in forensic genetics. *fork* Functions for handling multiple processes: simple wrappers around the Unix process management API calls. *fortunes* R fortunes. *forward* Forward search approach to robust analysis in linear and generalized linear regression models. *fpc* Fixed point clusters, clusterwise regression and discriminant plots. *fpca* Restricted MLE for Functional Principal Components Analysis. *fracdiff* Maximum likelihood estimation of the parameters of a fractionally differenced ARIMA(p,d,q) model (Haslett and Raftery, Applied Statistics, 1989). *fractal* Insightful fractal time series modeling and analysis. *frailtypack* Fit a shared gamma frailty model and Cox proportional hazards model using a Penalized Likelihood on the hazard function. *fso* Fuzzy set ordination. *ftnonpar* Features and strings for nonparametric regression. *fuzzyFDR* Exact calculation of fuzzy decision rules for multiple testing. *fuzzyRankTests* Fuzzy rank tests and confidence intervals. *fxregime* Frankel-Wei regression and structural change tools for estimating, testing, dating and monitoring (de facto) exchange rate regimes. *g.data* Create and maintain delayed-data packages (DDP's). *gRain* Probability propagation in graphical independence networks. *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 *dynamicGraph*. *gRc* Inference in graphical Gaussian models with edge and vertex symmetries. *gWidgets* gWidgets API for building toolkit-independent, interactive GUIs. *gWidgetsRGtk2* Toolkit implementation of *gWidgets* for *RGtk2*. *gWidgetsrJava* Toolkit implementation of *gWidgets* for *rJava*. *gWidgetstcltk* Toolkit implementation of *gWidgets* for *tcltk*. *gafit* Genetic algorithm for curve fitting. *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). *gamair* Data sets used in the book "Generalized Additive Models: An Introduction with R" by S. Wood (2006). *gamlss* Functions to fit Generalized Additive Models for Location Scale and Shape. *gamlss.cens* A GAMLSS add on package for censored data. *gamlss.dist* Extra distributions for GAMLSS modeling. *gamlss.mx* A GAMLSS add on package for fitting mixture distributions. *gamlss.nl* A GAMLSS add on package for fitting non linear parametric models. *gamlss.tr* A GAMLSS add on for generating and fitting truncated (gamlss.family) distributions. *gap* Genetic analysis package for both population and family data. *gbev* Gradient Boosted regression trees with Errors-in-Variables. *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. *gcl* Compute a fuzzy rules or tree classifier from data. *gclus* Clustering Graphics. Orders panels in scatterplot matrices and parallel coordinate displays by some merit index. *gcmrec* Parameters estimation of the general semiparametric model for recurrent event data proposed by Peña and Hollander. *gdata* Various functions to manipulate data. *gee* An implementation of the Liang/Zeger generalized estimating equation approach to GLMs for dependent data. *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. *geiger* Analysis of evolutionary diversification. *genalg* R based genetic algorithm for binary and floating point chromosomes. *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, ... *geoR* Functions to perform geostatistical data analysis including model-based methods. *geoRglm* Functions for inference in generalised linear spatial models. *geomapdata* Data for topographic and geologic mapping. *geometry* Mesh generation and surface tesselation, based on the Qhull library. *geozoo* Definition of geometric objects and display via *rggobi*. *getopt* C-like getopt behavior for R scripts. *ggm* Functions for defining directed acyclic graphs and undirected graphs, finding induced graphs and fitting Gaussian Markov models. *ggplot* Grammar of graphics based plots for R. *ggplot2* An implementation of the Grammar of Graphics in R. *ghyp* Univariate and multivariate generalized hyperbolic distributions. *giRaph* Data structures and algorithms for computations on graphs. *gibbs.met* Naive Gibbs sampling with Metropolis steps. *glasso* Graphical lasso. *gld* Basic functions for the generalised (Tukey) lambda distribution. *gllm* Routines for log-linear models of incomplete contingency tables, including some latent class models via EM and Fisher scoring approaches. *glmc* Fitting Generalized Linear Models subject to Constraints. *glmmAK* Generalized Linear Mixed Models. *glmmML* A Maximum Likelihood approach to generalized linear models with random intercept. *glmpath* L1 regularization path for Generalized Linear Models. *glpk* Interface to the GNU Linear Programming Kit (GLPK). *gmaps* Wrapper and auxiliary functions for the *maps* package to work with the grid graphics system. *gmodels* Various functions to manipulate models. *gmp* Arithmetic "without limitations" using the GNU Multiple Precision library. *gmt* Interface between the GMT 4.0 map-making software and R. *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. *goalprog* Weighted and lexicographical goal programming and optimization. *gpclib* General polygon clipping routines for R based on Alan Murta's C library. *gpls* Classification using generalized partial least squares for two-group and multi-group (more than 2 group) classification. *gplots* Various functions to draw plots. *grImport* Importing vector graphics. *granova* Graphical Analysis of Variance. *graph* Handling of graph data structures. *grasp* Generalized Regression Analysis and Spatial Predictions for R. *gregmisc* Miscellaneous functions written/maintained by Gregory R. Warnes. *gridBase* Integration of base and grid graphics. *grnnR* A Generalized Regression Neural Network. *grouped* Regression models for grouped and coarse data, under the Coarsened At Random assumption. *grplasso* Fit user specified models with group lasso penalty. *gsarima* functions for Generalized SARIMA time series simulation. *gsl* Wrapper for special functions of the Gnu Scientific Library (GSL). *gss* A comprehensive package for structural multivariate function estimation using smoothing splines. *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. *gsubfn* Miscellaneous string utilities. *gtools* Various functions to help manipulate data. *gvlma* Global Validation of Linear Models Assumptions. *hapassoc* Likelihood inference of trait associations with SNP haplotypes and other attributes usi