How can I make a list of all dataframes that are in my global environment?

后端 未结 6 2314
不知归路
不知归路 2020-11-28 14:02

I am trying to use rbind on them. But I need a list of all the dataframes that are already in my global environment. How can I do it?

Code

6条回答
  •  孤独总比滥情好
    2020-11-28 14:29

    This is a slight improvement on MentatOfDune's answer, which does not catch data.frames with multiple classes:

    ls()[grepl('data.frame', sapply(ls(), function(x) class(get(x))))]
    

提交回复
热议问题