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

read_csv errors with multiple column rows #224

Closed
ziyadsaeed opened this issue Jul 25, 2015 · 0 comments
Closed

read_csv errors with multiple column rows #224

ziyadsaeed opened this issue Jul 25, 2015 · 0 comments

Comments

@ziyadsaeed
Copy link

For files with multiple column rows, read_csv errors out even if i tell it not to read the rows with different columns using n_max. For eg

read_csv('param1, param2, param3
2, 3, "a"
var1, var2, var3, var4, var5
"a", 3,5,"b",6', 
n_max = 1)
Error: You have 3 column names, but 5 columns

It should read the first line as a header and the next line as the data and shouldn't go any further.
If i use skip = 2 so the first two lines are skipped then it works as expected. It read the third line as header and fourth as data

read.csv from base r has no problems reading the file with nrows = 1

@hadley hadley closed this as completed in 4230235 Sep 3, 2015
@lock lock bot locked and limited conversation to collaborators Sep 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant