Skip to content

Improve error message when using missing column in .SDcols #3116

@MichaelChirico

Description

@MichaelChirico

Discovered when updating the source table in an ETL and using data.table downstream; source column names changed and gave me an error that's hard to deal with quickly:

DT = data.table(a = 1:5)
DT[ , .SD, .SDcols = 'b']

Error in [.data.table(DT, , .SD, .SDcols = "b") :
Some items of .SDcols are not column names (or are NA)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions