Skip to content

Commit

Permalink
Add numbers to the vignettes.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomrawson committed Jan 21, 2025
1 parent 382380f commit 7e278f4
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vignettes/fitting-parameters.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Model Fitting with cowflu"
title: "1) Model Fitting with cowflu"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Model Fitting with cowflu}
%\VignetteIndexEntry{1) Model Fitting with cowflu}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
Expand Down
37 changes: 37 additions & 0 deletions vignettes/plotting-model.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "3) Plotting model outputs"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{3) Plotting model outputs}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
markdown:
wrap: sentence
---

This vignette walks through using the model simulations generated in the previous vignette - "2) Simulating the model with fit parameters", to plot the figures shown in the associated publication "A mathematical model of H5N1 influenza transmission in US dairy cattle".

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

```{r setup}
library(cowflu)
library(dust2)
library(monty)
library(dplyr)
library(tidyr)
```

## Load the model simulations
We load a set of model simulations from the previous vignette. Note, the results plotted in the main manuscript are from a simulation of 20,000 iterations. For simplicity, those shown below use only 500 iterations.
```{r}
# Path to the .rds file
file_path <- system.file("extdata", "example_sim_results.rds", package = "cowflu")
# Load the .rds file
Sim_results <- readRDS(file_path)
```
4 changes: 2 additions & 2 deletions vignettes/simulating-model.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Simulating the model with fit parameters"
title: "2) Simulating the model with fit parameters"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Simulating the model with fit parameters}
%\VignetteIndexEntry{2) Simulating the model with fit parameters}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
Expand Down

0 comments on commit 7e278f4

Please sign in to comment.