R has five primitive or atomic types:
- Character
- Numeric
- Integer
- Complex
- Logical/Boolean
It also has the following more complex container types:
- Vector: This is similar to numpy.array. It can only contain objects of the same type.
- List: This is a heterogeneous container. Its equivalent in pandas would be a series.
- DataFrame: This is a heterogeneous two-dimensional container, equivalent to a pandas DataFrame.
- Matrix: This is a homogeneous two-dimensional version of a vector. It is similar to a numpy.array.
For this chapter, we will focus on list and DataFrame, which have the following equivalents in pandas: series and DataFrame.