Quantcast

read.table

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

read.table

Max Kauer
Hi
it appears to me that read.table is very slow for reading large data files
(mine are 200,000 rows). Is there a better way?
Thanks!
Max

--
Maximilian O. Kauer, Ph.D.
Department of Genetics, White lab
333 Cedar St, NSB 386
PO Box 208005
New Haven, CT 06510

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: read.table

roger bos
?scan is much faser.  Also, read.table has a colClasses optional argument
which can be used to speed up the reading of large files significantly.
read.table has a pretty good help section well worth reading.

     read.table(file, header = FALSE, sep = "", quote = "\"'", dec = ".",
                row.names, col.names, as.is = FALSE, na.strings = "NA",
                colClasses = NA, nrows = -1,
                skip = 0, check.names = TRUE, fill = !blank.lines.skip,
                strip.white = FALSE, blank.lines.skip = TRUE,
                comment.char = "#", allowEscapes = FALSE)


2006/2/14, Max Kauer <[hidden email]>:

>
> Hi
> it appears to me that read.table is very slow for reading large data files
> (mine are 200,000 rows). Is there a better way?
> Thanks!
> Max
>
> --
> Maximilian O. Kauer, Ph.D.
> Department of Genetics, White lab
> 333 Cedar St, NSB 386
> PO Box 208005
> New Haven, CT 06510
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Loading...