更新时间:2022-05-27 22:04:15
我们可以使用lapply
的递归版本,即rapply
We can use the recursive version of lapply
i.e. rapply
rl <- rapply(dico, length, how="list")
rl
#[[1]]
#[[1]][[1]]
#[[1]][[1]][[1]]
#[1] 4
#[[1]][[1]][[2]]
#[1] 4
#[[1]][[2]]
#[[1]][[2]][[1]]
#[1] 4
#[[1]][[2]][[2]]
#[1] 4
#---