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

Use NULL for onset-to-event and risk function arguments #148

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

joshwlambert
Copy link
Member

This PR addresses #147 by replacing the use of NA with NULL for turning off onset-to-event delays (e.g. onset_to_hosp or onset_to_death) or risks (e.g. hosp_risk or hosp_death_risk).

The default value for onset_to_recovery has been changed from NA to NULL in sim_linelist() and sim_outbreak(). The documentation of function argument has been updated, as has the unit tests and a vignette.

Internal checking functions have been updated to check for NULL values. The as_function() converts NULL to the same NA generating function, therefore the output line list still contains a column of NAs which theses processes are turned off.

@joshwlambert joshwlambert requested a review from sbfnk June 24, 2024 16:37
Copy link
Contributor

@sbfnk sbfnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@joshwlambert joshwlambert merged commit ef350f2 into main Jun 25, 2024
8 checks passed
@joshwlambert joshwlambert deleted the null-args branch June 25, 2024 11:12
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