epiverse-trace / simulist

An R package for simulating line lists
https://epiverse-trace.github.io/simulist/
Other
5 stars 1 forks source link

Add comment when defining infections #78

Closed joshwlambert closed 9 months ago

joshwlambert commented 9 months ago

This PR addresses a comment from the package review PR #73 on the definition and later use of the infected column of the line list data. It is used at several points in the simulation in conditional statements such as .data$infected == "infected" which could produce erroneous results if the character strings in the columns does not exactly match "infected". A comment has been added to .sim_network_bp() to remind developers that if the definition of the infections or contacts (infected <- ifelse(test = infected, yes = "infected", no = "contact")) is changed to also update the conditional statements.