Skip to content

fread colClasses=NA_character_ incorrect #4237

@mattdowle

Description

@mattdowle

Follow up to #1910. Not sure how this lasted so long.

> fread("A,B\n1,3\n2,4\n", colClasses=c(NA_character_, NA_character_))
       A     B      # correct
   <int> <int>
1:     1     3
2:     2     4
> fread("A,B\n1,3\n2,4\n", colClasses=NA_character_)
        A      B    # incorrect
   <char> <char>
1:      1      3
2:      2      4
> 

There's a length-1 specific case at C level which doesn't deal with the NA properly when colClasses is length 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions