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

Add check.names argument to fread #1027

Closed
DavidArenburg opened this issue Jan 28, 2015 · 1 comment
Closed

Add check.names argument to fread #1027

DavidArenburg opened this issue Jan 28, 2015 · 1 comment
Assignees
Milestone

Comments

@DavidArenburg
Copy link
Member

I didn't find a dupe for this, though it seems like a very needed feature as many times we read files from .CSV that came from .XLS or .XLSX and their column names are not of standard format of R.

I'm well aware that you can do setnames(DT, make.names(names(DT))) but it is very inconvenient IMO.

Thanks

@DavidArenburg
Copy link
Member Author

I don't feel like this was solved as intended. I meant that fread should behave similarly to read.* functions in base R which are using the make.names function instead of the make.unique function (like fread currently doing.

Compare

fread("a b,c d\n 1,2", check.names = TRUE)
#    a b c d
# 1:   1   2
read.csv(text = "a b,c d\n 1,2")
#   a.b c.d
# 1   1   2

I feel like the new check.names argument just adds more to the confusion now rather fixing the issue. I think that this should be reopened.

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

2 participants