Fwd: Re: [R] Combining many dataframes from listings of objects?

Derek Eder Derek.Eder at neuro.gu.se
Wed May 15 15:34:47 CEST 2002

> I want to combine (rbind) many dataframes into a single data frame, but "automatically" 
> specifying the names of the dataframes as listing of object names.
> E.g., combine these 18 df objects into one big df using something conceptually like this :
> rbind(objects(pattern="*.df"))

Brian Ripley suggested that something along the lines of:  do.call("rbind", objects(pattern="*.df"))  

But I can't make this fly on vectors.  E.g.,  

>  objects.of.desire_objects(pattern="*.df")
> do.call("rbind.data.frame",list(as.name(objects.of.desire)))  # do.call needs a list and must be of class 'name'

Unfortunately, only the first data.frame in the series is read and returned.

Any further nudges along the right direction anyone?


Derek N. Eder
Göteborgs Universitet
Institutionen för klinisk neurovetenskap - psykiatri
Sahlgrenska universitetssjukhuset SS/SU
Blå straket 17b
SE 413 45  Göteborg
Tlf. +46 (031) 34  2-6139  (office)
Tlf. +46 (031) 34 2-1283  (laboratory)
Tlf. +46 0709 / 7 2-1283 (mobil)
Fax. +46 (031) 82 81 63 
derek.eder at neuro.gu.se

Gothenburg University
Institute of Clinical Neuroscience,
Section for Psychiatry
Salhgrenska Hospital  SU/SS
SE 413 45  Göteborg

-------------- next part --------------
An embedded message was scrubbed...
From: Prof Brian D Ripley <ripley at stats.ox.ac.uk>
Subject: Re: [R] Combining many dataframes from listings of objects?
Date: Wed, 15 May 2002 10:56:07 +0100 (GMT Daylight Time)
Size: 4732
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20020515/a5f0db46/attachment.mht

More information about the R-help mailing list