Skip to content
Prev 343100 / 398528 Next

find the data frames in list of objects and make a list of them

Jim, Wow that was cooool !   This function is *really* useful.  Thank 
you very much !  (It is also way beyond my capability).

I need to make a list of data frames because then I am going to bind 
them with plyr using 'dplyr::rbind_all(listOfDataFrames)'. This will 
make a single data frame, and from that single data frame I can make a 
heat map of all the data.

   For example, when I use your fantastic function, my.ls(), I get:

my.ls()
                                                              Size      Class  Length      Dim
.Random.seed                                                2,544    integer     626
cpl                                                        28,664  character     512
filenames                                                   2,120  character      19
filepath                                                      216  character       1
i                                                             152  character       1
Mer7_1-1_160-226A_1_gene_exp_diff_filt_hc_log2.txt         81,152 data.frame       3  529 x 3
Mer7_1-1_Mer7_1-2_gene_exp_diff_filt_hc_log2.txt           31,624 data.frame       3  199 x 3
Mer7_1-1_S150-160-226A_1_gene_exp_diff_filt_hc_log2.txt    81,152 data.frame       3  529 x 3
Mer7_1-1_W29_1_gene_exp_diff_filt_hc_log2.txt             129,376 data.frame       3  849 x 3
Mer7_1-1_W29_S150-226A_1_gene_exp_diff_filt_hc_log2.txt   126,816 data.frame       3  835 x 3
Mer7_1-1_W29_S160-162A_1_gene_exp_diff_filt_hc_log2.txt    82,792 data.frame       3  537 x 3
Mer7_1-1_W29_S226A_1_gene_exp_diff_filt_hc_log2.txt       115,008 data.frame       3  756 x 3
Mer7_1-2_160-226A_1_gene_exp_diff_filt_hc_log2.txt         79,936 data.frame       3  519 x 3
Mer7_1-2_S150-160-226A_1_gene_exp_diff_filt_hc_log2.txt    84,512 data.frame       3  548 x 3
Mer7_1-2_W29_1_gene_exp_diff_filt_hc_log2.txt             130,568 data.frame       3  857 x 3
Mer7_1-2_W29_S160-162A_1_gene_exp_diff_filt_hc_log2.txt    83,768 data.frame       3  542 x 3
Mer7_1-2_W29_S226A_1_gene_exp_diff_filt_hc_log2.txt       119,008 data.frame       3  783 x 3
Mer7_2-1_160-226A_2_gene_exp_diff_filt_hc_log2.txt        105,344 data.frame       3  685 x 3
Mer7_2-1_Mer7_2-2_gene_exp_diff_filt_hc_log2.txt           26,216 data.frame       3  166 x 3
Mer7_2-1_S150-160-226A_2_gene_exp_diff_filt_hc_log2.txt   106,368 data.frame       3  693 x 3
Mer7_2-1_W29_2_gene_exp_diff_filt_hc_log2.txt             160,200 data.frame       3 1053 x 3
Mer7_2-1_W29_S150-226A_2_gene_exp_diff_filt_hc_log2.txt   152,696 data.frame       3 1005 x 3
Mer7_2-1_W29_S160-162A_2_gene_exp_diff_filt_hc_log2.txt   113,992 data.frame       3  743 x 3
Mer7_2-1_W29_S226A_2_gene_exp_diff_filt_hc_log2.txt       138,944 data.frame       3  914 x 3
my.ls                                                      35,624   function       1
myfiles                                                     2,120  character      19
names                                                       2,424       list      19
test                                                          680  character       5
whatisthis                                                  2,424       list      19
**Total                                                 2,026,440    ------- -------  -------



   What I need is make the list of data frames for the dplyr command, 
dplyr::rbind_all(listOfDataFrames). Ideally, this would also be a 
specific subset of all the data frames, say the data frames with W29 in 
the name. This is something we, our lab, would be doing routinely and at 
various times of the day, so I want to automate the process so it does 
not need anyone to manually sit at the computer and type the list of 
data frames.

Matthew
On 8/13/2014 3:06 PM, jim holtman wrote: