library(devtools) # for session_info()
library(piercer) # for git_report(), which_latex().
library(quarto) # for quarto_version()
library(rmarkdown) # for pandoc_version()Documenting Software Used
This post is about how I document the software environment used to generate output files.
Why Documenting the Software Used is Useful
The documentation criterion for reproducibility requires telling other people what software environment you used to conduct analyses. The most reliable way to reproduce your work is to run your code, on your data, with the exact same software that you used. It is not enough to just say that you used R or a specific set of R packages because both the base R system and R packages change over time. Some package authors publish new versions quite frequently.
Changes between versions can fix (or introduce) bugs and add, change, or remove functions, arguments, syntax, interfaces, or dependencies on other software. So someone else may be unable to reproduce your work even though they are using the same set of packages if they have either older or newer versions than you were using.
Therefore, you need to record the specific version numbers of all the software used for a given analysis. Doing so has helped me solve issues when routine R package updates broke scripts that previously worked reliably because I was able to systematically track down which pieces of my software environment had changed then either revert to using an older version of a specific package or update my code to work with the newer version. Naturally, this all works better if you keep date-stamped production outputs.
Automation Helps
I run package updates frequently and often use a large collection of R packages to manage data and run analyses. Loading an R package also means other packages that it depends on also get loaded. Manually writing out the version numbers for all of them would be tedious and error-prone. The solution is to automate capturing that information by adding a few function calls at the end of scripts.
So, I often include a relatively standardized Software Information section and code chunks like those shown below in my scripts.
Load R Packages
Near the beginning of my Quarto files, I’ll include a chunk to load R packages. The ones loaded below offer functions I use to automate documenting my software environment.
Software Information
I used R as the main computing environment and Quarto scripts to enhance reproducibility. I used RStudio as the editor to interface with R and Quarto.
- PDF software chain: qmd file > RStudio > Quarto > R > knitr > md file > Pandoc > tex file > TinyTeX > PDF file.
- HTML software chain: qmd file > RStudio > Quarto > R > knitr > md file > Pandoc > HTML file.
- Quarto 1.10.18 runs
*.qmdfiles through R and knitr to produce*.mdmarkdown files. - Pandoc 3.10 converts markdown files (
*.md) to other formats, including LaTeX (*.tex) and HTML (*.html) among others. - TinyTeX compiles LaTeX files (
*.tex) into PDF files.
Versions
This document was generated using the following computational environment and dependencies:
# Quarto (used inline above in the bullet list)
quarto_version()[1] '1.10.18'
# Pandoc (used inline above in the bullet list)
pandoc_version()[1] '3.10'
# TinyTex or other LaTeX software.
which_latex()is_tinytex = TRUE. We used TeX Live 2026 (TinyTeX) with tlmgr 2026-07-10.
tlmgr revision 79639 (2026-07-10 18:45:34 +0200)
tlmgr using installation: C:/Users/pierces1/AppData/Roaming/TinyTeX
TeX Live (https://tug.org/texlive) version 2026
# Get R and R package version numbers in use.
devtools::session_info()─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.6.1 (2026-06-24 ucrt)
os Windows 11 x64 (build 26200)
system x86_64, mingw32
ui RTerm
language (EN)
collate English_United States.utf8
ctype English_United States.utf8
tz America/New_York
date 2026-09-30
pandoc 3.10 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
quarto 1.10.18 @ C:\\PROGRA~1\\Quarto\\bin\\quarto.exe
─ Packages ───────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.6.1)
backports 1.5.1 2026-04-03 [1] CRAN (R 4.6.1)
broom 1.0.13 2026-05-14 [1] CRAN (R 4.6.1)
cachem 1.1.0 2024-05-16 [1] CRAN (R 4.6.1)
cli 3.6.6 2026-04-09 [1] CRAN (R 4.6.1)
devtools * 2.5.2 2026-04-30 [1] CRAN (R 4.6.1)
digest 0.6.39 2025-11-19 [1] CRAN (R 4.6.1)
dplyr 1.2.1 2026-04-03 [1] CRAN (R 4.6.1)
ellipsis 0.3.3 2026-04-04 [1] CRAN (R 4.6.1)
evaluate 1.0.5 2025-08-27 [1] CRAN (R 4.6.1)
farver 2.1.2 2024-05-13 [1] CRAN (R 4.6.1)
fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.6.1)
forcats 1.0.1 2025-09-25 [1] CRAN (R 4.6.1)
fs 2.1.0 2026-04-18 [1] CRAN (R 4.6.1)
generics 0.1.4 2025-05-09 [1] CRAN (R 4.6.1)
ggplot2 4.0.3 2026-04-22 [1] CRAN (R 4.6.1)
git2r 0.36.2 2025-03-29 [1] CRAN (R 4.6.1)
glue 1.8.1 2026-04-17 [1] CRAN (R 4.6.1)
gtable 0.3.6 2024-10-25 [1] CRAN (R 4.6.1)
haven 2.5.5 2025-05-30 [1] CRAN (R 4.6.1)
here 1.0.2 2025-09-15 [1] CRAN (R 4.6.1)
hms 1.1.4 2025-10-17 [1] CRAN (R 4.6.1)
htmltools 0.5.9 2025-12-04 [1] CRAN (R 4.6.1)
htmlwidgets 1.6.4 2023-12-06 [1] CRAN (R 4.6.1)
httr 1.4.9 2026-09-01 [1] CRAN (R 4.6.1)
jsonlite 2.0.0 2025-03-27 [1] CRAN (R 4.6.1)
knitr 1.52 2026-09-06 [1] CRAN (R 4.6.1)
later 1.4.8 2026-03-05 [1] CRAN (R 4.6.1)
lifecycle 1.0.5 2026-01-08 [1] CRAN (R 4.6.1)
magrittr 2.0.5 2026-04-04 [1] CRAN (R 4.6.1)
MBESS 5.0.1 2026-06-04 [1] CRAN (R 4.6.1)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.6.1)
mvtnorm 1.4-2 2026-07-12 [1] CRAN (R 4.6.1)
otel 0.2.0 2025-08-29 [1] CRAN (R 4.6.1)
pbivnorm 0.6.0 2015-01-23 [1] CRAN (R 4.6.1)
piercer * 0.24.0 2026-08-15 [1] git (https://github.com/sjpierce/piercer.git@2654a2e)
pillar 1.11.1 2025-09-17 [1] CRAN (R 4.6.1)
pkgbuild 1.4.8 2025-05-26 [1] CRAN (R 4.6.1)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.6.1)
pkgload 1.5.3 2026-06-15 [1] CRAN (R 4.6.1)
pROC 1.19.1 2026-08-27 [1] CRAN (R 4.6.1)
processx 3.9.0 2026-04-22 [1] CRAN (R 4.6.1)
PropCIs 0.3-0 2018-02-23 [1] CRAN (R 4.6.1)
purrr 1.2.2 2026-04-10 [1] CRAN (R 4.6.1)
quarto * 1.5.1 2025-09-04 [1] CRAN (R 4.6.1)
R6 2.6.1 2025-02-15 [1] CRAN (R 4.6.1)
RColorBrewer 1.1-3 2022-04-03 [1] CRAN (R 4.6.1)
Rcpp 1.1.2 2026-07-05 [1] CRAN (R 4.6.1)
rlang 1.3.0 2026-07-05 [1] CRAN (R 4.6.1)
rmarkdown * 2.32 2026-09-01 [1] CRAN (R 4.6.1)
rprojroot 2.1.1 2025-08-26 [1] CRAN (R 4.6.1)
rstudioapi 0.19.0 2026-06-11 [1] CRAN (R 4.6.1)
S7 0.2.2 2026-04-22 [1] CRAN (R 4.6.1)
scales 1.4.0 2025-04-24 [1] CRAN (R 4.6.1)
sessioninfo 1.2.4 2026-06-04 [1] CRAN (R 4.6.1)
texreg 1.40 2026-08-25 [1] CRAN (R 4.6.1)
tibble 3.3.1 2026-01-11 [1] CRAN (R 4.6.1)
tidyr 1.3.2 2025-12-19 [1] CRAN (R 4.6.1)
tidyselect 1.2.1 2024-03-11 [1] CRAN (R 4.6.1)
tinytex 0.61 2026-09-17 [1] CRAN (R 4.6.1)
usethis * 3.2.2 2026-09-10 [1] CRAN (R 4.6.1)
vctrs 0.7.3 2026-04-11 [1] CRAN (R 4.6.1)
xfun 0.61 2026-09-16 [1] CRAN (R 4.6.1)
yaml 2.3.12 2025-12-10 [1] CRAN (R 4.6.1)
[1] C:/Users/pierces1/AppData/Local/R/win-library/4.6
[2] C:/Program Files/R/R-4.6.1/library
* ── Packages attached to the search path.
──────────────────────────────────────────────────────────────────────────────
Git Details
The current Git commit details and status are:
git_report()Local: main C:/Users/pierces1/OneDrive - Michigan State University/CSTATRedirects/Documents/R/sjpierce.github.io
Remote: main @ origin (https://github.com/sjpierce/sjpierce.github.io.git)
Head: [14af5a4] 2026-10-01: Render for publishing.
Untracked files:
Untracked: posts/output/software_used.rmarkdown
This is useful because it tells us exactly which commit in the Git history we would need to be using to make sure we are running the exact same code. Sometimes another person is not using the most current code, or has changed the code in some way since it was last committed.
- Untracked files are files located in the repository that Git has not been told to entirely ignore, but have also not been committed into the version history.
- Unstaged changes to files indicate that some of the contents have been modified since the last time the file was committed to Git. In production runs, we want the Git output to not show any unstaged changes to key files!