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

Refactor add_cols functions #40

Merged
merged 6 commits into from
Jan 4, 2024
Merged

Refactor add_cols functions #40

merged 6 commits into from
Jan 4, 2024

Conversation

joshwlambert
Copy link
Member

This PR updates the function categorised as add_cols (including .add_date and .add_info functions), with suggestions from PR #33. The updates include:

  • Merging .add_date_first_contact() and .add_date_last_contact() and renaming to .add_date_contact() to reduce duplicated code. This new function contains the argument contact_type to select which type of date to add.
  • Assignments from tryCatch() are now made outside the tryCatch() rather than within to remove implicit assignment.
  • Dots (...) are no longer stored in a variable and a comment is added to explain why dots are checked in a vector over a list.
  • A typo in apply_death_rate() internal function is fixed.

Other functions that call .add_date_contact() are updated, documentation and tests are updated and duplicated tests for .add_date_contact() are removed.

@joshwlambert joshwlambert merged commit 31e1854 into main Jan 4, 2024
8 checks passed
@joshwlambert joshwlambert deleted the updt_add_cols branch January 4, 2024 09:56
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.

1 participant