Skip to content

Error reading nonmem output with fread #1113

Closed

Description

@dmenne

The file that reads Ok, but slowly with read.table is output from a PK/PD program, truncated. Quite sure I missed some settings.

# Sample file can be downloaded from
# http://www.menne-biomed.de/uni/nonmem.txt
# This is output from NONMEM (PK/PD program)
# The full file is about 10000 lines and
# needs 60 seconds on my computer to load with read.table

str(read.table("nonmem.txt", header=TRUE)) # Fine, slow for large

library(readr)
str(read_table("nonmem.txt")) # Fast, but not correct
str(read_table("nonmem.txt", col_names=FALSE ,skip=1)) # Fast, no column names

library(data.table)
str(fread("nonmem.txt")) # error
str(fread("nonmem.txt"),skip=1, header=FALSE ) # error
sessionInfo()


R version 3.1.3 (2015-03-09)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] data.table_1.9.5    readr_0.1.0.9000    testthat_0.9.1.9001

loaded via a namespace (and not attached):
[1] chron_2.3-45   fortunes_1.5-2 Rcpp_0.11.5.1  tools_3.1.3   

Activity

  1. arunsrinivasan commented on May 13, 2015

    @arunsrinivasan
    Member

    Thanks for filing it here @dmenne. Will fix when we work on it next.

  2. added this to the v1.9.6 milestone on Sep 9, 2015
  3. arunsrinivasan commented on Sep 16, 2015

    @arunsrinivasan
    Member

    Fixed in devel. Please upgrade and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions