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

detect_dm_csv return type "logical" for empty columns #1

Closed
djvanderlaan opened this issue Apr 24, 2013 · 0 comments
Closed

detect_dm_csv return type "logical" for empty columns #1

djvanderlaan opened this issue Apr 24, 2013 · 0 comments

Comments

@djvanderlaan
Copy link
Owner

When a CSV file has an empty column (or when the column is empty for the rows used), the column type returned is logical which is not a valid column type.

The following code reproduces the problem
lines <- c("1;;A", "2;;A", "3;;B", "4;;B")
writeLines(lines, "test.csv")
dm <- detect_dm_csv("test.csv", sep=";")
dm

For unsupported column types we probably need to generate a warning and use type "string". Type "string" will always work and read in the data. Perhaps we also need to detect empty columns although it is not clear what we should do with those as it is impossible to determine the correct type.

djvanderlaan pushed a commit that referenced this issue Apr 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant