r meet up slides.pptx
DESCRIPTION
These are slides from the second Alamo Area R user group meeting, where I gave an intro to R and RStudioTRANSCRIPT
Introduc)on to R and RStudio
Corey S. Sparks Department of Demography
The University of Texas at San Antonio September 22, 2012
Sponsored by the UTSA Department of Demography
What is R?
• R is a system for sta)s)cal computa)on and graphics.
• It is heavily influenced by the S language • R was ini)ally wriJen by Ross Ihaka and Robert Gentleman at the Department of Sta)s)cs of the University of Auckland in Auckland, New Zealand.
• The “R Core Team” maintain the source code for the soPware and release regular updates
What is R?
• The R soPware contains func)onality for a large number of sta)s)cal procedures.
• Linear and generalized linear models
• Nonlinear regression models
• Time series analysis
• Classical parametric and nonparametric tests, clustering and smoothing.
What is R?
• In addi)on, the R project is added to by many of its users, who write source code for many different types of analy)cal procedures
• Everything from analy)cal chemistry to epidemiology to linguis)cs – OPen code is wriJen in FORTRAN or C++ and ported to R
– Currently 4,045 different user-‐wriJen libraries available
Where can I run R?
• R runs on a variety of pla\orms – Windows
– Mac OS X – Linux – Unix
• 32 and 64 bit installa)ons • Support for parallel compu)ng and clusters
Revolu)on R
• Commercial version of R soPware
• Revolu)on R is compiled for mul)-‐core support
• Allows for a marked reduc)on in computa)on )mes because of op)mized code and certain math system libraries (BLAS, ATLAS, etc)
What makes R so great?
• Open source • User community
• Cudng edge development
• Integra)on with low level programming languages
• Flexibility • Mul)-‐language support
The R Interface
• Depends on where you run it • Different OS’s have very different interfaces • R is inherently command line-‐oriented
• Several GUIs have been wriJen
RStudio
• Rela)vely recent incarna)on of an R IDE • Open source • Desktop and server versions
• Lots of cool features – syntax highligh)ng – workspace and data browser/editor – integrated help system – integrated history – runs on all OS’s
RStudio Screen
Code editor
R command console
Workspace browser
Command History
Package manager
File manager
Plot manager
Integrated help system
Addi)onal Cool things
• Mul)ple project management – Keep mul)ple code files for separate projects
• Lots of keyboard shortcuts • Generate HTML reports with knitr
• Customized IDE