A brief introduction to the R programming language
Tags: datascience, machinelearning
Published: 2022-05-01 19:31:31

#####_What is the ‘R’ programming language?_
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R is a multi-paradigmatic (procedural, object-oriented, functional, and more) programming language used for statistical computing and graphics. It was created between 1991 - 1995, at the University of Auckland, by statisticians, Ross Ihaka and Robert Gentleman. R is used among data scientists and statisticians for data analysis and developing statistical software. It also possesses and intensive catalog of statistical and graphical methods, which include machine learning algorithms, linear progressions, and statistical inference to name a few.<sup>[[1]](https://en.wikipedia.org/wiki/R_(programming_language))</sup>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R is open-source, free software, within the GNU package (notable software packages developed by the Free Software Foundation as part of the [GNU Project](https://www.gnu.org/home.en.html)). R is used not only by academics but by a variety of other industry including healthcare, government, insurance, and finance. Some notable large companies include Uber, Facebook, Google, and many more.

#####_Use Cases_
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R offers a variety of statistics-related libraries and an environment favorable for statistical computing and design. In 2021, R ranked in the [top five programming languages](https://statisticstimes.com/tech/top-computer-languages.php) for data analysists and research programmers. Some real-world applications of R being used could be optimizing a financial portfolio, processing marking data, or even analyzing outcomes of clinical trials. R is more than just a programming language; R’s official software environment has built in visualization capabilities making it easy to plot data. It has an extensive community of useRs that have created an extensive set of packages that can be used for almost any data processing task.

#####_Pros and Cons_
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;What are some of the **pros** of using R versus other languages?
<u>_Open-Source:_</u> It is open-source and free, which means useRs can contribute to the development of R by optimizing packages, develop new ones, and resolve issues therein.
<u>_Analysis:_</u> R was specifically designed for statistical analysis which means it can perform a variety of machine learning algorithms such as classification and regression. 
<u>_Packages:_</u> R provides packages and feature for developing neural networks. Its data visualization capabilities are quite capable as well. There are various libraries, such as ggplot2 and plotly, which allow for visually appealing graphs which set R apart from other languages.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;What are some of the **cons** of using R versus other languages? 
<u>_Learning Curve:_</u>  R is a complicated language and has a steep learning curve and could be difficult for those to pick up without prior programming experience. 
<u>_Security:_</u> R lacks basic security found in other languages. As a result, there are restrictions on R as it cannot be embedded into web applications. 
<u>_Speed and Memory:_</u> in R, objects are stored in physical memory and utilizes more than other languages. It requires data to a single place which is in the memory. Algorithms in R are spread across packages, which makes it slower than other languages more contribute to its difficulty to implement algorithms.

#####_R vs Python_
As this is primarily an article about R, I will not do a proper comparison between the two languages, but simply point out some key differences.
- R is difficult to learn in the beginning but has more specific applications for statistical analysis, while Python Is more beginner friendly but that in and of itself limits what it can do regarding analysis. 
- The primary objective of R is data analysis and statistics whereas the primary objective of Python is development and production.
- R is integrated to run locally whilst Python is well-integrated into apps 
This is just to name a few but there might be several reasons to pick one language over another, depending on each projects’ needs.