[R] List of Data Frames

Jerome Asselin jerome.asselin.stat at gmail.com
Tue May 3 02:56:16 CEST 2011


On Mon, 2011-05-02 at 16:42 -0700, Mike Smith wrote:
> I'm trying to create a list of Data Frames.  I have 17 data frames
> that I need to move through in a loop, but if I simply make a list of
> them, then they do not stay data frames, and I can't sort through
> them.  I tried to create an array, but the data frames can have
> anywhere from 14-16 rows, and I couldn't find a way to make a variable
> size array.  If you have any ideas, I would greatly appreciate any
> help, as I'm trying to learn R, and decided to apply it to a project
> that I have been working on.  My goal is splitting a sports season
> into games per week, and then do statistics on each week, but have an
> average running up to that point in the season.  Thus the list would
> be indexed by weeks, and then there's a data frame of the game and
> all relevant statistics. 

My understanding is that you want to have one data frame per week. I
question whether it is necessary to split these data frames. I would
design a single data frame with one column to identify the week and then
work on subsets of that data frame to calculate the weekly stats or
cumulative indexes as you wish.

Jerome



More information about the R-help mailing list