Check out example codes for "r lists vs vectors". It will help you in understanding the concepts better.

Code Example 1

# Short answer:
# Vectors (aka Atomic vectors) and lists are both one-dimensional objects
# but vectors can only contain one type of data, whereas lists can 
# contain mixed type data. 

# Note, if you combine mixed types in a vector, they will be coerced to 
#	the most flexible type of the types you used. In order of increasing
#	flexibility, the types are: logical -> integer -> double -> character
# Note, to determine whether you're dealing with a vector or a list use
#	typeof(vector_or_list) -- typeof(a_list) will return "list"

Learn ReactJs, React Native from akashmittal.com