-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature Request: a function to align the SAS rounding in R? #1872
Comments
Having an option to use SAS rounding is a good idea. I wonder why I don't think we need to implement a new function as implementations are already available like mentioned above or At the moment we do not use
|
As this is an R package meant to build datasets in R for production, I think we should always have the default rounding in R, i.e. round to even. I do like the option of having the round like SAS available if folks want to use admiral for double programming of SAS datasets, but will we need to have this implemented in admiral or just show users how they can switch his on in a mutate statement or in one of functions that allows for expressions? |
My 2 cents on this... isn't this more something for downstream TLG packages rather than in ADaM? Generally in ADaM we just show the full number and let that be a decision for table formatting. as Stefan says we don't use |
Thank you all for the detailed replies! I agree no need to implement a new function as it's already available, and the rounding is not ADaM-specific. There are situations where rounding is done in ADaM (e.g., CDISC pilot data ADSL.BMIBL). I wonder if we could add examples/documentation on different rounding approaches in R, maybe at admiral or pharmaverse/end_to_end_examples? |
Perhaps a certain blogging site could make a short article?? |
@mstackhouse / @MichaelRimler what's the latest on this PHUSE WG: https://advance.phuse.global/pages/viewpage.action?pageId=327874 ? That's where I usually point people towards and know there was a white paper planned for this. @kaz462 another option could be a page at https://bayer-group.github.io/sas2r/ given it's not admiral or pharmaverse specific? i.e. it's part of general R training. |
Still reading the thread, but AVALC will round in its generation, won't it? @rossfarrugia The CAMIS working group is focused more on statistical methodology implementations. The rounding issue seemed clear in that (R vs SAS), you could get round-to-even or round_away_from_zero with either. in SAS - round() or rounde(). In R, round() or janitor::round_half_up() {as mentioned above}. |
My biostats team has fussed with this as well and this PR to Tplyr is refined from some issues/testing that they did. atorus-research/Tplyr#126 |
Thanks all for your information! @bms63 @rossfarrugia a short article at SAS2R catalog sounds great, issue created, will include the two rounding approaches as mentioned by @bundfussr @MichaelRimler
and mention The function from PHUSE paper has precision issues as discussed in atorus-research/Tplyr#126, so I will stick with |
thanks all for the input! think we can close this one out then. sounds a good outcome - thanks Kangjie! |
Feature Idea
The following function is from a PHUSE paper
Similar work has been done as shown in the link below, but I couldn't find the source code:
https://rdrr.io/github/mbrothe/brdgr/man/round_sas.html
Relevant Input
No response
Relevant Output
No response
Reproducible Example/Pseudo Code
No response
The text was updated successfully, but these errors were encountered: