Re: [R] loading and manipulating 10 data frames-simplified

2009-03-28 Thread Mike Lawrence
And check out plyr (http://had.co.nz/plyr/) for manipulating those 10 elements. On Fri, Mar 27, 2009 at 9:20 AM, jim holtman wrote: > Look at using a 'list' as obtained from 'lapply' > > fileNames <- 'your files to be read' > Bin_main <- lapply(fileNames, function(.file){ >    input <- read.csv(f

Re: [R] loading and manipulating 10 data frames-simplified

2009-03-27 Thread Uwe Ligges
Put the data.frames as elements in a list and loop / sapply() over that list. Uwe Ligges PDXRugger wrote: I have to load 10 different data frames and then manipulate those 10 data frames but would like to do this in a more simplified code than what i am doing. I have tried a couple of approa

Re: [R] loading and manipulating 10 data frames-simplified

2009-03-27 Thread jim holtman
Look at using a 'list' as obtained from 'lapply' fileNames <- 'your files to be read' Bin_main <- lapply(fileNames, function(.file){ input <- read.csv(fileNames, ) # all your calculations; e.g., acre <- ... cbind(acres, parprob, ...) }) Now look at the structure ('str

[R] loading and manipulating 10 data frames-simplified

2009-03-27 Thread PDXRugger
I have to load 10 different data frames and then manipulate those 10 data frames but would like to do this in a more simplified code than what i am doing. I have tried a couple of approaches but cannot get it to work correctly. So the initial (bulky) code is: #Bin 1 #--- #Loads bin data