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

Add units to `<epiparameter>` class and database #391

Closed joshwlambert closed 1 month ago

joshwlambert commented 1 month ago

This PR resolves #343 by adding units to the <epiparameter> class, in the $metadata element, and adds units to all entries in the {epiparameter} database.

A units argument has been added to create_metadata() .

as_epiparameter() is updated to use units from {epireview} data and store it in an <epiparameter> object.

plot.epiparameter() now uses the parameter unit to print in the x-axis. A new unit test is added for plot.epiparameter() to check the units are being printed on the axis label.

The data_dictionary.json is updated to validate parameter units.