Skip to content

serocalculator

Estimating Infection Rates from Serological Data

v1.4.1 · Mar 25, 2026 · GPL-3

Description

Translates antibody levels measured in cross-sectional population samples into estimates of the frequency with which seroconversions (infections) occur in the sampled populations. Replaces the previous `seroincidence` package.

Downloads

CRAN

763

Last 30 days

4330th

8K

Last 90 days

16.8K

Last year

Trend: +41.8% (30d vs prior 30d)

r2u CRAN

28

Last 30 days

124

Last 90 days

442

Last year

Trend: -30% (30d vs prior 30d)

autoCRAN

6

Last 7 days

26

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘labelled’

Packages suggested but not available for checking: 'mixtools', 'tidyverse'

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 3, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 30, 2026
ERROR r-devel-linux-x86_64-debian-clang

examples

Running examples in ‘serocalculator-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: strat_ests_scatterplot
> ### Title: Scatterplot method for 'summary.seroincidence.by' objects
>
...[truncated]...
 serverSocket
Execution halted
Examples with CPU (user + system) or elapsed time > 5s
                                   user system elapsed
graph.curve.params                4.198  0.037   5.469
autoplot.summary.seroincidence.by 2.192  0.111   8.390
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 2, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 25, 2026
ERROR r-release-macos-x86_64

package dependencies

Package required but not available: ‘labelled’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 8 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 26, 2026

Code intelligence has not been computed for this package yet.

Code

Structure

Lines of code

31,693

Files

309

Compiled share

1.6%

Has compiled src

Yes

Language breakdown

R 6,093 (19.2%)C/C++/src 494 (1.6%)Tests 21,310 (67.2%)Docs 3,796 (12%)

API

Exported functions

42

Internal functions

80

Recent export changes

v1.4.1+1 compare_seroincidence
v1.4.0+21 analyze_sims, as_sr_params, count_strata +18 more

Testing & CI

Has tests

Yes

Test-to-code ratio

4.20

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

78.6%

\dontrun example ratio

31.3%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1.0

System requirements

C++ standard

License

GPL-3

License flags

SPDX valid, OSI approved

History

Versions

4

First release

2024-07-21

Latest release

2026-03-25

Avg cadence

188 days

Cold removal rate

100%

Dep drift

10

LOC over versions

v1.0.3: 6,844 LOCv1.3.0: 9,354 LOCv1.4.0: 29,941 LOCv1.4.1: 31,693 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies cli doParallel dplyr foreach ggplot2 patchwork lifecycle magrittr Rcpp rlang rngtools scales tibble tidyr tidyselect +5 more dependencies serodynamics serocalculator

Version History

4 tracked
new 1.4.1 Mar 25, 2026
update 1.4.0 ← 1.3.0 diff Dec 10, 2025
update 1.3.0 ← 1.0.3 diff Jan 24, 2025
new 1.0.3 Jul 20, 2024