Background
R is an integrated environment for doing statistical and data analysis. It was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand in the 1990s and is now maintained by the R Development Core Team. It has excellent data handling capabilities and can construct production-quality graphics. R is an interpreted language which is based on a functional design and allows the user to employ loops, branching and functional definitions while supporting object-oriented terminology and methods, giving a considerable level of program control. R is an open source version of S, a widely respected statistical package, and is written in a mixture of Fortran, C and R. It is freely available under the GNU GPL license and will run on Linux, macOS and Windows operating systems. It can be downloaded and installed on your own computer from www.r-project.org.
R compares favorably with MATLAB; they both support matrix arithmetic and are similar in performance. Like MATLAB, commands can be saved to a script file and run either interactively or in batch mode.
The base R distribution includes packages to support most common statistical procedures, including regression and ANOVA, linear and nonlinear modeling, classical parametric and nonparametric tests, cluster analysis, and time series analysis. One of the most important strengths of R is the over 5000 contributed packages that are freely downloadable from the CRAN site.