R Programming

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 :
 * Put the name of packages in bold :
 * Except for the default packages, put the name of the package in parentheses after each function : (MCMCpack)
 * Put examples in the source environment with argument  :
 * 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  and, if it is applicable,.

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.