Blogger Widgets

Search This Blog

Sunday, 30 September 2012

Basics of R : Statistical Programming Language for Data Analysis

                  R is a free software environment for statistical computing and graphics.It is an integrated suite of software facilities for data manipulation, calculation and graphical display. 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 includesconditionals, loops, user defined recursive functions and input and output facilities.

       R is helpful when you dealing with data's of large size, for eg: Analyzing the amount of air contents of different countries  during one year (This data may contain numerical data's more than 3 GB) using classical methods may take days for its computation and analysis. But by using the simple coding by R language we can analyze it within minutes.
 Install R on Ubuntu

   For installing R on ubuntu Run the following commands on terminal.
   sudo apt-get update
   sudo apt-get install r-base

  After installing completely run 'R' (Capital) on terminal you will got a work space like below.

 At the R prompt we type expressions. The <- symbol is the assignment operator.
        > x <- 1
        > print(x)
        [1] 1
        > x
        [1] 1
        > msg <- "hello"
The grammar of the language determines whether an expression is complete or not.
The # character indicates a comment. Anything to the right of the # (including the #
itself) is ignored.
Some simple commands in R
 For changing working directory
         cd to the desired directory 
         then type R then getwd() 


No comments:

Post a Comment

Blogger Widgets