R Programming

Gangeshwar Nashine
6 min readDec 18, 2020

--

Welcome to R Programming

Introduction of R
R is a statistical computing and graphics language and environment. R can be seen as a separate implementation of S. There are some essential variations, but a lot of code written for S runs unaltered under R.
One of R’s strengths is the ease with which well-designed publication-quality plots, including mathematical symbols and formulas, can be generated where appropriate. The defaults for minor graphic design choices have been taken great care, but the user retains full control.
R is licenced as free software under the terms of the GNU General Public License of the Free Software Foundation in the source code form. It compiles and runs on a wide range of UNIX platforms and related systems (including FreeBSD and Linux), Windows and MacOS.
Pre-requisites
We believe that readers have a statistical history. This book is not a statistical book, but a book on how to apply statistical methods using R. We try to use the words already described on Wikipedia in such a way that people can refer to the corresponding wikipedia page any time they have doubts about the concept.

We also believe that readers are familiar with computers and that they know how to use command-line interface applications. There are some graphical user interfaces for R, but we’re not going to explain how to use them in this textbook. For the first session with R, beginners can have a look at the Sample Session. They may also take a look at the statistical analysis: an introduction using the R book.
Climate of the R
R is an integrated suite of software tools for data manipulation, calculation and graphic display. Includes

Efficient data handling and storage facility

A suite of operators for array calculations, in particular arrays,
A broad, coherent, integrated set of intermediate resources for data analysis;
Graphical data analysis and view on-screen or hardcopy, and
A well-developed, simple and efficient programming language that includes conditionals, loops, user-defined recursive functions and input and output facilities.
The term “environment” is intended to describe it as a completely planned and cohesive framework, rather than a gradual accretion of very basic and rigid tools, as is often the case with other data analysis software.

R, like S, is built around a true programming language and allows users to add additional functionality by defining new features. Most of the system itself is written in the R dialect of S, which makes it simple for users to follow the algorithmic choices made. In the case of computer-intensive activities, C, C++ and Fortran code can be connected and named at run time. Advanced users can write C code to directly control R objects.
A lot of users think of R as a mathematical method. We like to think of it as a setting in which statistical methods are applied. R can be expanded (easily) by packages. There are about eight R-distributed packages and several more are available via the CRAN family of websites covering a very wide variety of modern statistics.

R has its own LaTeX-like paper format, which is used to provide detailed documentation, both online in a variety of formats and in hardcopy.
R Benefits and Drawbacks
R is the most general programming language for statistical modelling and analysis. Like other programming languages, R also has a range of advantages and disadvantages. It’s a language that is continually changing, which means that many issues can eventually fade away with future changes to R.

There are the pros and cons of R.

Pross

1)Open Source Open
Open-source language is a language that we can use without the need for a licence or subscription. R is an open source language. We will contribute to the growth of R by improving our packages, designing new packages and resolving issues.

2) Independent forum
R is a platform-independent language or cross-platform programming language, which means that its code can run on all operating systems. R allows programmers to develop applications for a variety of competing platforms by writing a programme only once. R is very easy to run on Windows, Linux, and Mac.

3) Machine learning operation
R helps one to perform various machine learning operations, such as classification and regression. For this function, R provides various packages and features for the creation of an artificial neural network. R is used by the world’s best data scientists.

4) Example support for data wrangling
R helps us to indulge in data wrangling. R offers packages such as dplyr, a reader capable of translating messy data to a standardised form.

5) Performance plotting and graphics
R simplifies the efficiency of plotting and graphing. R libraries such as ggplot2 and plots advocate visually pleasing and aesthetic graphics that set R apart from other programming languages.

6) The number of packages
R has a very rich collection of packages. R has more than 10,000 packages in the CRAN repository that are continuously increasing. R offers data science and machine learning packages.

7) Statistics
R is mainly regarded as the statistical language. This is the key reason why R is predominant over other programming languages for the development of statistical tools.

8) Continuous development
R is a programming language that is continually changing. Constantly changing means that as something grows, improves or develops over time, like our taste for music and clothing that evolves as we get older. R is a state of the art that offers updates whenever a new function is introduced.

Cons The Cons

1) Handling of data
Objects are stored in the physical memory of R. This is in contrast to other programming languages such as Python. R uses more memory than Python does. It needs all the data at a single location in the memory. It’s not the best solution when dealing with Big Data.

(2) Basic Protection
R is missing the basic protection. This is an integral aspect of most programming languages such as Python. Because of this, there are a number of limitations with R since it cannot be inserted in a web application.

3) Complicated languages
R is a very complex language and has a steep learning curve. People who do not have prior knowledge or programming experience may find it difficult to learn R.

4) The weakness of origin
The key downside of R is that it does not support dynamic or 3D graphics. The explanation for this is its origin. It shares its roots with the much older “S.” programming language.

(5) Less Pace
The programming language of R is much slower than other programming languages such as MATLAB and Python. Compared to other programming languages, R packages are much slower.
In R, algorithms are distributed through a range of packages. It may be difficult for programmers who have no previous knowledge of packages to implement algorithms.

R is a free software application designed for statistical computation. There is already a lot of documentation for standard R packages on the Comprehensive R Archive Network (CRAN) and a lot of information for specialised books, forums such as Stackoverflow and personal blogs, but all of these resources are dispersed and often difficult to locate and compare. The purpose of this Wikibook is to be a place where anyone can share their knowledge and tricks on R. It is meant to be organised by task, but not by disciplineR is free software designed for statistical computing. There is already a lot of documentation for standard R packages on the Comprehensive R Archive Network (CRAN) and a lot of information for specialised books, forums such as Stackoverflow and personal blogs, but all of these resources are dispersed and often difficult to locate and compare. The purpose of this Wikibook is to be a place where anyone can share their knowledge and tricks on R.

Why Learn R ?

--

--