1. Introduction to R
• http://cran.r-project.org/
• The Comprehensive R Archive Network
• The Base System
• The idea of Packages
• Open source Implementation of S
• Commercial implementation is S Plus
-Sujoy Bhattacharya
2. • Default Prompt is ‘>’
• setwd("C:/Documents and
Settings/USER/My Documents")
• getwd()
• ?(plot)
• R is case sensitive
3. • Objects in R: variables, arrays of numbers,
character strings, functions .
• function c()
• assignment operator (‘<-’)
• Create an object z such that: x=1 to 20,
y= 30 to 35, z= concatenation of x and y
4. • common arithmetic functions: log, exp, sin,
cos, tan, sqrt
• range()
• mean(y)=sum(y)/ length(y)
• sort(object): elements are arranged in
increasing order