Introduction to Programming R and Python Languages

Introduction to Programming R and Python Languages

DOI: 10.4018/978-1-68318-016-6.ch002


This chapter introduces the basic concepts of the languages we propose to use in the data analysis tasks. Thus, we first introduce some features of R and Python.
Chapter Preview


R is a powerful programming language, used in statistical tasks, data analysis, numerical analysis and others. The main characteristics of R are:

  • Powerful,

  • Stable,

  • Free,

  • Programmable,

  • Open Source Software,

  • Directed to the Visualization of Data.

On the downside, R might not be initially suitable for everyone since it needs user inputs on the command line. We will deal with this in this chapter to make the reader’s life easier.

First, the reader will need to install R for his/her operating system (OS). R is available for Mac, Windows, and Linux on a website. Figure 1 shows an overview of the website to download R.

Figure 1.

Overview of the website to download R

How to Use

R installation comes with a set of executables, including a GUI (Graphical User Interface) executable (for example, in windows, it is usually named as RGui.exe). Figure 2 shows this GUI.

Figure 2.

Example of an R executable GUI

In Figure 2, the reader has some information available, including the R version previously installed in the computer. Additionally, some commands are available to explore help regarding R commands. Figure 3 shows the use of the command help.start() and q(). The command help.start() opens a browser window with a manual browser version of R; this is represented in Figure 4. The q() command previously stated quits the R application.

Figure 3.

Example of some R commands

Figure 4.

R manual (Internet browser version)

In the manual browser, several links allow the reader to access documentation that can provide further assistance. The search for an answer in the manuals might be needed in the future adventure with R or any other language, so the reader should not be afraid to explore this documentation when needed.

Complete Chapter List

Search this Book: