Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jamesrco opened this issue Jun 12, 2017 · 0 comments
Open

Comments

@jamesrco
Copy link
Member

jamesrco commented Jun 12, 2017

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()?

@jamesrco jamesrco changed the title Ignore Ignore "empty" lines of csv data when reading user-supplied input tables Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant