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

Is there an equivalent to contract? #23

Closed
sergiocorreia opened this issue Oct 31, 2017 · 2 comments
Closed

Is there an equivalent to contract? #23

sergiocorreia opened this issue Oct 31, 2017 · 2 comments

Comments

@sergiocorreia
Copy link

When writing ftools, I realized that I could have contract for free if I just stopped at the middle of the collapse code and returned the counts of each level. Thus, the freq option allows you to get the same results as contract.

Is there something like that with gtools? (Running collapse (count) is not ideal because it requires an additional variable, it requires it to be nonmissing, etc.)

@mcaceresb
Copy link
Owner

I have added a freq option to collapse but am in the middle of implementing a dedicated command for contract, actually. The reasoning for that is that I s twofold:

  1. I can contract way faster than collapse.
  2. I was already implementing a toplevesof command that prints the top frequencies of contract (similar to groups; I wrote an ado file for this a while back but it was really slow).

So I have a separate internal mechanism for frequencies, percentages, etc.

mcaceresb added a commit that referenced this issue Nov 1, 2017
gtools-0.9.0 (2017-11-01)

Features

- The plugin now works on OSX
- Online documentation is now available: [gtools.readthedocs.io](http://gtools.readthedocs.io/en/latest/index.html)
- `gcontract` is a fast alternative to `contrast`
- `gtoplevelsof` is a new command that allows the user to glean the most
  common levels of a set of variables.  Similar to `gcontract` with a `gsort`
  of frequency by descending order thereafter, but `gtoplevelsof` does not
  modify the source data and saves a matrix with the results after its run.
- `gdistinct` now saves its results to a matrix when there are multiple
  variables.
- Improved and normalized documentation

Bug fixes

- OSX version; fixes #11
- `gisid` now sient w/o benchmark or verbose; fixes #20
- Added quotes to `cd cwd` in `gtools`; fixes #22
- `gcontract` available; fixes #23
@mcaceresb
Copy link
Owner

As of 0.9.0, gcontract is available. Also have a look at gtoplevelsof which does the same but only prints the top frequencies.

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