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.
For more information on R data types, refer to the following document at http://www.statmethods.net/input/datatypes.html.
For NumPy data types, refer to the following documents at http://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html and http://docs.scipy.org/doc/numpy/reference/generated/numpy.matrix.html.
For NumPy data types, refer to the following documents at http://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html and http://docs.scipy.org/doc/numpy/reference/generated/numpy.matrix.html.