📜  r 列表与向量 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:52:01.450000             🧑  作者: Mango

代码示例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"