我想从以下输出更改格式:
v1 <- c("Friday", "Wednesday")
v2 <- c("Sunday", "Monday", "Sunday", "Friday")
mylist <- list(v1, v2)
类似于:
[[1]]
[1] "Friday"
[2] "Wednesday"
任何帮助将不胜感激!
答案 0 :(得分:1)
如果我们要list
中的lists
list(as.list(v1), as.list(v2))
或者通过list
“我的列表”
lapply(mylist, as.list)