Chapter 6 | Creating R packages

Introduction A wide documentation is available on the internet providing the technical instructions to build R packages, starting from the manual Writing R extensions at the official R site. This section provides a general overview about R packages. The following...

Chapter 5 | Functional Programming

R as a functional programming language R can be considered as a functional programming language as it focusses on the creation and manipulation of functions and has what’s known as first class functions. In computer science, functional programming is a programming...

Chapter 4 | Functions

Functions structure When working with R we all make constant use of functions and, when developing, we create new functions so that functions look like very familiar R objects. Nevertheless, understanding the theory and the rationals underlying R functions may help to...

Chapter 3 | Environments

Introduction Assuming that we are all familiar with classic R objects such as vectors, matrices, lists, data.frames, etc …, this chapter takes into consideration a critical type of objects: environments. Within the R computation mechanism, environments play a crucial...

Chapter 2 | How R works

The ‘’read parse evaluate’’ loop The ‘’read parse evaluate’’ loop is at the core of the R system. Understanding this mechanism and being able to manage and control it is a key point for writing efficient R codes. When we type R commands, two things happen: those...