R中通过循环向list(列表)中添加元素

x2 <- list()

n <- 1
for(i in 1:10)
{
  x2[[i]] <- n
  n <- n + 1
}

参考:

R语言列表循环添加元素banlucainiao的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/u011375991/article/details/131850277
今日推荐