Jump to content

R Programming

25% developed
From Wikibooks, open books for an open world
TODO
TODO

Editor's note
This book is still under development. Please help us!

Welcome to the R programming Wikibook

[edit | edit source]

This book is designed to be a practical guide to the R programming language[1].

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)[2] and many resources in specialized books, forums such as Stackoverflow[3] and personal blogs[4], 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[5]. 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 ?

[edit | edit source]
  • 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

[edit | edit source]

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

[edit | edit source]

References

[edit | edit source]
  1. 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.
  2. CRAN manuals
  3. R on Stackoverflow
  4. See R-Bloggers
  5. The CRAN Task View is already organized by discipline.
  6. Larry Wasserman All of Statistics Springer 2004 http://www.stat.cmu.edu/~larry/all-of-statistics/index.html


Wikibook Development Stages
Sparse text 0% Developing text 25% Maturing text 50% Developed text 75% Comprehensive text 100%