Skip to content

Commit 36d7407

Browse files
committed
Add build environment tables to the About page
Show the R version, platform, and core package versions on the About page, rendered from sessionInfo() as tables. The full pinned set stays in renv.lock.
1 parent 8441141 commit 36d7407

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hash": "00f19e7dd123afb34e475420da1a4170",
3+
"result": {
4+
"engine": "knitr",
5+
"markdown": "---\ntitle: \"About EpiModel Gallery\"\ntoc: true\n---\n\n## What is EpiModel Gallery?\n\nTemplates for extending the [EpiModel](https://github.com/statnet/EpiModel) platform to model infectious disease dynamics over networks. Each example demonstrates how to build custom modules for stochastic network models using exponential random graph models (ERGMs).\n\nEpiModel provides built-in SIS/SIR models out of the box, but its module API supports arbitrarily complex epidemic systems. These examples teach by example --- from adding a single compartment to multi-stage disease models with interventions and cost-effectiveness analysis.\n\n## Getting Started\n\n### Prerequisites\n\n- **R** >= 4.5\n- **EpiModel** >= 2.6.0\n\nInstall EpiModel from CRAN:\n\n```r\ninstall.packages(\"EpiModel\")\n```\n\n### Running an Example\n\nClone the [repository](https://github.com/EpiModel/EpiModel-Gallery), then run any example from the project root:\n\n```r\nsource(\"examples/si-vital-dynamics/model.R\")\n```\n\nOr from the command line:\n\n```bash\nRscript examples/si-vital-dynamics/model.R\n```\n\n### Running All Examples\n\n```bash\nbash test.sh\n```\n\n## Contributing\n\nContributions of new gallery examples are welcome! To contribute:\n\n1. Fork the [repository](https://github.com/EpiModel/EpiModel-Gallery) on GitHub.\n2. Create a new subdirectory under `examples/` containing:\n - `model.R` --- main script for network estimation and simulation\n - `module-fx.R` --- custom module functions\n - `index.qmd` --- annotated Quarto document\n3. Include the standard unit test lines near the top of `model.R` (see existing examples).\n4. Verify your example passes: `bash test.sh`\n5. Submit a Pull Request.\n\n### Requesting New Examples\n\nIf you'd like to ask \"how would you build a network model in EpiModel that does X?\", file a [GitHub Issue](https://github.com/EpiModel/EpiModel-Gallery/issues) with a detailed description.\n\n## Build Environment\n\nThe examples on this site are built and tested against the environment below, pinned with [renv](https://rstudio.github.io/renv/) for reproducibility. The complete pinned set for all packages is recorded in [`renv.lock`](https://github.com/EpiModel/EpiModel-Gallery/blob/main/renv.lock).\n\n\n::: {.cell}\n::: {.cell-output-display}\n\n\nTable: R environment\n\n|Field |Value |\n|:----------------|:----------------------------|\n|R version |R version 4.6.1 (2026-06-24) |\n|Platform |aarch64-apple-darwin23 |\n|Operating system |macOS Tahoe 26.5.1 |\n\n\n:::\n:::\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n\n\nTable: Core package versions\n\n|Package |Version |\n|:------------------|:----------|\n|dampack |1.0.2.1000 |\n|deSolve |1.42 |\n|dplyr |1.2.1 |\n|EpiModel |2.6.1 |\n|ergm |4.12.0 |\n|ergm.multi |0.3.0 |\n|network |1.20.0 |\n|networkDynamic |0.12.0 |\n|networkDynamicData |0.3.0 |\n|networkLite |1.1.0 |\n|renv |1.2.3 |\n|statnet.common |4.13.0 |\n|tergm |4.2.2 |\n\n\n:::\n:::\n\n\n## Citation\n\nIf using EpiModel for teaching or research, please include a citation:\n\n> Jenness SM, Goodreau SM and Morris M. EpiModel: An R Package for Mathematical Modeling of Infectious Disease over Networks. *Journal of Statistical Software.* 2018; 84(8): 1-47. doi: 10.18637/jss.v084.i08\n\n## License\n\n[MIT](https://github.com/EpiModel/EpiModel-Gallery/blob/main/LICENSE)\n",
6+
"supporting": [],
7+
"filters": [
8+
"rmarkdown/pagebreak.lua"
9+
],
10+
"includes": {},
11+
"engineDependencies": {},
12+
"preserve": {},
13+
"postProcess": true
14+
}
15+
}

about.qmd

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,48 @@ Contributions of new gallery examples are welcome! To contribute:
5959

6060
If you'd like to ask "how would you build a network model in EpiModel that does X?", file a [GitHub Issue](https://github.com/EpiModel/EpiModel-Gallery/issues) with a detailed description.
6161

62+
## Build Environment
63+
64+
The examples on this site are built and tested against the environment below, pinned with [renv](https://rstudio.github.io/renv/) for reproducibility. The complete pinned set for all packages is recorded in [`renv.lock`](https://github.com/EpiModel/EpiModel-Gallery/blob/main/renv.lock).
65+
66+
```{r}
67+
#| label: build-env
68+
#| echo: false
69+
#| message: false
70+
#| warning: false
71+
si <- sessionInfo()
72+
running <- if (is.null(si$running)) "Unknown" else si$running
73+
knitr::kable(
74+
data.frame(
75+
Field = c("R version", "Platform", "Operating system"),
76+
Value = c(si$R.version$version.string, si$platform, running),
77+
check.names = FALSE
78+
),
79+
caption = "R environment"
80+
)
81+
```
82+
83+
```{r}
84+
#| label: build-pkgs
85+
#| echo: false
86+
#| message: false
87+
#| warning: false
88+
core <- c("EpiModel", "ergm", "ergm.multi", "tergm", "tergmLite",
89+
"network", "networkLite", "networkDynamic", "statnet.common",
90+
"deSolve", "dplyr", "networkDynamicData", "dampack", "renv")
91+
core <- core[vapply(core, function(p) nzchar(system.file(package = p)), logical(1))]
92+
core <- core[order(tolower(core))]
93+
knitr::kable(
94+
data.frame(
95+
Package = core,
96+
Version = vapply(core, function(p) as.character(packageVersion(p)), character(1)),
97+
check.names = FALSE
98+
),
99+
row.names = FALSE,
100+
caption = "Core package versions"
101+
)
102+
```
103+
62104
## Citation
63105

64106
If using EpiModel for teaching or research, please include a citation:

0 commit comments

Comments
 (0)