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

[Request] [Low] Shortening fread Warning Output #1042

Closed
mgahan opened this issue Feb 13, 2015 · 3 comments
Closed

[Request] [Low] Shortening fread Warning Output #1042

mgahan opened this issue Feb 13, 2015 · 3 comments

Comments

@mgahan
Copy link

mgahan commented Feb 13, 2015

Often when I read in a csv file, I get warnings like the following:

Warning messages: 1: In fread("MrCIA_Kansas.csv") : Bumped column 10 to type character on data row 74, field contains 'P057300'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable-help, please rerun and include the output from verbose=TRUE.

I do not particularly mind this warning. However, lately I have been trying to "convert" people to use data.table more often. Most of the time it isn't about the speed of data.table, but the simplicity. They are usually so freaked out by the volume of warning message that they dismiss the data.table package right away. This is unfortunate to me, as it is a wonderful package.

I think it might be worthy of a discussion to make the warning output less verbose?

@arunsrinivasan
Copy link
Member

:-) seriously? We've tried to be quite explicit about the exact reason for a warning or error.. in the hopes that it'd actually help people figure out the issue better (instead of cryptic errors).

But we'll see if we can maintain it by reducing the volume.

@st-pasha
Copy link
Contributor

st-pasha commented May 4, 2018

This kind of long warning message is no longer emitted. If there are other warnings/errors that appear to be too long, then we can replace them with <short error description>. See ?fread for details. and then have within fread's doc page the section on various errors and warnings. If not then this issue can be closed.

@mgahan mgahan closed this as completed May 4, 2018
@MichaelChirico
Copy link
Member

personally, the more informative the error/warning message the better. if users are intimidated by output, it only means the message wasn't helpful or obvious, so the communication should be improved. just my two cents, it seems like a moot point in this particular case

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

4 participants