Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFriendly column finder for "not found" errors #2887
Comments
|
Or agrep("somevar", names(DT), value = TRUE)[1]
#> "some_var" |
Consider:
Should be easy enough to run
adistonnames(DT)(or alsols()) 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.