just store in the list the values you want: list1 <- list() for (i in list.files(pattern=".*c02.*AFDH0.*")){ x <- read.table(i,skip=20,fill=TRUE) list1[[i]] <- subset(x, value > 1.0) }
On 10/13/07, Svempa <[EMAIL PROTECTED]> wrote: > > I have this code: > > list1 <- list() > for (i in list.files(pattern=".*c02.*AFDH0.*")){ > x <- read.table(i,skip=20,fill=TRUE) > list1[[i]] <- x > } > > Somehow I would like the read.table function to read only values in each > file that are over a certain limit, say >1. Is this the easiest way or is it > better to tamper with 'list1' when it's done? > > -- > View this message in context: > http://www.nabble.com/Controlling-values-in-read.table-tf4618306.html#a13189693 > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? ______________________________________________ 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.