Users, I am currently running scripts on a rather large dataset. Many times I sort the data into smaller datasets and must analyze them individually. My instincts are to make a for loop, but I can't seem to find a way to index each sub-dataset (data frames as the case would have it). I would make an array, however, the data types of the columns are different and as I understand, an array cannot handle this type of structure. Any advice on how to do this? Any help is greatly appreciated. Thank you, Dave Mitchell [[alternative HTML version deleted]]
Could you explain a little more about exactly what you are trying to do, or provide some sample code. How are you creating the subsets? Can you put them in a list and then process them from the list, or you could use an 'lapply'. So some details would be helpful. On 1/11/08, dave mitchell <dmmtchll at gmail.com> wrote:> Users, > I am currently running scripts on a rather large dataset. Many times I sort > the data into smaller datasets and must analyze them individually. My > instincts are to make a for loop, but I can't seem to find a way to index > each sub-dataset (data frames as the case would have it). I would make an > array, however, the data types of the columns are different and as I > understand, an array cannot handle this type of structure. > Any advice on how to do this? Any help is greatly appreciated. > > Thank you, > Dave Mitchell > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve?
How about making a list of data frames, then you can use either a loop (mylist[[i]]) or often simpler to use the lapply and sapply functions. ________________________________ From: r-help-bounces@r-project.org on behalf of dave mitchell Sent: Fri 1/11/2008 11:14 AM To: r-help@r-project.org Subject: [R] Scripting issues Users, I am currently running scripts on a rather large dataset. Many times I sort the data into smaller datasets and must analyze them individually. My instincts are to make a for loop, but I can't seem to find a way to index each sub-dataset (data frames as the case would have it). I would make an array, however, the data types of the columns are different and as I understand, an array cannot handle this type of structure. Any advice on how to do this? Any help is greatly appreciated. Thank you, Dave Mitchell [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]