-
-
Notifications
You must be signed in to change notification settings - Fork 16
Extracting proportions from data_tabulate()
#656
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
base: main
Are you sure you want to change the base?
Conversation
@etiennebacher Maybe we can move the code to create the crosstable into an own function, and then simplify (and only do) the formatting in |
Sorry, I forgot about this one. I'll make a CRAN release this week so it would be nice to have this PR in it too.
Sounds good to me but isn't this already the case since the crosstable is built in |
The proportions are currently added in the |
Sorry, when updating the RD, other docs were also updated due to roxygen update.
|
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.
Pull Request Overview
This PR implements a feature to extract proportions from crosstables generated by data_tabulate()
. The main purpose is to add functionality that saves proportion calculations as attributes and provides a new as.prop.table()
method for easy access to these proportions.
- Adds
as.prop.table()
method for extracting proportions from crosstables - Refactors proportion calculation code to eliminate duplication and improve maintainability
- Updates documentation examples to use simplified
withAutoprint()
syntax
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
R/data_tabulate.R | Adds new as.prop.table() method and S3 methods for crosstab objects |
R/data_xtabulate.R | Refactors proportion calculation logic and adds .prop_table() helper function |
man/data_tabulate.Rd | Updates documentation to describe the new as.prop.table() method |
NAMESPACE | Exports the new as.prop.table() method and S3 methods |
NEWS.md | Documents the new feature in the changelog |
DESCRIPTION | Updates package version and RoxygenNote version |
Various .Rd files | Updates documentation examples to use simplified syntax |
R/utils.R | Minor comment formatting fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #656 +/- ##
==========================================
- Coverage 91.73% 91.64% -0.10%
==========================================
Files 76 76
Lines 6410 6604 +194
==========================================
+ Hits 5880 6052 +172
- Misses 530 552 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #655