Skip to content

Commit 644566d

Browse files
committedNov 25, 2024··
update coverage; fix bug
1 parent f8f5dba commit 644566d

8 files changed

+18
-12
lines changed
 

‎DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: phylopomp
22
Type: Package
33
Title: Phylodynamic Inference for POMP Models
4-
Version: 0.14.8.0
5-
Date: 2024-11-15
4+
Version: 0.14.8.1
5+
Date: 2024-11-25
66
Authors@R: c(person(given=c("Aaron","A."),family="King",role=c("aut","cre"),email="kingaa@umich.edu",comment=c(ORCID="0000-0001-6159-3207")),
77
person(given=c("Qianying"),family="Lin",role=c("aut"),comment=c(ORCID="0000-0001-8620-9910"))
88
)

‎R/getinfo.R

-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ getInfo <- function (
5757
)
5858
if (!is.null(x$lineages))
5959
x$lineages |> reshape_lineages() -> x$lineages
60-
if (!is.null(x$gendat))
61-
x$gendat |> as_tibble() -> x$gendat
6260
x
6361
}
6462

‎tests/gendat.R

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ x |>
1515

1616
g
1717

18+
stopifnot(identical(g,getInfo(x,gendat=TRUE)$gendat))
19+
1820
g |>
1921
with({
2022
stopifnot(

‎tests/gendat.Rout.save

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ $nsample
7575
$nnode
7676
[1] 28
7777

78+
>
79+
> stopifnot(identical(g,getInfo(x,gendat=TRUE)$gendat))
7880
>
7981
> g |>
8082
+ with({

‎tests/seir2.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ png(filename="seir2-%02d.png",res=100)
22

33
suppressPackageStartupMessages({
44
library(tidyverse)
5-
library(phylopomp)
65
library(pomp)
6+
library(phylopomp)
77
})
88
theme_set(theme_bw())
99
set.seed(842110120)
1010
options(digits=3)
1111

12-
runSEIR(
12+
simulate("SEIRS",
1313
Beta=4,sigma=1,gamma=1,psi=1,omega=1,
1414
S0=100,E0=3,I0=5,R0=100,
1515
time=5

‎tests/seir2.Rout.save

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Type 'q()' to quit R.
2121
>
2222
> suppressPackageStartupMessages({
2323
+ library(tidyverse)
24-
+ library(phylopomp)
2524
+ library(pomp)
25+
+ library(phylopomp)
2626
+ })
2727
> theme_set(theme_bw())
2828
> set.seed(842110120)
2929
> options(digits=3)
3030
>
31-
> runSEIR(
31+
> simulate("SEIRS",
3232
+ Beta=4,sigma=1,gamma=1,psi=1,omega=1,
3333
+ S0=100,E0=3,I0=5,R0=100,
3434
+ time=5

‎tests/simulate.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
library(phylopomp)
2-
simulate()
2+
try(simulate("billyjoe"))
33
try(simulate(22))
4+
simulate()

‎tests/simulate.Rout.save

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ The following object is masked from 'package:stats':
2525

2626
simulate
2727

28+
> try(simulate("billyjoe"))
29+
Error : unrecognized model: 'billyjoe'.
30+
Do 'simulate()' to view available models.
31+
> try(simulate(22))
32+
Error : in 'simulate.default': 'object' must be specified as either the name of a model or the result of a previous simulation.
33+
Do 'simulate()' to view available models.
2834
> simulate()
2935
Available phylopomp models:
3036
- LBDP: Linear birth-death-sampling model
@@ -39,7 +45,4 @@ Available phylopomp models:
3945
- SEIRS: synonymous with SEIR
4046

4147

42-
> try(simulate(22))
43-
Error : in 'simulate.default': 'object' must be specified as either the name of a model or the result of a previous simulation.
44-
Do 'simulate()' to view available models.
4548
>

0 commit comments

Comments
 (0)
Please sign in to comment.