epiverse-trace / epiparameter

R package with library of epidemiological parameters for infectious diseases and functions and classes for working with parameters
https://epiverse-trace.github.io/epiparameter
Other
33 stars 11 forks source link

Unnest `disease` and `pathogen` in `<epidist>` #253

Closed joshwlambert closed 8 months ago

joshwlambert commented 8 months ago

This PR updates the <epidist> class exported by {epiparameter} by unnesting the previous disease element, which contained a list with disease and pathogen. However, it is easier if the pathogen is exposed at the highest level of the list. This, along with PR #252, is giving more prominence to interacting with {epiparameter} data with the pathogen name.

The epidist(), new_epidist(), validate_epidist(), epidist_db(), print.multi_epidist(), list_distribution(), validate_vb_epidist() are all updated to use the unnested elements in <epidist> objects.

Documentation and tests are updated, as is the data_protocol.Rmd vignette.