Skip to content

Friendly column finder for "not found" errors #2887

@MichaelChirico

Description

@MichaelChirico

Consider:

DT = data.table(myname = 1, some_var = 2)
DT[somevar == 2]
#  Error in eval(.massagei(isub), x, parent.frame()) : 
#   object 'somevar' not found 

Should be easy enough to run adist on names(DT) (or also ls()) to suggest some potential misspellings. Nothing too sophisticated of course, maybe just look within levensthein distance of 2 or 3. Truncated to 10 options or so in case there are numbered columns.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions