Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created
chi_chars_ccs&chi_chars_injury& testschi_calc()chi_chars_ccshandles CCS categories;chi_chars_injuryhandles injury matrixtestthattests for both functions