R Tutorials


Learn Statistics with R

Starting from engineering to social science every single field of study we need statistics. The first reason is to be able to effectively conduct research/analysis to come up with a decision. Without the use of statistics it would be very difficult to make decisions based on the data collected from a project whether it is research based or worldwide organizations like WHO WMO etc etc. For example, if we get some data of population from each of the cantons of Switzerland we need to summarize which canton has highest population density which canton has lowest co relating the area therefore we need to make summary statistics. Like this every single field we need statistical analysis. A large number of people use SPSS or SAS for statistical data analysis which often costs money to buy the license of the software. But now a days quite a good number of competitive software packages are freely available in online which does exactly similar job. Here we are going to learn about an open source statistical software call “R”. This is rather new considering the other software but it does excellent job. Here is my summarized reasons why should we use R:

[1] Completely open source
[2] Large user community
[3] Outstanding graphics capability

Because it is open source a large number of people from various filed coming from engineering social science to finance stated to use it as main platform of their work and there is a good chance to get help from each other through R forum. Moreover the graphics capability is just superb for international publications.

Installation of R and R Studio:
A step by step procedure explained how to download and install R from the R project website. The basic version of R is good enough to do all kind of analysis but there are several efforts were made to make better use of the analysis. Here we are going to see one of them call R studio.


Data set and scripts used for the tutorials:

Most of the exercises I used built in data embed with R. we can get those data writing data() in the console. However, some of the exercises I used some field experimental data. Each year we collect water sample and put them in the gas chromatographic devices in order to do ion analysis of water.




All the scripts are also provided that used for the tutorials. So enjoy working with R with that scripts and data given :)



Read and write data using R

The first task after installation is to read and write your own data for further analysis. Therefore this section I tried to give an overview how to read data and after making bit of analysis how to export to the directory where you are working. The good thing is that R has some built in data that we can use them for analysis as a beginning stage later we move completely on our own data. 




[Related Videos]
[02] Working with single data frame
[03] Working with multiple data frame
[04] Removing columns
[05] Sort and order
[06] Get function Cbind function
[07] Merge data frames
[08] Access different records in a matrix
[09] Array and Matrix
[10] Generating random numbers

Plotting with R

R has great graphics and plotting capabilities and can produce a wide range of plots very easily. Like scatter plot time series and 3D plot. A Time Series plot is used to display the time variation of one or more scalar Data Sets associated with a time step. Time series plots are very important in model performance analysis. Here we will be focusing more on time series plots. 




[Related Videos]


Looping in R:

R is an expression language in the sense that its only command type is a function or expression which returns a result. Even an assignment is an expression whose result is the value assigned, and it may be used wherever any expression may be used; in particular multiple assignments are possible. Commands may be grouped together in braces, {expr_1; ...; expr_m}, in which case the value of the group is the result of the last expression in the group evaluated. Since such a group is also an expression it may, for example, be itself included in parentheses and used a part of an even larger expression, and so on. Here is a simple example of 'for' loop in R



[Related Videos]

[12] While loop
[13] Application of loops


Statistical Analysis with R

 
In this tutorial I tried to explore the ways in which R can be used to calculate summary statistics, including the mean, standard deviation, range, and percentiles. Also introduced is the summary function, which is one of the most useful tools in the R set of commands. Together with the basic statistics I tried to explain bit of correlation regression multivariate statistics like Principal component analysis and few other issues. More application will be coming in the upcoming tutorials




[Related Videos]

[23] Correlation
[22] Regression
[24] Functions
[14] Principal component analysis
[25] Fix and Transfer function

12 comments:

  1. Hi Mahmud thanks a lot for sharing this. In my capacity i will further this link to my colleagues. Good Work.

    ReplyDelete
  2. hi sir, is there any means by which i can download the data from the global administrative areas as from my college that site blocked.

    ReplyDelete
  3. Hi Mahmud, the link for https://dl.dropbox.com/u/28034269/RTutorials.zip is not working any more. Could you please correct it?

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. yes sir on your link is not working please how to download

    ReplyDelete
  6. Link not works, please how to downlaod the package

    ReplyDelete
  7. Hello: I want a method of Package SPEI
    Thank you

    ReplyDelete
  8. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    R Programming Online Training

    ReplyDelete
  9. Dear It is really a useful resource.

    ReplyDelete
  10. Each department of CAD have specific programmes which, while completed could provide you with a recognisable qualification that could assist you get a job in anything design enterprise which you would really like.keep it up.
    C and C++ Training Institute in chennai | C and C++ Training Institute in anna nagar | C and C++ Training Institute in omr | C and C++ Training Institute in porur | C and C++ Training Institute in tambaram | C and C++ Training Institute in velachery

    ReplyDelete
  11. Nice content very helpful, It has a very important point which should be noted down. All points mentioned and very well written.Keep Posting & writing such content

    AWS Online Training
    Online AWS Certification Training

    ReplyDelete