Adding a new column to each element in a list of tables or data frames

前端 未结 6 1649
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 03:51

I have a list of files. I also have a list of \"names\" which I substr() from the actual filenames of these files. I would like to add a new column to each of t

6条回答
  •  清酒与你
    2020-11-27 03:59

    A tricky way:

    library(plyr)
    
    names(filelist) <- ID
    result <- ldply(filelist, data.frame)
    

提交回复
热议问题