Skip to content

Commit f233ab4

Browse files
authored
Merge pull request #527 from UCD-SERG/feat/intro-lecture-slides
Introductory lecture slides in methodology vignette
2 parents 28b6cec + a02ac37 commit f233ab4

23 files changed

Lines changed: 894 additions & 115 deletions

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ allpopsamples_hlye.csv$
3939
^\.lintr\.R$
4040
^CLAUDE\.md$
4141
^\.claude$
42+
^_extensions$
4243
^macros$
4344
^\.gitmodules$

.github/workflows/docs.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ on:
2929
- reopened
3030
- ready_for_review
3131
- closed
32-
branches:
33-
- main
3432
paths:
3533
- "inst/templates/**"
3634
- "pkgdown/**"
@@ -146,9 +144,9 @@ jobs:
146144
run: |
147145
# Set devel = FALSE for version tags, TRUE for everything else
148146
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
149-
Rscript -e 'pkgdown::build_site(devel = FALSE)'
147+
Rscript -e 'pkgdown::build_site(devel = FALSE, quiet = FALSE)'
150148
else
151-
Rscript -e 'pkgdown::build_site(devel = TRUE)'
149+
Rscript -e 'pkgdown::build_site(devel = TRUE, quiet = FALSE)'
152150
fi
153151
shell: bash
154152
working-directory: ${{ github.event.repository.name }}

DESCRIPTION

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: serocalculator
33
Title: Estimating Infection Rates from Serological Data
4-
Version: 1.4.0.9016
4+
Version: 1.4.1.9000
55
Authors@R: c(
66
person("Kristina", "Lai", , "kwlai@ucdavis.edu", role = c("aut", "cre")),
77
person("Chris", "Orwa", role = "aut"),
@@ -51,6 +51,7 @@ Suggests:
5151
fs,
5252
ggbeeswarm,
5353
knitr,
54+
maps,
5455
mixtools,
5556
pak,
5657
quarto,
@@ -65,19 +66,21 @@ Suggests:
6566
forcats,
6667
snapr (>= 0.0.0.9000),
6768
rex,
68-
readr
69+
readr,
70+
serodynamics
6971
LinkingTo:
7072
Rcpp
7173
Config/testthat/edition: 3
7274
Config/Needs/roxygen2: roxygen2, moodymudskipper/devtag
7375
Config/Needs/lint: r-lib/lintr
74-
Config/Needs/website: quarto, lewinfox/foodwebr
76+
Config/Needs/website: quarto, lewinfox/foodwebr, serodynamics, maps
7577
Config/Needs/check: readr
7678
Encoding: UTF-8
7779
Language: en-US
7880
LazyData: true
7981
NeedsCompilation: no
8082
Roxygen: list(markdown = TRUE, roclets = c("collate", "rd", "namespace"))
81-
Remotes:
82-
d-morrison/snapr
83+
Remotes:
84+
d-morrison/snapr,
85+
UCD-SERG/serodynamics
8386
Config/roxygen2/version: 8.0.0

NEWS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# serocalculator (development version)
22

3+
## Documentation
4+
5+
* Added introductory lecture slides to the `methodology` vignette
6+
("Estimating Incidence Rates from Cross-Sectional Serosurveys").
7+
38
## Internal
49

510
* The `methodology` vignette's LaTeX macros now come from the shared
@@ -23,7 +28,9 @@
2328
shifted the random-number stream out of sync and made simulated values, and
2429
their snapshots, differ between macOS, Windows, and Linux). Simulated
2530
values change slightly as a result of this fix. (#447)
26-
* Removed lingering terminology discrepancies
31+
* Corrected default axis labels in `strat_ests_barplot()` (`xlab`) and
32+
`strat_ests_scatterplot()` (`ylab`) to say "seroincidence" rather than
33+
"seroconversion"/"incidence".
2734
* `load_noise_params()` and `load_sr_params()` now fail gracefully with informative messages when internet resources are unavailable, complying with CRAN policy (#505)
2835
* Added Version Crosswalk article to pkgdown website to help users migrate code from v1.3.0 to v1.4.0
2936
- Provides clear tables comparing old and new function names

R/simresp.tinf.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ simresp.tinf <- function(# nolint: object_name_linter
141141

142142
t_next <- -log(runif(1, 0, 1)) / lambda
143143
# Quantize to whole days for cross-platform reproducibility (see the
144-
# comment on the first-infection draw above). `t_end` and `t0` are whole
145-
# days, so the boundary clamp below stays integer-valued too.
144+
# comment on the first-infection draw above). `t0` is always a whole number
145+
# of days (accumulated quantized steps); `t_end` may be fractional
146+
# (e.g. 10 * 365.25 = 3652.5), so the boundary clamp t_end - t0 can also
147+
# be fractional, but that doesn't affect the integer-length time grid.
146148
t_next <- quantize_t_next(t_next)
147149
if (t0 <= t_end && t0 + t_next > t_end) {
148150
t_next <- t_end - t0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: slidebreak
2+
author: d-morrison
3+
version: 1.0.0
4+
quarto-required: ">=1.2.0"
5+
contributes:
6+
shortcodes:
7+
- slidebreak.lua
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- slidebreak.lua
2+
-- A Quarto shortcode that inserts a slide break in all slide deck formats
3+
-- (revealjs, pptx, beamer) but does nothing in docx and html formats
4+
5+
function slidebreak()
6+
-- Get the current output format
7+
-- See: https://quarto.org/docs/extensions/lua-api.html#format-detection
8+
local format = quarto.doc.is_format
9+
10+
-- Insert slide break for all slide/presentation formats (revealjs, pptx, beamer)
11+
if format("revealjs") or format("pptx") or format("beamer") then
12+
-- Use HorizontalRule which creates a slide separator in presentation formats
13+
return pandoc.HorizontalRule()
14+
end
15+
16+
-- Return empty for html and docx formats (and any other non-presentation format)
17+
return pandoc.Null()
18+
end
19+
20+
-- Return the shortcode handler
21+
return {
22+
['slidebreak'] = slidebreak
23+
}

inst/WORDLIST

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,41 @@ HlyE
1313
IgA
1414
IgG
1515
IgM
16+
LMICs
17+
LPS
1618
LV
1719
Lik
1820
Lotka
1921
NIAID
2022
NLL
2123
Nadu
24+
Neuzil
2225
OSF
2326
Orientia
2427
PRs
28+
Paratyphi
29+
Photomicrograph
2530
RStudio
2631
Rai
2732
Readme
2833
Rmd
2934
Rtools
3035
SERG
3136
SeroEpidemiology
37+
Seroepidemiology
3238
Seroincidence
3339
Serological
40+
Shigella
41+
TCVs
3442
TW
43+
Trombicula
44+
Typhi
3545
UC
3646
UCD
3747
Unif
3848
Vellore
3949
Volterra
50+
Wikimedia
4051
al
4152
ast
4253
behaviour
@@ -51,21 +62,27 @@ colour
5162
csv
5263
dev
5364
devtools
54-
dplyr
5565
displaystyle
66+
dplyr
5667
dropdown
5768
dt
69+
enterica
5870
eps
71+
eschar
5972
estimands
6073
et
6174
expf
75+
flagellar
6276
forall
6377
frac
78+
ge
6479
geoms
6580
ggproto
6681
gh
6782
hemolysin
83+
immunocompromised
6884
infty
85+
inoculum
6986
insightsengineering
7087
invf
7188
isos
@@ -77,7 +94,9 @@ leq
7794
linter
7895
llik
7996
logf
97+
macular
8098
magrittr
99+
malaise
81100
mathbb
82101
mathbf
83102
mathcal
@@ -87,15 +106,18 @@ mitre
87106
modelled
88107
multicohort
89108
multiversion
109+
myalgia
90110
nabla
91111
nd
92112
nr
93113
olds
114+
operatorname
94115
overcount
95116
overcounts
96117
overline
97118
param
98119
params
120+
pathognomonic
99121
pipetting
100122
pkgdown
101123
pmf
@@ -108,7 +130,10 @@ recombinant
108130
remotes
109131
renamings
110132
renewcommand
133+
reproducibly
134+
rightarrow
111135
rlang
136+
roadmap
112137
se
113138
sectionally
114139
sera
@@ -119,22 +144,28 @@ seroepidemiology
119144
seroincidence
120145
seroincidences
121146
serologic
122-
Serological
123147
seronegative
124148
seroresponse
125149
seroresponses
126150
serosurvey
127151
serosurveys
152+
serotype
153+
shigella
154+
slidebreak
128155
smp
156+
stylostome
129157
subfigures
130158
submodule
159+
tenesmus
131160
th
132161
tibble
133162
titers
163+
toxoid
134164
tsutsugamushi
135165
undercount
136166
unstratified
137167
varepsilon
138168
vec
139169
vee
170+
widehat
140171
yaml

man/figures/Fievre_typhoide.png

29.2 KB
Loading
104 KB
Loading

0 commit comments

Comments
 (0)