EpiLossR provides standardized tools for estimating direct economic losses associated with mortality and morbidity in animal diseases.
Version 0.1.0 focuses on two core functions:
mortality_loss()morbidity_loss()These functions return a common S3 object (epi_loss)
with methods for printing, summarizing, plotting, and exporting
results.
library(EpiLossR)
mort <- mortality_loss(
animals = 100,
mortality = 5,
value = 10000
)
mort
#>
#> EpiLossR
#> -----------------------------
#> Measure : Mortality Loss
#> Estimate: 50,000
#> Unit : Currencysummary(mort)
#>
#> EpiLossR Summary
#> ==============================
#>
#> Measure : Mortality Loss
#> Estimate: 50,000
#> Unit : Currency
#>
#> Inputs
#> ------
#> $animals
#> [1] 100
#>
#> $mortality
#> [1] 5
#>
#> $value
#> [1] 10000
#>
#>
#> Details
#> -------
#> $mortality_rate
#> [1] 0.05
#>
#> $deaths
#> [1] 5morb <- morbidity_loss(
affected = 20,
duration = 10,
daily_loss = 100,
treatment_cost = 5000
)
morb
#>
#> EpiLossR
#> -----------------------------
#> Measure : Morbidity Loss
#> Estimate: 25,000
#> Unit : Currencysummary(morb)
#>
#> EpiLossR Summary
#> ==============================
#>
#> Measure : Morbidity Loss
#> Estimate: 25,000
#> Unit : Currency
#>
#> Inputs
#> ------
#> $affected
#> [1] 20
#>
#> $duration
#> [1] 10
#>
#> $daily_loss
#> [1] 100
#>
#> $treatment_cost
#> [1] 5000
#>
#>
#> Details
#> -------
#> $production_loss
#> [1] 20000
#>
#> $treatment_cost
#> [1] 5000sessionInfo()
#> R version 4.5.1 (2025-06-13 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 10 x64 (build 19045)
#>
#> Matrix products: default
#> LAPACK version 3.12.1
#>
#> locale:
#> [1] LC_COLLATE=C LC_CTYPE=English_India.utf8
#> [3] LC_MONETARY=English_India.utf8 LC_NUMERIC=C
#> [5] LC_TIME=English_India.utf8
#>
#> time zone: Asia/Calcutta
#> tzcode source: internal
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] EpiLossR_0.1.0
#>
#> loaded via a namespace (and not attached):
#> [1] digest_0.6.37 R6_2.6.1 fastmap_1.2.0 xfun_0.54
#> [5] cachem_1.1.0 knitr_1.51 htmltools_0.5.9 rmarkdown_2.31
#> [9] lifecycle_1.0.5 cli_3.6.6 sass_0.4.10 jquerylib_0.1.4
#> [13] compiler_4.5.1 rstudioapi_0.19.0 tools_4.5.1 evaluate_1.0.5
#> [17] bslib_0.9.0 yaml_2.3.10 otel_0.2.0 jsonlite_2.0.0
#> [21] rlang_1.3.0