Chapter_1_R programming for beginners
Chapter_1_R programming for beginners
BEGINNERS
Contents
Pg No Section
01 Overview of R
25 Control Structures
34 Functions
1. Overview of R
R is considered as a renowned programming language and software
environment for statistical analysis and graphics representation with
reporting functionality. R was invented by Ross Ihaka and Robert Gentleman
at the University of Auckland, New Zealand. Now the complete activities is
developed by the R development core team.
The main features of R is mentioned below:
2. Graphical Tools:
It includes graphical facilities for data which is core part of data science. It
includes various visualization tools which helps in better understanding of
data.
3. Mathematical Operations:
R includes various statistical tools which well defines the mathematical
operations in a very systematic way. It includes set of operations for arrays,
lists, vectors and matrices.
4. Data Handling:
R includes effective data handling and storage facility. The data handling
features includes handling various types of files
The following URL refers to the official website of R programming language is:
https://www.r-project.org/about.html
CRAN Packages
CRAN is known as “The Comprehensive R Archive Network” is the main
repository for R packages. The main advantage of getting your package on
CRAN is that it can be easy for users to install with function “install.packages”.
Your package will also be daily tested on multiple systems.
CRAN now has 10,000 R packages. This can be considered as main purpose for
all developer or community clan. CRAN is considered as a global repository of
open-source packages that extend the capabilities of R, reached a milestone
today. It includes more than 10,000 R packages available for download.
R programming language has a feature of mirror server which is replica of
contents of the main server. These mirror servers reduce the load on one
server by having multiple synced copies. The user usually opts for mirror
(server) when there is low latency for faster downloads.
The various links of download for the mentioned CRAN package is mentioned
below:
https://ftp.iitm.ac.in/cran/
History of R
Ross Ihaka and Robert Gentleman are the key persons who invented R. R is
actually based on one of the older programming language known as S which
was invented way back in 1970’s. Ihaka and Gentleman focused on developing
their own programming language while working together in New Zealand. This
went to release of R.
With the release of R in the early 1990’s, several developers or programmers
joined the project to help to improve it. By 1995, the R programming became
“open-source” which means that any developer can use and modify it for
themselves without any cost.
RStudio
RStudio is an R-specific IDE. The plot windows are better than the R GUI
originals, and it includes various facilities to publish the code.
The editor is more basic than either Emacs or Eclipse, but it’s good enough for
most purposes, and is easier specially in case of research activities. RStudio’s
awesome trick is that a user can run it remotely through a browser, so you can
run R on a powerful server, later you can access it from a smartphone without
loss of computational power
Download it from http://www.rstudio.org .
Start a new R session, type the following in your console, and press Enter:
(refer to the diagram mentioned below):
> print("Hello world!")
R responds with the following output:
[1] "Hello world!"
As we explain in the beginning of this chapter, we collapse input and output
into a single block of code, which is mentioned below:
> print("Hello world!")
[1] "Hello world!"
Summary
R is a free, open source language for data science (data analysis and data
visualization).
It’s also a piece of software used to run programs written in R.
A user can download R from http://www.r-project.org.
A user can write R code in any text editor, but there are several IDEs that
make development easier.