Skip to content
Prev 315759 / 398506 Next

how to bread while loop reading from connection with read.csv

On 21-01-2013, at 16:56, "Collins, Stephen" <Stephen.Collins at allstate.com> wrote:

            
How about:

con <- file("test.csv","rt")
while( length(tmp <- readLines(con,n=10)) > 0 ) {
    qq <- read.csv(text=tmp, header=TRUE)
   # do something with qq
}
unlink(con)
qq


Berend