-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
rvar indexing and casting improvements #247
Conversation
Codecov Report
@@ Coverage Diff @@
## master #247 +/- ##
==========================================
+ Coverage 94.35% 95.00% +0.65%
==========================================
Files 41 41
Lines 2886 2904 +18
==========================================
+ Hits 2723 2759 +36
+ Misses 163 145 -18
|
Great to see this pr. What do you suggest to test it? Should I recode the example I posted previously? |
Sure! Yeah, hopefully the weird indices should parse properly now and you can at least do diag() without rdo(). I'm not sure in what context you were using 0-length rvars but hopefully that is fixed as well. |
Ok, will do, the 0 length thing is triggered by a unit test of the OncoBayes2 package. Let me report back. |
This PR also fixes #248 now. |
I tested the things I reported:
all good as it looks. Just one thought: It's not I was not quite sure what to do about As I am going to rely with Thanks a lot for addressing these things quickly. Much appreciated. |
Awesome, thanks for taking a look!
Good point. Since the typical behavior on other zero-length objects seems to be to print the constructor that results in a zero-length object, I've changed the behavior to this: rvar()
## rvar<1>[0] mean ± sd:
## rvar()
Fortunately, because
Cool!! Not sure when @paul-buerkner is planning a new release. Once this PR is in I plan to submit #236 shortly after that, which together should cover a bunch of outstanding
Thanks you for taking the time to test things and write it up! It's very exciting to see it being put through its paces :) |
I think we can schedule a new release flexibly. We have not many pressing issues that need to be resolved first (I think). If I schedule a release in the first week of Augst, would that work for this issue and for Sebastians package? |
Works for me. Thanks! |
Works for me too. This PR is ready to be merged when you have a chance to look at it. After that I will submit #236 and I think that's all on my plate for the next release. There are some bigger things I want to get to for a future release (like #149 and #208) but they will take a bit more thought and time. |
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 to me. Thank you!
Summary
This PR supersedes #244 and closes #242, #243, and #246. Specifically, it:
drop()
forrvar
s.diag()
forrvar
s (diag() for rvars #246).as_draws_rvars()
, including nested useof
[
, likex[y[1],2]
(as_draws_rvars() cannot parse indices with nested brackets #243).rvar
s withndraws() > 1
(issue with 0-sized rvars #242). e.g.rvar
s can be cast todraws
formats (issue with 0-sized rvars #242); e.g.Also worth pointing out is that this PR overrides some base functions (
diag()
anddrop()
) using S4 instead of S3 (hence the addedmethods
dep). This is because those functions are overloaded as S4 generics in other packages folks might be using (particularlyMatrix
), so I think this is the best way to prevent weird incompatibilities if both packages are loaded.Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses: