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

Problem with -if- condition in several commands #78

Closed
sergiocorreia opened this issue Aug 18, 2021 · 1 comment
Closed

Problem with -if- condition in several commands #78

sergiocorreia opened this issue Aug 18, 2021 · 1 comment
Assignees

Comments

@sergiocorreia
Copy link

Describe the bug

If the -if- condition has an open or close parenthesis, gtools (gegen/gdistinct/gunique/etc) returns with error too few ')' or ']'

Code Sample
Include a code snippet to reproduce the problem; be sure to run the relevant gtools program(s) with options verbose bench(3).

These lines trigger the error:

sysuse auto
gdistinct make if !strpos(make, ")") // fails
gunique make if !strpos(make, ")") // fails
gegen x = group(foreign) if !strpos(make, "x)") // fails

Running with verbose:

. gdistinct make if make!="(", verbose bench(3)
Parsed by variables; .003 seconds
too few ')' or ']'

Version info

  • OS: Win10[e.g. Windows 10]
  • Version: 1.7.5 18Apr2020
@mcaceresb mcaceresb self-assigned this Aug 20, 2021
@mcaceresb
Copy link
Owner

@sergiocorreia Ah, this seems to be an issue throughout my entire code pipeline. I'll have to switch up how I'm passing if and in around in a few places. Thanks for flagging!

mcaceresb added a commit that referenced this issue Aug 28, 2021
Features

- Added `gglm` to estimate GLM models, including `logit`.

Bug Fixes

- Closes #78: if now passed raw/in double-quotes throughout the pipeline
- Closes #75: gunique returns 0s in r() when there are no obs
- Closes #74: gstats transform parses abbreviated targets
- Closes #72: Warning for gegen expressions without by group
- Fixed GLM issues generating de-meaned variables
- Fixed gegen nunique with multiple inputs
- Fixed bug in `gpoisson` where internal weights not copied correctly in loop.
- Various fixes to the docs.
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

2 participants