Indexing list of data.frames – how to get all x-th columns?

后端 未结 1 672
闹比i
闹比i 2020-12-24 03:38

I have list of data.frames and I wonder whether there is an easy indexing way of getting all third columns of all data.frames. Or all columns named x? Speaking R:



        
相关标签:
1条回答
  • 2020-12-24 04:33

    Maybe this is somewhat easier:

    lapply(mylist, "[[", 3)
    lapply(mylist, "[[", name_of_column)
    
    0 讨论(0)
提交回复
热议问题