-
Notifications
You must be signed in to change notification settings - Fork 977
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 a dateFormat argument to fread #5006
Comments
caveat: I think there is a typo in your example, the example doesn't look like it's in
So that leaves supporting a way to provide formats in the
Or perhaps a new argument with
and This is not bad, but to we also need a Ultimately, given that there's no performance benefit, I'm a bit loath to implement this myself. The following looks OK to me:
or
And |
I wonder if it's possible to just have |
Related issue #1656 |
Apologies for the typo in the example. I fixed it. Thank you for the answers! Looking at the source code of fread, I was hoping that indeed the transfer of the format argument to If not, do you think the option |
have you tried colClasses='character' for those columns? should accomplish the same |
disclaimer:
potential usage:
Code
|
As described in this Stack Overflow thread, it would be nice to be able to specify the format of dates types that are automatically detected by fread.
Since both as.Date and as.POSIXct seem to support formatting, I assume it wouldn't be difficult to implement with one format. Maybe this could be extended to a vector of formats? Also, the empty vector could be used to disable the detection entirely thus falling back to the old behavior if needed by the user.
The text was updated successfully, but these errors were encountered: