Skip to content

Negative select in fread #2423

@MichaelChirico

Description

@MichaelChirico
fread('v1,v2,v3,v4,v5\n1,2,3,4,5', select = -1L)

Error in fread("v1,v2,v3,v4,v5\n1,2,3,4,5", select = -1L) :
Column number -1 (select[1]) is out of range [1,ncol=5]

Seems natural enough to allow negative selection as elsewhere in R & [.data.table

Expected output

data.table(V2 = 2, V3 = 3, V4 = 4, V5 = 5)
#    V2 V3 V4 V5
# 1:  2  3  4  5

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