rm(list = ls())
#创建“Tom,男,19,(85,84,92,76)”列表对象st1
st1<-list(name=c("Tom"),gender=c("男"),age=c("19"),grade=c(c(84,84,92,76)))
st1[1]
st1$name
st1$grade[2]
#name
names(st1)
names(st1[1])
#class
class(st1$grade)
class(st1[4])
class(st1[[4]])
R语言基础-2.3列表建立
最新推荐文章于 2023-04-29 15:14:41 发布