Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the .lintr configuration to match with that in packagetemplate #120

Merged
merged 15 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ linters: linters_with_tags(
todo_comment_linter = NULL,
function_argument_linter = NULL,
cyclocomp_linter = NULL,
# Use minimum R declared in DESCRIPTION or fall back to current R version
# Use minimum R declared in DESCRIPTION or fall back to current R version.
# Install etdev package from https://github.com/epiverse-trace/etdev
backport_linter(if (length(x <- etdev::extract_min_r_version())) x else getRversion())
)
)
exclusions: list(
"tests/testthat.R" = list(unused_import_linter = Inf)
)
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Package: bpmodels
Title: Analysing Transmission Chain Statistics using Branching Process
Title: Simulating and Analysing Transmission Chain Statistics using Branching Process
Models
Version: 0.3.0
Authors@R: c(
person("Sebastian", "Funk", , "sebastian.funk@lshtm.ac.uk", role = c("aut", "cph"),
comment = c(ORCID = "https://orcid.org/0000-0002-2842-3406")),
person("James M.", "Azam", , "james.azam@lshtm.ac.uk", role = c("aut", "cre"),
comment = c(ORCID = "https://orcid.org/0000-0001-5782-7330")),
person("Zhian N.", "Kamvar", , "[email protected]", role = "ctb",
comment = c(ORCID = "https://orcid.org/0000-0003-1458-7108")),
person("Flavio", "Finger", , "[email protected]", role = "aut",
comment = c(ORCID = "https://orcid.org/0000-0002-8613-5170")),
person("James M.", "Azam", , "james.azam@lshtm.ac.uk", role = c("aut", "cre"),
comment = c(ORCID = "https://orcid.org/0000-0001-5782-7330"))
person("Sebastian", "Funk", , "sebastian.funk@lshtm.ac.uk", role = c("aut", "cph"),
comment = c(ORCID = "https://orcid.org/0000-0002-2842-3406"))
)
Description: Provides methods to analyse and simulate the size and length
Description: Provides methods to simulate and analyse the size and length
of branching processes with an arbitrary offspring distribution. These
can be used, for example, to analyse the distribution of chain sizes
or length of infectious disease outbreaks, as discussed in Farrington
Expand Down
9 changes: 5 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ knitr::opts_chunk$set(
)
```

# _bpmodels_: Methods for analysing the size and length of transmission chains from branching process models
# _bpmodels_: Methods for simulating and analysing the size and length of transmission chains from branching process models

<!-- badges: start -->
![GitHub R package version](https://img.shields.io/github/r-package/v/epiverse-trace/bpmodels)
Expand Down Expand Up @@ -67,7 +67,8 @@ Here is a quick example of estimating the loglikelihood of an observed chain:
# example of observed chain sizes
chain_sizes <- c(1, 2, 3, 4)
# estimate loglikelihood of the observed chain sizes
chain_ll_eg <- chain_ll(chain_sizes, "pois", "size", lambda = 0.5)
chain_ll_eg <- chain_ll(x = chain_sizes, offspring = "pois",
stat = "size", lambda = 0.5)
chain_ll_eg
```

Expand All @@ -94,9 +95,9 @@ offspring with mean, $\text{lambda} = 0.5$, and serial interval of $3$:
```{r}
set.seed(1234)

chain_sim_susc_eg <- chain_sim_susc(pop = 1000, "pois",
chain_sim_susc_eg <- chain_sim_susc(pop = 1000, offspring = "pois",
mn_offspring = 0.5,
serial = function(x) 3
serial = function(x) {3}
)

head(chain_sim_susc_eg)
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# *bpmodels*: Methods for analysing the size and length of transmission chains from branching process models
# *bpmodels*: Methods for simulating and analysing the size and length of transmission chains from branching process models

<!-- badges: start -->

Expand Down Expand Up @@ -57,7 +57,8 @@ chain:
# example of observed chain sizes
chain_sizes <- c(1, 2, 3, 4)
# estimate loglikelihood of the observed chain sizes
chain_ll_eg <- chain_ll(chain_sizes, "pois", "size", lambda = 0.5)
chain_ll_eg <- chain_ll(x = chain_sizes, offspring = "pois",
stat = "size", lambda = 0.5)
chain_ll_eg
#> [1] -7.772589
```
Expand Down Expand Up @@ -94,9 +95,9 @@ offspring with mean, $\text{lambda} = 0.5$, and serial interval of $3$:
``` r
set.seed(1234)

chain_sim_susc_eg <- chain_sim_susc(pop = 1000, "pois",
chain_sim_susc_eg <- chain_sim_susc(pop = 1000, offspring = "pois",
mn_offspring = 0.5,
serial = function(x) 3
serial = function(x) {3}
)

head(chain_sim_susc_eg)
Expand Down
6 changes: 3 additions & 3 deletions man/bpmodels-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.