+ 5
I am no R expert but looks like the difference between them is the fact lists are recursive, means they can hold values of multiple data types. Whereas vectors are atomic, means they can only hold values of a same data type ( similar to a linked list or array in c/c++ ), and the fact that they hold similar data types should make it faster to manipulate values in it and thus should be preferred over list in such conditions. Source : https://www.burns-stat.com/documents/tutorials/impatient-r/#keyobjects
9th Apr 2021, 2:55 AM
Arsenic
Arsenic - avatar
0
I am new In python but I am pro. in R. A list holds different data such as Numeric, Character, logical, etc. Vector stores elements of the same type or converts implicitly. Lists are recursive, whereas vector is not. The vector is one-dimensional, whereas the list is a multidimensional object.
12th Dec 2022, 6:22 AM
Kimai sharabi