Consider having readChangeoDb wrap fread() instead of read.table()

Issue #39 resolved
Eric Mukherjee created an issue

It would really speed this up; file i/o is the bottleneck for my thesis project right now!

Btw this package is really great, thanks for all your work

Comments (6)

  1. Jason Vander Heiden

    Thanks! Good suggestion. I'll take a look at it soon, and make the change if dplyr and data.table agree to play nice (I don't anticipate a problem).

  2. Jason Vander Heiden

    Hi @Eric Mukherjee,

    I've changed the default behavior of readChangeoDb() to use data.table::fread() in the current (development) version of the package in the default branch. As fread() doesn't currently support compressed (gz, etc) files, it'll fall back on utils::read.table() if fread() can't open the file. Also, I had it return a data.frame instead of a data.table. I'll have to check everything later for data.table compatibility before switching over entirely.

    Please let me know if you have any trouble.

  3. Jason Vander Heiden

    It's pretty straight forward. The only tricky part is that if you are using Windows then you must install the same version of Rtools as your R version.

    To install from the current code, first install the build dependencies:

    install.packages(c("devtools", "roxygen2", "testthat", 
                       "knitr", "rmarkdown"))
    

    Then use the bitbucket installer from devtools:

    library(devtools)
    install_bitbucket("kleinstein/alakazam@default")
    

    If you have any trouble with this I can provide more detailed instructions.

  4. Log in to comment