Introduction To R: Shanti.S.Chauhan, PH.D Business Studies Shuats
Introduction To R: Shanti.S.Chauhan, PH.D Business Studies Shuats
Shanti.S.Chauhan,Ph.D
Business Studies
SHUATS
AGENDA
• History and evolution of R
• Principle and software paradigm
• Description of R interface
• Advantages of R
• Drawbacks of R
• So why use R?
• References for learning R
HISTORY AND EVOLUTION OF R
Origin in the Bell Labs in the 1970’s
HISTORY AND EVOLUTION OF R
R has developed from the S language
S Version 1
S Version 2
S Version 3
S Version 4
Developed 30 years ago for research
applied to the high-tech industry
HISTORY AND EVOLUTION OF R
The regular development of R
1990’s: R developed concurrently
with S
1993: R made public
Acceleration of R development
R-Help and R-Devl mailing-lists
Creation of the R Core Group
Evolution of the traffic on software main mailing-lists. Source: R.A. Muenchen, r4stats.com
HISTORY AND EVOLUTION OF R
Popularity amongst programming languages
VS.
PRINCIPLE AND SOFTWARE PARADIGM
Sophisticated but costly SAS
VS.
RGui: R basic
interface
R desktop
shortcut R command
line (space to
write
instructions)
DESCRIPTION OF R INTERFACE
Using the command line in R console
First false sentence
followed by R’s
error message
Second correct
sentence
Declaration and
printing of the
sentence as a R
object
Simple math
computations
Basic information
about the R object
containing the
sentence
DESCRIPTION OF R INTERFACE
RGui menu: File tab
Results of the
data editor
DESCRIPTION OF R INTERFACE
RGui menu: View tab
Misc tab:
diverse
operations
DESCRIPTION OF R INTERFACE
RGui menu: Packages tabs
Packages tab:
adding functions
to R foundation
DESCRIPTION OF R INTERFACE
RGui menu: Windows tab
Windows tab:
usual options
to arrange the
tiles
DESCRIPTION OF R INTERFACE
RGui menu: Help tab
Help tab: very
important links
to help
Arithmetic Operators in R
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
^ Exponent
%% Modulus(Remainder for
division)
%/% Integer Division
Relational Operators
Operator Description
== Equal to
!= Not equal
AGENDA
• History and evolution of R
• Principle and software paradigm
• Description of R interface
• Advantages of R
• Drawbacks of R
• So why using R?
• References for learning R
ADVANTAGES OF R
R “philosophy”
Open source code
You can access the code of the software
In-depth understanding of what R does
Modify the code
Example “mgcv”
package webpage
Adress of the
« mgcv » package
Screenshot of unzipping the « mgcv » package and browsing through the package’s files.
ADVANTAGES OF R
R is free
« mgcv.c » file
in the
« mgcv »
package
coded in
typical C
programming
language
Total cost may favour commercial solutions for complex computations made in large
corporations
DRAWBACKS OF R
Relatively difficult to learn
Steep learning curve
R code far from undergrad computer science courses
Very complex data structures (useful if mastered)
Is R’s syntax not logical?
Other websites
UCLA online R resources http://www.ats.ucla.edu/stat/r/)
R blogs aggregator (www.r-bloggers.com)
Social networks: LinkedIn groups (The R project for statistical computing), Twitter accounts
(@RevolutionR, @inside_R), jobboards (Analytical Bridge…)
REFERENCES FOR LEARNING R
Conferences
Growing number of conferences about R
Official International R UseR! conference