Skip to content

Commit 153b11a

Browse files
committed
Vignette rebuild and source files
1 parent 26ec5c2 commit 153b11a

File tree

10 files changed

+83
-21
lines changed

10 files changed

+83
-21
lines changed

DESCRIPTION

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,22 @@ Imports:
2626
tidyr,
2727
tibble
2828
Suggests:
29-
INLA (>= 22.5.3),
29+
INLA (>= 23.01.31),
3030
ggplot2,
31-
knitr,
3231
rmarkdown,
32+
knitr,
3333
vroom,
3434
parallel,
3535
lubridate,
36-
lme4, sn,
37-
stringr
36+
lme4,
37+
sn,
38+
sp,
39+
stringr,
40+
fmesher (>= 0.5.0),
41+
testthat (>= 3.0.0)
3842
LazyData: true
43+
BuildVignettes: true
44+
VignetteBuilder: knitr
3945
Additional_repositories:
4046
https://inla.r-inla-download.org/R/stable/
41-
VignetteBuilder: knitr
4247
Config/testthat/edition: 3

README.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ library(badger)
1818
`r badger::badge_license(url = "https://github.com/covid19br/nowcaster/blob/main/LICENSE.md")`
1919
`r badger::badge_lifecycle(stage = "experimental")`
2020
[![R-CMD-check](https://github.com/covid19br/nowcaster/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/covid19br/nowcaster/actions/workflows/R-CMD-check.yaml)
21+
[![CRAN status](https://www.r-pkg.org/badges/version/nowcaster)](https://CRAN.R-project.org/package=nowcaster)
2122
<!-- badges: end -->
2223

2324
`nowcaster` is an R package for “nowcasting” epidemiological time-series on individual level data.

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33

44
<!-- badges: start -->
55

6-
[![CRAN
7-
checks](https://badges.cranchecks.info/summary/nowcaster.svg)](https://cran.r-project.org/web/checks/check_results_nowcaster.html)
8-
[![Dependencies](https://tinyverse.netlify.com/badge/nowcaster)](https://cran.r-project.org/package=nowcaster)
6+
<!-- [![CRAN checks](https://badges.cranchecks.info/summary/nowcaster.svg)](https://cran.r-project.org/web/checks/check_results_nowcaster.html) -->
7+
8+
<!-- [![Dependencies](https://tinyverse.netlify.com/badge/nowcaster)](https://cran.r-project.org/package=nowcaster) -->
9+
910
`badger::badge_devel(color = "blue", pkg = "nowcaster")` [![License: GPL
1011
(\>=
1112
3)](https://img.shields.io/badge/license-GPL%20(%3E=%203)-blue.svg)](https://github.com/covid19br/nowcaster/blob/main/LICENSE.md)
1213
[![](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
1314
[![R-CMD-check](https://github.com/covid19br/nowcaster/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/covid19br/nowcaster/actions/workflows/R-CMD-check.yaml)
15+
[![CRAN
16+
status](https://www.r-pkg.org/badges/version/nowcaster)](https://CRAN.R-project.org/package=nowcaster)
1417
<!-- badges: end -->
1518

1619
`nowcaster` is an R package for “nowcasting” epidemiological time-series
@@ -25,6 +28,18 @@ model to the time steps of delay between onset date of the event,
2528
death) and the date of report (*i.e.*, date of notification of the case
2629
or death).
2730

31+
## Installing
32+
33+
After have a proper `INLA` installation to install `nowcaster` package
34+
simply run the code below in R:
35+
36+
``` r
37+
devtools::install_github("https://github.com/covid19br/nowcaster")
38+
```
39+
40+
If you have any problem installing, please refer to next section on the
41+
dependencies of the package.
42+
2843
## Dependencies
2944

3045
`nowcaster` is based on the
@@ -54,19 +69,6 @@ If you want more detail on other possible installations of `INLA`,
5469
please refer to the official
5570
[page](https://www.r-inla.org/download-install) of the package.
5671

57-
58-
## Installing
59-
60-
After have a proper `INLA` installation to install `nowcaster` package
61-
simply run the code below in R:
62-
63-
``` r
64-
devtools::install_github("https://github.com/covid19br/nowcaster")
65-
```
66-
67-
If you have any problem installing, please refer to next section on the
68-
dependencies of the package.
69-
7072
## Similar Initiatives
7173

7274
There are other alternative packages, that can produce nowcasting

inst/CITATION

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
citHeader("To cite nowcaster in publications use:")
2+
3+
bibentry(
4+
bibtype = "Article",
5+
title="A Modelling approach for correcting reporting delays in disease surveillance data",
6+
author="Bastos, Leonardo S and Economou, Theodoros and Gomes, Marcelo FC and Villela, Daniel AM and Coelho, Flavio C and Cruz, Oswaldo G and Stoner, Oliver and Bailey, Trevor and Codeço, Claudia T",
7+
journal="Statistics in medicine",
8+
year="2019",
9+
volume="38",
10+
number="22",
11+
pages="4363--4377",
12+
publisher="Wiley Online Library",
13+
doi ="https://doi.org/10.1002/sim.8303"
14+
)
15+

tests/testthat.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is part of the standard setup for testthat.
2+
# It is recommended that you do not modify it.
3+
#
4+
# Where should you do additional test configuration?
5+
# Learn more about the roles of various files in:
6+
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
7+
# * https://testthat.r-lib.org/articles/special-files.html
8+
9+
library(testthat)
10+
library(nowcaster)
11+
12+
test_check("nowcaster")

tests/testthat/test-setup.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
test_that("setup-INLA", {
2+
if (requireNamespace("INLA", quietly = TRUE)) {
3+
INLA::inla.setOption(fmesher.evolution = 2L)
4+
INLA::inla.setOption(fmesher.evolution.warn = TRUE)
5+
INLA::inla.setOption(fmesher.evolution.verbosity = "warn")
6+
}
7+
})

vignettes/articles/1_structured_data.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if(requireNamespace("INLA", quietly = T)){
2525
if(packageVersion("INLA") >= "22.5.3"){knitr::opts_chunk$set(eval = T)}
2626
else{knitr::opts_chunk$set(eval = F)}
2727
}
28+
if (requireNamespace("INLA", quietly = TRUE)) {
29+
INLA::inla.setOption(fmesher.evolution = 2L)
30+
INLA::inla.setOption(fmesher.evolution.warn = TRUE)
31+
INLA::inla.setOption(fmesher.evolution.verbosity = "warn")
32+
}
2833
```
2934

3035
## TL;DR

vignettes/articles/2_nowcasting_importance.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if(requireNamespace("INLA", quietly = T)){
2525
if(packageVersion("INLA") >= "22.5.3"){knitr::opts_chunk$set(eval = T)}
2626
else{knitr::opts_chunk$set(eval = F)}
2727
}
28+
if (requireNamespace("INLA", quietly = TRUE)) {
29+
INLA::inla.setOption(fmesher.evolution = 2L)
30+
INLA::inla.setOption(fmesher.evolution.warn = TRUE)
31+
INLA::inla.setOption(fmesher.evolution.verbosity = "warn")
32+
}
2833
```
2934

3035
## TL;DR

vignettes/articles/3_forecasting.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if(requireNamespace("INLA", quietly = T)){
2525
if(packageVersion("INLA") >= "22.5.3"){knitr::opts_chunk$set(eval = T)}
2626
else{knitr::opts_chunk$set(eval = F)}
2727
}
28+
if (requireNamespace("INLA", quietly = TRUE)) {
29+
INLA::inla.setOption(fmesher.evolution = 2L)
30+
INLA::inla.setOption(fmesher.evolution.warn = TRUE)
31+
INLA::inla.setOption(fmesher.evolution.verbosity = "warn")
32+
}
2833
```
2934

3035
## TL;DR

vignettes/nowcaster.Rmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if(requireNamespace("INLA", quietly = T)){
2525
if(packageVersion("INLA") >= "22.5.3"){knitr::opts_chunk$set(eval = T)}
2626
else{knitr::opts_chunk$set(eval = F)}
2727
}
28+
if (requireNamespace("INLA", quietly = TRUE)) {
29+
INLA::inla.setOption(fmesher.evolution = 2L)
30+
INLA::inla.setOption(fmesher.evolution.warn = TRUE)
31+
INLA::inla.setOption(fmesher.evolution.verbosity = "warn")
32+
}
2833
```
2934

3035
## First example on LazyData

0 commit comments

Comments
 (0)