试试看,给个例子
boot <- list()
boot[[1]]<- matrix(c(1,3,4),nc=1)
rownames(boot[[1]]) <-c("a","b","c")
boot[[2]] <- matrix(c(2,3,6),nc=1)
rownames(boot[[2]]) <- c("a","b","c")
boot
b <-c()
for(i in 1:2){
b1 <-boot[[i]][rownames(boot[[i]])=="a"]
b <-c(b,b1)
}
b
length(b)