Skip to content

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

Description

@mgahan

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?

Activity

  1. arunsrinivasan commented on Mar 26, 2015

    @arunsrinivasan
    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.

  2. st-pasha commented on May 4, 2018

    @st-pasha
    Contributor

    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.

  3. MichaelChirico commented on May 4, 2018

    @MichaelChirico
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions