Skip to content

Commit 32a022f

Browse files
authored
Preparing CRAN submission (#67)
* Preparing CRAN submission * Making pre-commit happy
1 parent 43399ea commit 32a022f

11 files changed

+89
-50
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Package: epiworldR
22
Type: Package
33
Title: Fast Agent-Based Epi Models
4-
Version: 0.6-0.0
4+
Version: 0.6.0.0
55
Authors@R: c(
6-
person(given="George", family="Vega Yon", role=c("aut","cre"),
6+
person(given="George", family="Vega Yon", role=c("aut"),
77
email="[email protected]", comment = c(ORCID = "0000-0002-3171-0844")),
88
person(given="Derek", family="Meyer", role=c("aut"),
99
email="[email protected]", comment = c(ORCID = "0009-0005-1350-6988")),
10-
person(given="Andrew", family="Pulsipher", role=c("aut"),
10+
person(given="Andrew", family="Pulsipher", role=c("aut", "cre"),
1111
email="[email protected]", comment = c(ORCID = "0000-0002-0773-3210")),
1212
person(given="Susan", family="Holmes", role = "rev", comment =
1313
c(what = "JOSS reviewer", ORCID="0000-0002-2208-8168")),

NEWS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# epiworldR 0.4-3 (development version)
1+
# epiworldR 0.6.0.0
22

33
## New features
44

@@ -15,6 +15,12 @@
1515
* The function `today()` returns the current day (step) of the
1616
simulation.
1717

18+
## Misc
19+
20+
* We changed the versioning system. To allow the R package to increase
21+
version number while preserving epiworld (C++) versioning, we added a fourth
22+
number that indicates R-only patches (similar to RcppArmadillo).
23+
1824

1925
# epiworldR 0.3-2
2026

README.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ sir
123123
#> Susceptible-Infected-Recovered (SIR)
124124
#> It features 100000 agents, 1 virus(es), and 0 tool(s).
125125
#> The model has 3 states.
126-
#> The final distribution is: 822 Susceptible, 415 Infected, and 98763 Recovered.
126+
#> The final distribution is: 1209 Susceptible, 499 Infected, and 98292 Recovered.
127127
```
128128

129129
Visualizing the outputs
@@ -140,8 +140,8 @@ summary(sir)
140140
#> Number of entities : 0
141141
#> Days (duration) : 50 (of 50)
142142
#> Number of viruses : 1
143-
#> Last run elapsed t : 62.00ms
144-
#> Last run speed : 79.47 million agents x day / second
143+
#> Last run elapsed t : 66.00ms
144+
#> Last run speed : 74.96 million agents x day / second
145145
#> Rewiring : off
146146
#>
147147
#> Global events:
@@ -158,12 +158,12 @@ summary(sir)
158158
#> - Transmission rate : 0.7000
159159
#>
160160
#> Distribution of the population at time 50:
161-
#> - (0) Susceptible : 99000 -> 822
162-
#> - (1) Infected : 1000 -> 415
163-
#> - (2) Recovered : 0 -> 98763
161+
#> - (0) Susceptible : 99000 -> 1209
162+
#> - (1) Infected : 1000 -> 499
163+
#> - (2) Recovered : 0 -> 98292
164164
#>
165165
#> Transition Probabilities:
166-
#> - Susceptible 0.91 0.09 0.00
166+
#> - Susceptible 0.92 0.08 0.00
167167
#> - Infected 0.00 0.70 0.30
168168
#> - Recovered 0.00 0.00 1.00
169169
```
@@ -229,7 +229,7 @@ summary(model_seirconn)
229229
#> Days (duration) : 100 (of 100)
230230
#> Number of viruses : 2
231231
#> Last run elapsed t : 15.00ms
232-
#> Last run speed : 64.01 million agents x day / second
232+
#> Last run speed : 65.69 million agents x day / second
233233
#> Rewiring : off
234234
#>
235235
#> Global events:
@@ -368,24 +368,24 @@ rn <- get_reproductive_number(model_logit)
368368
(1:n %in% rn$source)
369369
) |> prop.table())[, 2]
370370
#> 0 1
371-
#> 0.12984 0.14201
371+
#> 0.13466 0.14878
372372
```
373373

374374
``` r
375375

376376
# Looking into the agents
377377
get_agents(model_logit)
378378
#> Agents from the model "Susceptible-Infected-Removed (SIR) (logit)":
379-
#> Agent: 0, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
380-
#> Agent: 1, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
381-
#> Agent: 2, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
382-
#> Agent: 3, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
383-
#> Agent: 4, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
384-
#> Agent: 5, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
385-
#> Agent: 6, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
386-
#> Agent: 7, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
379+
#> Agent: 0, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
380+
#> Agent: 1, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
381+
#> Agent: 2, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
382+
#> Agent: 3, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
383+
#> Agent: 4, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
384+
#> Agent: 5, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
385+
#> Agent: 6, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
386+
#> Agent: 7, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
387387
#> Agent: 8, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
388-
#> Agent: 9, state: Recovered (2), Has virus: no, NTools: 0i NNeigh: 8
388+
#> Agent: 9, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
389389
#> ... 99990 more agents ...
390390
```
391391

@@ -477,20 +477,20 @@ head(ans$total_hist)
477477
#> 1 1 0 1 Susceptible 990
478478
#> 2 1 0 1 Infected 10
479479
#> 3 1 0 1 Recovered 0
480-
#> 4 1 1 1 Susceptible 971
481-
#> 5 1 1 1 Infected 29
480+
#> 4 1 1 1 Susceptible 974
481+
#> 5 1 1 1 Infected 26
482482
#> 6 1 1 1 Recovered 0
483483
```
484484

485485
``` r
486486
head(ans$reproductive)
487487
#> sim_num virus_id virus source source_exposure_date rt
488-
#> 1 1 0 COVID-19 943 9 0
489-
#> 2 1 0 COVID-19 40 9 0
490-
#> 3 1 0 COVID-19 6 9 0
491-
#> 4 1 0 COVID-19 973 8 0
492-
#> 5 1 0 COVID-19 495 9 0
493-
#> 6 1 0 COVID-19 480 8 0
488+
#> 1 1 0 COVID-19 77 10 0
489+
#> 2 1 0 COVID-19 970 8 0
490+
#> 3 1 0 COVID-19 895 8 0
491+
#> 4 1 0 COVID-19 866 8 0
492+
#> 5 1 0 COVID-19 811 8 0
493+
#> 6 1 0 COVID-19 752 8 0
494494
```
495495

496496
``` r
@@ -522,8 +522,9 @@ citation("epiworldR")
522522
#>
523523
#> And the actual R package:
524524
#>
525-
#> Meyer D, Vega Yon G (????). _epiworldR: Fast Agent-Based Epi Models_.
526-
#> R package version 0.3-2, <https://github.com/UofUEpiBio/epiworldR>.
525+
#> Meyer D, Pulsipher A, Vega Yon G (2024). _epiworldR: Fast Agent-Based
526+
#> Epi Models_. R package version 0.6.0.0,
527+
#> <https://github.com/UofUEpiBio/epiworldR>.
527528
#>
528529
#> To see these entries in BibTeX format, use 'print(<citation>,
529530
#> bibtex=TRUE)', 'toBibtex(.)', or set

epiworldR.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: b00320e3-afb5-47c8-8486-cc8d2715c18b
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

inst/CITATION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
year <- sub("-.*", "", meta$Date)
1+
year <- 2024
22
note <- sprintf("R package version %s", meta$Version)
33

44
bibentry(
@@ -28,6 +28,7 @@ bibentry(bibtype = "Manual",
2828
title = "{{epiworldR: Fast Agent-Based Epi Models}}",
2929
author = c(
3030
person("Derek", "Meyer", comment = c(ORCID = "0009-0005-1350-6988")),
31+
person(given="Andrew", family="Pulsipher", comment = c(ORCID = "0000-0002-0773-3210")),
3132
person("George", "Vega Yon", comment = c(ORCID = "0000-0002-3171-0844"))
3233
),
3334
year = year,
-110 Bytes
Loading
775 Bytes
Loading
-330 Bytes
Loading
-363 Bytes
Loading
4.21 KB
Loading

0 commit comments

Comments
 (0)