# R Programming

R Programming
* R Basics
** Introduction
** Sample Session
** Manage your workspace
** Settings and Installation
** Documentation
** Control Structures
** Working with functions
** Debugging
** Using C or Fortran
** Utilities
** Estimation utilities
** Packages
* Data Management
** Data types
** Working with data frames
** Importing and exporting data
** Text Processing
** Times and Dates
* Graphics
** Grammar of graphics
* Publication quality output
* Descriptive Statistics
* Mathematics
** Optimization
** Probability Distributions
** Random Number Generation
* Statistical Core Methods
** Maximum Likelihood
** Method of Moments
** Bayesian Methods
** Bootstrap
** Multiple Imputation
** Nonparametric Methods
* Regression Models
** Linear Models
** Quantile Regression
** Binomial Models
** Multinomial Models
** Tobit And Selection Models
** Count Data Models
** Duration Analysis
* Time Series
* Factor Analysis
* Classification
** Ordination
** Clustering
* Network Analysis
* High Performance Computing
** Profiling R code
** Parallel computing with R
* Appendix
** Sources
** Index

## Welcome to the R programming Wikibook

This book is designed to be a practical guide to the R programming language.
R is free software designed for statistical computing. There is already great documentation for the standard R packages on the Comprehensive R Archive Network (CRAN) and many resources in specialized books, forums such as Stackoverflow and personal blogs, but all of these resources are scattered and therefore difficult to find and to compare. The aim of this Wikibook is to be the place where anyone can share their knowledge and tricks on R. It is supposed to be organized by task but not by discipline. We try to make a cross-disciplinary book, i.e. a book that can be used by all people applying statistics to some specific fields.

## How can you share your R experience ?

* Explain the syntax of a command
* Compare the different ways of performing each task using R.
* Try to make unique examples based on fake data (ie simulated data sets).
* As with any Wikibook please feel free to make corrections, expand explanations, and make additions where necessary.
Some rules :
* Put the name of functions in the code environment : <code>lm</code>
* Put the name of packages in bold : '''stats'''
* Except for the default packages, put the name of the package in parentheses after each function : <code>MCMCprobit</code> ('''MCMCpack''')
* Put examples in the source environment with argument lang="rsplus" : <syntaxhighlight lang="rsplus"></syntaxhighlight>
* Use references to package documentations, academic literature and wikipedia.
* Use the citations templates to make citations : Template:Cite book, Template:Cite web, Template:Cite journal
* If you want to add a graph, you should load it on Commons and add the tag {{Created with R}} and, if it is applicable, [[Category:Images with R source code]].

## Prerequisites

We assume that readers have a background in statistics. This book is not a book about statistics but a book about how to implement statistical methods using R. We try to use terms which are already defined on Wikipedia such that people can refer to the corresponding wikipedia page each time they have some doubts on a notion.
We also assume that readers are familiar with computers and that they know how to use software with a command-line interface. There are some graphical user interfaces for R but we are not going to explain how to use them in this textbook. Beginners should have a look at the Sample session for a first session with R. They can also have a look at the Statistical Analysis: an Introduction using R book.

### See also

* Larry Wasserman's book All of Statistics
* The Statistics and the Econometric Theory wikibooks.
* The Econometrics and Statistics pages on wikipedia.

## References

* ↑ R Development Core Team (2009). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org.
* ↑ CRAN manuals
* ↑ R on Stackoverflow
* ↑ See R-Bloggers
* ↑ The CRAN Task View is already organized by discipline.
* ↑ Larry Wasserman All of Statistics Springer 2004 http://www.stat.cmu.edu/~larry/all-of-statistics/index.html