-
Notifications
You must be signed in to change notification settings - Fork 13
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
Updates to slab()
#259
Updates to slab()
#259
Conversation
ef3492e
to
6f718a4
Compare
- closes #229 - NA_real_ for proper expectation of missing weights passed to base weighted.mean() (minimal custom slab function)
6f718a4
to
6a73253
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please have a look at specific comments. I would like to do some testing before fully converting the unweighted stuff to DT.
- need to refactor slab functions so that a single call is possible for weighted/unweighted/numeric/factor
I had mentioned I wanted to check something with the different possible ways of specifying |
I thought of one potential issue, found last night while working on |
It's funny you mention this, since given the discussion we had on
Yep. I think it would be cool if
Yeah, agreed. Would like to see a method for converting slab output to SPC, I actually was going to draft one... and if we were to set that up... then we of course would need to address the metadata issue for consistency in "SPC methods that return SPCs" |
- still needs testing/checking; encountered in setting up check dataset for #259
I've looked over the KSSL check code and made updates last weekend, the numeric discrepancy for that check set is in the Musick profiles that don't pass a logic check. Remaining comments and questions:
|
- need to recalculate local var to avoid errors
From my testing I find that the cpm=2 argument also gives the same results for ~genhz formula between version 1 and 2. |
These are some updates that close #229
slab()
now usesdice()
so users will not get confused when they get a deprecation message RE: slice() while using slab(). I have had several questions from users about this (essentially: how do I use dice() with slab()?)fixes mismatching lengths of slab labels v.s rows in data; allows for overlap; see
.genSlabLabels2()
added and exported
slab_function()
a helper method for accessing the internal slab methods provided by the package; now used in method definitions rather than internal functionsadded a weighted variant of the numeric/quantile method via
Hmisc::wtd.quantile()
, and support for custom weighted functions (such asweighted.mean()
)weighted variant of categorical method (created stub function
.slab.fun.factor.weighted()
) now inslab()
: weighted variant of categorical method #269