書名: Machine Learning with R Quick Start Guide作者名: Iván Pastor Sanz本章字數: 60字更新時間: 2021-06-24 16:01:31
Creating lists
We can create a list using list() or by concatenating other lists:
x<- list(1:4,"book",TRUE, 1+4i)
x
## [[1]]
## [1] 1 2 3 4
##
## [[2]]
## [1] "book"
##
## [[3]]
## [1] TRUE
##
## [[4]]
## [1] 1+4i
Components will always be referred to by their referring numbers as they are ordered and numbered.