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

Make ard_categorical() and friends generics? #227

Closed
ddsjoberg opened this issue Apr 12, 2024 · 0 comments · Fixed by #246
Closed

Make ard_categorical() and friends generics? #227

ddsjoberg opened this issue Apr 12, 2024 · 0 comments · Fixed by #246
Assignees

Comments

@ddsjoberg
Copy link
Collaborator

ddsjoberg commented Apr 12, 2024

If these are generics, then they could be extended to work with survey objects (currently, cardx::ard_svycategorical(). This could make downstream tabling would be easier. And we could also later extend it to data with multiple imputations.

I wonder if the processing function would benefit from the same treatment 🤔

@ddsjoberg ddsjoberg self-assigned this May 13, 2024
ddsjoberg added a commit that referenced this issue May 14, 2024
**What changes are proposed in this pull request?**
* Converting `ard_*()` functions and other helpers to S3 generics to
make them extendable. (#227)

**Reference GitHub issue associated with pull request.** _e.g., 'closes
#<issue number>'_
closes #227


--------------------------------------------------------------------------------

Pre-review Checklist (if item does not apply, mark is as complete)
- [x] **All** GitHub Action workflows pass with a ✅
- [x] PR branch has pulled the most recent updates from master branch:
`usethis::pr_merge_main()`
- [x] If a bug was fixed, a unit test was added.
- [x] Code coverage is suitable for any new functions/features
(generally, 100% coverage for new code): `devtools::test_coverage()`
- [x] Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

- [x] If a bug was fixed, a unit test was added.
- [x] Run `pkgdown::build_site()`. Check the R console for errors, and
review the rendered website.
- [x] Code coverage is suitable for any new functions/features:
`devtools::test_coverage()`

When the branch is ready to be merged:
- [x] Update `NEWS.md` with the changes from this pull request under the
heading "`# cards (development version)`". If there is an issue
associated with the pull request, reference it in parentheses at the end
update (see `NEWS.md` for examples).
- [x] **All** GitHub Action workflows pass with a ✅
- [x] Approve Pull Request
- [x] Merge the PR. Please use "Squash and merge" or "Rebase and merge".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant