[R] Executing the same function on consecutive files

2011-06-27 Thread Trying To learn again
Hi all, I have the next problem: I have a matrix with size 8,000,000x18. My personal computer...blocks...so I have cut my original file into 100 different file. I have written a function that should be run on each of this file. So imagine I need to read data from q1 to q100 file

Re: [R] Executing the same function on consecutive files

2011-06-27 Thread John Kane
the same function on consecutive files To: r-help@r-project.org Received: Monday, June 27, 2011, 6:01 PM Hi all, I have the next problem: I have a matrix with size 8,000,000x18. My personal computer...blocks...so I have cut my original file into 100 different file. I have written a function

Re: [R] Executing the same function on consecutive files

2011-06-27 Thread Dennis Murphy
Hi: One approach: (1) Put your files into a separate directory. (2) Use list.files() to grab the individual file names. (3) Write a function that takes a data frame as an argument and does the necessary processing. (4) Use lapply() or ldply/llply from the plyr package to recursively run the