[R] loop, pipe connection, output objects

2006-10-13 Thread Marco Grazzi
Hi all, I have the following -newbye- problem. Inside R, I am trying to process a file and creating from it many files. The file is organized in different columns, the second containing a code. I want to create as output objects, which contain only entries in a certain code range, and whose

Re: [R] loop, pipe connection, output objects

2006-10-13 Thread jim holtman
Why don't you read the whole file in and the use subsetting to get your ranges instead of reading the file multiple time using 'gawk'. You can then use 'assign' to create your objects; it would be better to use a list. indice - (201:399) result - list() x - read.table('base_6_mod') for (i in

Re: [R] loop, pipe connection, output objects

2006-10-13 Thread Gabor Grothendieck
read your data frame in all at once and then cut it on x[2] and split the result, e.g. split(iris, cut(iris$Sepal.Length, 4:8)) Please provide reproducible code. Without input its not reproducible. See last line of every message to r-help. On 10/13/06, Marco Grazzi [EMAIL PROTECTED] wrote: