lsms-worldbank / labeller

Spot and fix common problems with variable and value labels🏷
https://lsms-worldbank.github.io/labeller/
0 stars 0 forks source link

Issue error if no char exists or if target char doesn't exist #44

Closed arthur-shaw closed 6 months ago

arthur-shaw commented 7 months ago

This PR closes #28 by:

arthur-shaw commented 7 months ago

@kbjarkefur , two things:

  1. Does this modest addition look right? For example, would you style the error message differently? SMCL newb here.
  2. Do you see a better way to check whether ANY char exists? Currently, the code uses ds, has(char) to look for any variable with a char. Since char list does not have a return value I can inspect, the ds solution is the only one I see, even though I have some reservations about its performance for dsets with lots of columns.