# Run this using R CMD BATCH scan.R t1 <- Sys.time() header <- unlist(scan("CAP.dat",what=list("","","","","","","","","",""),sep="\t",nlines=1)) a <- scan("CAP.dat",what=list(1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0),skip=1,nlines=1619613) names(a) <- c("Name",header) a <- as.data.frame(a) t2 <- Sys.time() difftime(t2,t1,units="secs")