What the fuRk is R?
R is a language. It is a (R)evolutionary statistical programming language, where you write functions and scripts as commands to analyse your data instead of traditional methods of ‘point and click’. It is also a software tool and environment used for data analysis and visualisation by Data Analysts worldwide.
R originated in New Zealand, when two teachers decided to provide a statistical computing platform for their students based on S. Over time it has evolved into a world-wide used tool for cutting edge statistical models and predictive modelling. Go Team Kiwis! Now, at the heart of R is ‘R Core’, a group of 20 developers who guide R’s evolution.
R is “free, open source, powerful and highly extensible”.
Data: Extraction > Exploration > Visualisation > Sharing
How to get Started
To learn how to use R I visited ‘Try R-Code School‘ and was guided through an 8 step tutorial. The site breaks down how to use the programming language in 8 simple chapters with a navigation menu to show how far you have progressed:
- Using R Basics
- Data Frames
- Real World Data
- Completion of course
At the end of each chapter it rewards you with badges and the final chapter displays the TRY R badge.
Using R Studio
After spending several years overseas I have returned to Ireland and the main topic of conversation seems to loom around commitment. The questions on everyone’s lips are ‘do you think its time to settle down now?’ and ‘do you think it might be time to put your foot on the property ladder?’. So, for that reason, I’m going to use R to analyse the trends in the property market over time to see if its a good time to purchase and if I should give in to peer pressure or continue to be a commitment phobe.
- To begin, I downloaded R Studio open source software for Windows from the website.
- In the background I sourced my property price csv data from the CSO website so I have a data-set I can work with. (Note: The time data was in the row and the type of property was in the column; I needed this vice versa. In order to do this I copied the data and transposed it in the excel sheet). Now I’m set to go..
- I imported the csv into R Studio (identifying the headers ).
- I viewed the property file i.e. > view(Propertyprice)
- To call the function date in a format that R can understand I update R: > rdate <-as.Date(Propertyprice$Date,”%m/%y)
- Following from this I plot the graph. >plot(Propertyprice$Dublinhouses~rdate, type=”l”, col=”red”)
- I insert a box around it by calling box()
- To provide an axis X I submit axis(rdate,%m-%y)
- My map displays the date data highlighting property prices in Dublin specifically for houses based on an increase/decrease from Jan05-February2016.