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

Controlling which stats to use in the case of numerical variables when using dfSummary() #33

Closed
Payamdel opened this issue Aug 26, 2018 · 6 comments

Comments

@Payamdel
Copy link

Payamdel commented Aug 26, 2018

I'm wondering whether it is possible to control which Stats to be shown in the case of numerical variables when using dfSummary().
This is almost necessary to be able to control which Stats to use for numerical variables, particularity in the case of CV. This is because CV values should not be calculated for a data on a logarithmic scale!

@dcomtois
Copy link
Owner

dcomtois commented Oct 5, 2018

Thx for the suggestion. I'm hesitant to add another parameter for this as there are already many, but maybe this could be automated (by checking distribution types). I'll look into it.

@dcomtois
Copy link
Owner

I couldn't find reliable ways to identify the shape of distributions. So IQR/CV will have to stay until we find something.

However IQR and CV and now removed when data is unary or binary. To try it out, install the 'dev-current' version from GitHub.

@Payamdel
Copy link
Author

Good job! 👍 Thanks for the information!

@SDAMcIntyre
Copy link

How about allowing the user to choose the stats in the same way as in descr()?

@dcomtois
Copy link
Owner

@SDAMcIntyre It's feasible but to avoid weird layouts, and to make things manageable programmatically, I'm thinking of two options here (which are not mutually exclusive):

Option 1. Have predefined "sets of stats", where the current one would be the default and alternate sets could be created that fit / cohabit reasonably well in the cell.
Option 2. Allow custom stats that would each occupy a line in the cell.

One thing is for sure: Unless some coders join in, this will have to wait, as I can barely keep up with the maintenance and the other features I'm working on. (I'm thinking maybe making a call for help on Twitter, if you have other ideas I'm all ears).

@dcomtois
Copy link
Owner

It's done! :)

Will be available on CRAN soon. Here's a document that explains how it works: https://htmlpreview.github.io/?https://github.com/dcomtois/summarytools/blob/master/doc/Custom-Statistics-in-dfSummary.html

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

No branches or pull requests

3 participants