Skip to content

Chars tools#20

Merged
rwbuie merged 9 commits intodevfrom
chars_tools
Apr 14, 2025
Merged

Chars tools#20
rwbuie merged 9 commits intodevfrom
chars_tools

Conversation

@dcolombara
Copy link
Copy Markdown
Contributor

Created chi_chars_ccs & chi_chars_injury & tests

  • Both functions tabulate CHARS hosp. counts by demographics, similar to chi_calc()
  • chi_chars_ccs handles CCS categories; chi_chars_injury handles injury matrix
  • Added comprehensive testthat tests for both functions

- Both functions tabulate CHARS hosp. counts by demographics, similar to
  chi_calc()
- chi_chars_ccs handles CCS categories; chi_chars_injury handles injury matrix
- Added comprehensive testthat tests for both functions
 - .() to list()
 - declared globals
 - importFrom utils capture.output
no changes to coding, just rendered with devtools::document()
 previously used the overall max start date for
 a given indicator_key to identify missing data.
 This was flawed, because it needs to be row wise.
 changed max to pmax ensure it is a parallel
 comparison (i.e., by rows)
 instructions have 'race3_hispanic' because
 it is a distinct variable. It is however
 reported in the results as 'race3', so, when
 comparing the results to the instructions to
 identify missing data, we need need to change
 back to race3_hispanic (for cat2==Ethnicity)
 - passed all tests
 - will be used with chi_chars_ccs &
   chi_chars_injury & possibly other f()
 - both now use chi_keep_proper_ages to keep
   only relevant chi_age values
 - '2022-2022' is now '2022'
 - enure final output columns have desired order
 - filtering by age doesn't make sense if
   cat1 | cat2 are not Age, so return entire
   unfiltered dataste
@rwbuie rwbuie merged commit 54faa3e into dev Apr 14, 2025
@rwbuie rwbuie deleted the chars_tools branch April 14, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants