Skip to content

Commit

Permalink
Update {epiparameter} usage
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmenTamayo committed Nov 28, 2023
1 parent 724ce0d commit c43361f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ params:
use_epiparameter:
label: "Should the serial interval distribution be extracted directly from the epiparameter package?"
value: FALSE
epiparameter_pathogen:
epiparameter_disease:
label: "Name of the pathogen in the epiparameter database if `use_parameter = TRUE`."
value: "SARS_CoV_2_wildtype"
value: "COVID-19"
si_mean:
label: "Mean of the distribution for serial interval if not using value from epiparameter. Ignored if `use_epiparameter = TRUE`."
value: 4.2
Expand Down Expand Up @@ -377,14 +377,17 @@ discretized Gamma.
## Results

```{r, eval = params$use_epiparameter}
si_epiparameter <- epiparameter::epidist(
params$epiparameter_pathogen,
"serial_interval"
)
si_params <- si_epiparameter$param
si_dist <- si_epiparameter$dist
si_mean <- si_params[[1]]
si_sd <- si_params[[2]]
si_epiparameter <- epiparameter::epidist_db(
disease = params$epiparameter_disease,
epi_dist = "serial_interval",
author = "Nishiura",
single_epidist = T

Check warning on line 384 in inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd,line=384,col=21,[T_and_F_symbol_linter] Use TRUE instead of the symbol T.
)

Check warning on line 385 in inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd,line=385,col=3,[indentation_linter] Indentation should be 0 spaces but is 3 spaces.
si_params <- as.list(get_parameters(si_epiparameter))
si_dist <- family(si_epiparameter)
si_mean <- si_epiparameter$summary_stats$mean
si_sd <- si_epiparameter$summary_stats$sd
```

```{r, eval = !params$use_epiparameter}
Expand Down

0 comments on commit c43361f

Please sign in to comment.