Re: [R] Help parsing from .txt

2013-10-24 Thread arun
Hi, You may try: ?list.files() nm1 <- list.files(pattern=".txt") res <- lapply(nm1,function(x) {                                 ln1 <- readLines(x) indx1 <- grep("DATE PROCESSED",ln1) indx2 <- grep("[A-Z]",ln1)

Re: [R] Help parsing from .txt

2013-10-23 Thread arun
Hi, You may try: ?list.files() nm1 <- list.files(pattern=".txt") res <- lapply(nm1,function(x) {                                 ln1 <- readLines(x) indx1 <- grep("DATE PROCESSED",ln1) indx2 <- grep("[A-Z]",ln1)