Re: [R] Help parsing from .txt
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
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)