Introducing R
R is a popular open source language that supports statistical analysis and modeling, and it is most widely used by statisticians developing statistical models and performing data analysis. One question commonly asked by learners is how to choose between Python and R. For those new to both and needing a simple model for a not-so-big dataset, R would be a better choice. It has rich resources to support modeling and plotting tasks that were developed by statisticians long before Python was born. Besides its many off-the-shelf graphing and statistical modeling offerings, the R community is also catching up in advanced machine learning such as deep learning, which the Python community currently dominates.
There are many differences between the two languages, and recent years have witnessed increasing convergence in many aspects. This book aims to equip you with the essential knowledge to understand and use statistics and calculus via R. We hope that at some point, you will be able to extract from the inner workings of the language itself and think at the methodological level when performing some analysis. After cultivating the essential skills from the fundamentals, it will just be a matter of personal preference regarding the specific language in use. To this end, R provides dedicated utility functions to automatically “convert” Python code to be used within the R context, which gives us another reason not to worry about choosing a specific language.