Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

R was initially written by Ross Ihaka and Robert Gentleman at the Department of Statistics

of the University of Auckland in Auckland, New Zealand. R made its first appearance in 1993.

A large group of individuals has contributed to R by sending code and bug reports.
Since mid-1997 there has been a core group (the "R Core Team") who can modify the
R source code archive.

R is an integrated suite of software facilities for data manipulation, calculation and graphical
display. Among other things it has an effective data handling and storage facility, a suite of
operators for calculations on arrays, in particular matrices, a large, coherent, integrated
collection of intermediate tools for data analysis, graphical facilities for data analysis and
display either directly at the computer or on hardcopy, and a well-developed, simple and
effective programming language (called ‘S’) which includes conditionals, loops, user defined
recursive functions and input and output facilities. (Indeed most of the system supplied
functions are themselves written in the S language.)

As a conclusion, R is world’s most widely used statistics programming language. It's the # 1
choice of data scientists and supported by a vibrant and talented community of contributors. R
is taught in universities and deployed in mission critical business applications.

Using R in UNIX environment


1. Create a separate sub-directory, say work, to hold data files on which you will use R for this
problem. This will be the working directory whenever you use R for this particular problem.
$ mkdir work
$ cd work

2. Start the R program with the command


$R

3. At this point R commands may be issued (see later).


4. To quit the R program the command is
> q()
Working with R Console

Eg.1
# Print Hello World.
print("Hello World")

Eg.2
> myString <- "Hello, World!"
> print ( myString)
[1] "Hello, World!"

Eg.3
# Add two numbers.
print(23.9 + 11.6)
Comment Line

For single comment include “#” symbol and for multiple comment given within single or
double quotes

Eg.4

# My first program in R Programming

if(FALSE){
"This is a demo for multi-line comments and it should be put inside either a single of double
quote"
}

You might also like