Skip to content

Ignore "empty" lines of csv data when reading user-supplied input tables #18

@jamesrco

Description

@jamesrco

Currently, the implementation of read.table() used in LOBSTAHS will return an error

Error in read.table("/Users/jamesrco/Desktop/LOBSTAHS_componentCompTable.csv",  : 
  duplicate 'row.names' are not allowed

if the user supplies a .csv file with "empty" lines of csv data in it. Depending on how Excel is used to save/write .csv files, these lines will sometimes be retained in the saved file -- even though it appears to the user in Excel that they've been deleted.

When using the row.names = 1 argument in read.table(), these lines appear to have duplicate row names since the first field is the same (a blank value) in all of them.

Perhaps we can write something that detects "blank" lines and automatically deletes them, before passing the file handle off to read.table()?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions