Conversation
- new validations - built in more tweaks for race3 headaches - dropped dependency on tidyr::crossing - progress meter - better documentation / comments
- improved roxygen2 header - simplified / tidier code, but same fundamental logic / structure
- file is now called chi_generate_instructions_pop
* Improved documentation with detailed Roxygen comments * Added input validation with helpful error messages * Clearer section comments * Replaced tidyr::crossing with data.table * progressr progress tracking * Standardized variable naming * Improved work with categorical variables and crosswalks
- previous logic for dropping when cat2_group was NA / 'NA' and cat1 group NOT NA / 'NA' was flawed
- just rename because now fully functional
- changed references to 'key' column to 'mykey' because `key` is reserved (or maybe should be reserved) by data.table
- drop proto prefix because fully documented & updated
- now use `catnum`, `catgroup`, and `catvarname` in a standard way across functions
Update functions for rates
fixed type missmatch error
…...N . Added error for missing any set data
no longer a valid argument for chi_generate_tro_shell
start.year no longer a valid argument chi_generate_tro_shell
…apde.chi.tools into dev_updates_off_lcod
…g against prior tables
Dev updates off lcod
update adding_unit_tests
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
- previous was dendent upon one of the byvars being 'wastate', but it's possible that in the future we'll be asked to perform a crosstab for WA State data, e.g., sex and race. In that case neither byvar would be wastate. - now checks if the tab is _wastate, which shoud be more robust
…ng wrong with how data tables (names not properly exporteD) attempted providing specific dates to data exported from helper.R chenged data source name in chi_generate_analysis_set set to "generic_test" to match test set used.
- '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
chi_calc determination of WA State data improved
Chars tools
FIXED chi_generate_metadata valid_years
Adding unit tests and more complex testing data
- used in helper.R, but never declared
add keyring to Suggests in DESCRIPTION
…nd if they fail, their depencies should be fixed at the package level) many of these tests are failing or throwing errors, but this function is highly specific and probably doesn't need to be fixed for initial release.
Collaborator
Author
|
dev deleted so new dev branch can have clean commit history. |
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.
Dev passes existing tests. Pushing to main for 2025.0.0 release.