This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Introduction to R Marlene Müller November 18, 2008 Contents 1 What is this R? 2 2 How do I start? 3 3 How to get help? 6 4 Some calculations to start with 10 5 Data & files 20 6 Wonderful world of graphics 27 7 Some statistics 41 8 “Advanced” mathematics 53 9 Basics in programming 59 Marlene Müller: Introduction to R 1 1 What is this R? Programming Language S = developed at Bell Labs for statistics, simulation, graphics ( Becker and Chambers ; 1984 ) → SPLUS: commerical implementation → R: implementation under GPL (GNU General Public License), open source + interpreted program code, object orientation + easily extensible by selfwritten routines, packages, DLLs + many types of graphics (mainly static) + standardized, simpletoused data format ( data.frame ) + well developed format fo fitting (regression) models + active developers team, helpful mailing list – (up to now) no “standard” GUI – available routines/packages sometimes difficult to find – books on R appearing slowly on the market (S books partly useable) Marlene Müller: Introduction to R 2 2 How do I start? R is commandline oriented, so start simply by typing expressions like > 1+1 [1] 2 > 1+2 * 3^4 [1] 163 > x < 1; y < 2 > x+y [1] 3 > x < seq(pi,pi,by=0.1) > plot(x,sin(x),type="l",col="red",main="Sinuskurve") Marlene Müller: Introduction to R 3 2.1 Working with R under Unix/Linux Fig. 1: R in a Unix/Linux shell Marlene Müller: Introduction to R 4 2.2 Working with R under Windows Fig. 2: R in a Windows desktop Marlene Müller: Introduction to R 5 3 How to get help? 3.1 Local help pages • help for a function: help(<function name>) or ?<function name> • help for a package: library(help=<Package>) Usually, the texts in the local help pages correspond to those in the package documentation. Marlene Müller: Introduction to R 6 3.2 WWW • http://www.rproject.org R home page, there are in particular FAQs as well as a Google site search, and additionally: – manuals ( http://cran.rproject.org/manuals.html ) introduction, language definition, “Writing R Extensions” (DLLs, packages), introduction written in different languages (German, French, etc.) – CRAN ( http://cran.rproject.org ) C omprehensive R A rchive N etwork ( → R software for download) – mailing lists ( → Section 3.3 ) – books list ( → Section 3.4 ) – related projects Marlene Müller: Introduction to R 7 3.3 Mailing lists • Rhelp main list for R user questions, take care to read http://www.rproject.org/postingguide.html before! → also available as a (usenet) news group gmane.comp.lang.r.general auf http://news.gmane.org • Rannounce, Rpackages, Rdevel announcements, package announcements, developers list ( → more for R spets) • Rsig* (special interests groups) e.g. Rsigfinance = Special Interest Group for ’R in Finance’ For subscribing and archives see http://www.rproject.org/mail.html or http://news.gmane.org/index.php?prefix=gmane.comp.lang.r ....
View
Full Document
 Spring '11
 Park
 Statistics, Normal Distribution, Marlene Müller

Click to edit the document details