Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Typo Error Message #203

Open
jacobdornEcon opened this issue Aug 7, 2024 · 0 comments
Open

Feature Request: Typo Error Message #203

jacobdornEcon opened this issue Aug 7, 2024 · 0 comments

Comments

@jacobdornEcon
Copy link

Thank you for writing this package! I had a small quality-of-life suggestion.

Suppose one wanted to analyze the mpdta dataset:

data(mpdta)
did::att_gt(yname = "lemp", gname = "first.treat", idname = "countyreal", tname = "year",  data = mpdta)

However, suppose one (totally hypothetically) is silly and thinks it's a country-level dataset and runs:

data(mpdta)
did::att_gt(yname = "lemp", gname = "first.treat", idname = "countryreal", tname = "year",  data = mpdta)

The package gives an error:

Error in `[.data.frame`(data, , c(idname, tname, yname, gname, weightsname,  : 
  undefined columns selected

which is scary and not super helpful for debugging.

When you have a free moment, it might be nice to instead throw an error that includes setdiff(c(idname, tname, yname, gname, weightsname, ...), names(the_data_frame)) for easier typo-finding. Though it's certainly low priority!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant