Overview

Up to now, we have been manipulating vectors by reordering them and subsetting them through indexing. But once we start more advanced analyses, we will want to manipulate data frames.

To manipulate data, you have different options. Among them, 3 environments are popular:

  1. The original Data.frame
  2. The data.table package
  3. The tidyverse ecosystem

We have opted for the second one, since we found data.table to be faster (and speed counts when running some choice models such as random parameter models).

In this section, we introduce the functionalities of data.table that will be useful for the manipulation of our data, and also for the writting up of our own functions when developing specific models.