R Programming for Beginners. Why you should use R?

R Programming, R Language, Why R, Python & R, Best language for data science, best language for statistical analysis


So why is it that R is becoming such a popular and useful tool in data analysis and statistical analysis. I'm going to tell you why stay tuned now the short answer is, this is one of the rare occasions when something that is free and open-source is in fact better and that this is in my opinion better than the expensive commercially available alternatives that are out there and if you don't believe me just look at the trends.

There are masses of people moving from SPSS to R, from Stata to R, and from SS to R. I don't see anybody moving the other direction. Now R is essentially a programming language and you might find that fact a little bit intimidating or scary but don't and you'll see when I do the little 
demonstration at the end of the article that it's not difficult to use. It's relatively intuitive, you can learn it, and there's loads and loads of support out there.

If you need it the importance of using code to it, when you do data analysis. Your analysis is reproducible somebody else can see exactly how it is that you going to the answers. That you have the ability to collaborate with other people and they can look at what you've done and make suggestions or changes or identify mistakes in your analysis. And you can't do that with a point-and-click system and the next reason why using code to do your analysis is important is that not only is your analysis reproducible but it's also repeatable in other words.

If a year from now you have additional data, let us say you had data for 2018 and 2019. You have double the data set; you want to re-run that analysis. You just run your code and everything your data cleaning, your data manipulation and your analysis. All is repeated right there and then at the push of a button now. One of the most exciting things about R is because it's open source. You have people all over the world writing packages and things that you can install and using it.

R deal with very specific data analytic problems and these are free and there are literally thousands of them. Another big advantage of using R is that it has incredible data visualization and graphics capabilities. In fact, in that sense it beats any other package without trouble. It is a slam-dunk nothing comes close right now. I am going to do a short demonstration just to show you that using a program language to do analysis is not difficult. it's not scary it's relatively simple okay so watch this so in this particular example I have got a little data frame called friends I click on that and we can see it over here we've got some variables and some observations I'm looking at age and height.

Let us see what we can do with those the way the coding works is you apply a function to an object. So in this case the function might be the mean, we want to know the mean of age [written as mean (age)], we might want to know the median of the height [written as median (height)], we can plot a histogram of the age [written as hist (age)] or plot age against height [written as plot (age ~ height)] and we might want to know if there is a statistically significant correlation between age and height [written as cor.test(age,height)] and as we can see in this particular case. Clearly writing code is not that scary at all. I mean I have not broken up into a sweat you will notice that I do not have a tremor. I do not have a heart palpitation. I have not fallen over dead. I have actually survived. It is not difficult. It is not scary.

You can do it now if you're interested in learning R and why don't you subscribe to this website to follow the articles. Thanks for reading, leave your comments and questions in the discussion section below.

You Might Also Like

0 comments