Skip to content

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

@mgahan

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?

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