What’s the difference between using spreadsheets and using R to analyse data? What are the pros and cons of each? Lloyd Hamilton, a data instructor at CodeClan, takes a deep dive into the tools of the trade.
Data analytics are a key component of effective decision-making for any business.
Key insights from data help businesses grow by increasing revenue, improving operational efficiency, or optimising targeted marketing campaigns.
Whether you’re generating financial reports, analysing pharmaceutical data, or trying to understand customer footfall in a shop, you’ll need an analytical program to communicate your findings.
Most of you will have heard of spreadsheets like Microsoft Excel or Google Sheets, and some of you may have heard of R. Both R and spreadsheets are excellent data analytics tools, but both have distinct functionalities.
Let’s dive deeper into the differences between R and spreadsheets to understand when you should choose one over another…
Ease of use
The ease of use of spreadsheets is one of the reasons why they remain one of the most popular tools for data analysis. Users are greeted with a point and click user interface that makes Excel or Google Sheets easy to use and easy to learn. Their user-friendly graphic user interface (GUI) facilitates data entry and allows users to build basic graphs and charts with ease.
However, the simplistic design interface of a spreadsheet can have certain drawbacks when it comes to more complex tasks. Anyone with experience in Excel, for example, will know the pain of trying to make multiple charts look consistent throughout.
Unlike a spreadsheet, R is a programming language, which means the initial learning curve will be steeper. Most users interact with R in RStudio which is a free and open-source integrated development environment or IDE. Interacting with R will not be as intuitive as interacting with a spreadsheet, but with practice, anyone will be more than capable of mastering the various functions, extending what is possible in spreadsheets, and more!
Both R and Excel are great tools to use when building effective visualisations. By highlighting and selecting your data in a spreadsheet, you can very quickly create a graph for your presentations. This makes the likes of Excel ideal for situations where you need to build a graph quickly or situations where you only need to make a few polished graphs.
However, if you require more comprehensive visualisations, R may be the better tool.
Building a plot in R can be accomplished easily in a few lines of code. Most notably, your results will be reproducible by anyone with access to the same dataset and code. R is capable of consistently producing multiple graphs of similar colour themes and format.
This makes R highly appealing in intensive workflows. Furthermore, the open-source nature of R has given rise to a large population of community developed tools, such as ggplot and rayshader, that are free to use. Packages like rayshader extends the capabilities of R beyond what is possible in Excel. Spending some time learning R will allow you to create some impressive looking visualisations. Below is an example of a three-dimensional spatial plots you can build in R with rayshader.
Image taken from: 3-d spatial plot built using rayshader, https://www.rayshader.com
The decision to use R over Excel, or vice versa, will depend on the level of information required in your analyses. The simplicity of Excel’s GUI makes the execution of statistical analysis between columns or rows of data very quick and easy to do. With a few clicks, users can perform common statistical analysis such as Analysis of Variances (ANOVA) or the Student’s t-test. Therefore, Excel is perfect for less complex data analysis of small datasets.
However, this does not mean it is more difficult to analyse small data sets in R. With the right knowledge, analysing small data sets in R can be just as easy as in Excel. The advantages of R become apparent when you need to analyse big data. R is optimised to handle millions or rows and allows you to perform very complex statistical analysis. With R you have the option to go beyond basic statistical analysis and dive into the realms of machine learning, regression, text mining or time series analysis.
The straight-forward and user-friendly GUI makes a spreadsheet ideal for simple and basic statistical analysis. Excel and Google Sheets are easy to use and learn which makes them an essential skill for many job applicants. On the other hand, R is great for intensive workflows requiring more complex statistical analyses. R source code can be utilised repeatedly across various datasets making the data analytical pipeline a lot more reproducible.
Therefore, R has been adopted as an industry standard for data analysis and data science. A good foundation in R programming language will give you a competitive advantage when applying for jobs in the data analytics industry.
All in all, it’s not a question of whether one is better than the other, it’s about choosing the right tool for the right job.
Learn R at CodeClan
- R, along with SQL and Python, is one of the key technologies you can learn on our 14-week Professional Data Analysis course.
- Don’t have 14 weeks? Our short courses R for Data Analysis, Visualisations with R and Interactive Data Dashboards will take you through some of the essentials.
Where to start? Try one of our FREE Coding for Data Analysis workshops.