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

ieduplicates : error when two vars only differ in case #238

Open
kbjarkefur opened this issue Sep 1, 2022 · 0 comments
Open

ieduplicates : error when two vars only differ in case #238

kbjarkefur opened this issue Sep 1, 2022 · 0 comments

Comments

@kbjarkefur
Copy link
Contributor

kbjarkefur commented Sep 1, 2022

foreach var of local existingExcelVarsRaw {
local lowcase = lower("`var'")
if ("`var'"!="`lowcase'") rename `var' `lowcase' // Will throw error if name is the same
}

Error happens if these two conditions are satisfied:

  1. The dataset has two vars that will have the same name if both converted to lower case (examples region/REGION, region/Region or rEgion/reGion )
  2. Both are included in ID_varname, uniquevars() or keepvars() OR one var is lower case (region) not included in the command but the var is included in ID_varname, uniquevars() or keepvars() .

For a reason I do not remember, the command change all variables in the report to lower case.

Two options to be investigated to solve this.

  1. Test if this is the case and provide user with a helpful error message
  2. See if the command can be modified so it can handle these cases without error.
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