Skip to content

Commit ebebe29

Browse files
committed
Merge remote-tracking branch 'origin/main' into dev
2 parents eb496c8 + a509f03 commit ebebe29

18 files changed

+87
-88
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
@@ -15,12 +15,12 @@ jobs:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1616
R_KEEP_PKG_SOURCE: yes
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919

2020
- uses: r-lib/actions/setup-r@v2
2121
with:
2222
use-public-rspm: true
23-
23+
2424
- uses: r-lib/actions/setup-r-dependencies@v2
2525
with:
2626
extra-packages: any::rcmdcheck

.github/workflows/pkgdown.yaml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
55
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
68
release:
79
types: [published]
810
workflow_dispatch:
@@ -12,24 +14,33 @@ name: pkgdown
1214
jobs:
1315
pkgdown:
1416
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1520
env:
1621
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1722
steps:
18-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
1924

20-
- uses: r-lib/actions/setup-pandoc@v1
25+
- uses: r-lib/actions/setup-pandoc@v2
2126

22-
- uses: r-lib/actions/setup-r@v1
27+
- uses: r-lib/actions/setup-r@v2
2328
with:
2429
use-public-rspm: true
2530

26-
- uses: r-lib/actions/setup-r-dependencies@v1
31+
- uses: r-lib/actions/setup-r-dependencies@v2
2732
with:
28-
extra-packages: pkgdown
33+
extra-packages: any::pkgdown, local::.
2934
needs: website
3035

31-
- name: Deploy package
32-
run: |
33-
git config --local user.name "$GITHUB_ACTOR"
34-
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
35-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
36+
- name: Build site
37+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
38+
shell: Rscript {0}
39+
40+
- name: Deploy to GitHub pages 🚀
41+
if: github.event_name != 'pull_request'
42+
uses: JamesIves/github-pages-deploy-action@v4.4.1
43+
with:
44+
clean: false
45+
branch: gh-pages
46+
folder: docs

NEWS.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ development versions. A ".9999" suffix indicates a development version.
8181
* Added a `NEWS.md` file to track changes to the package.
8282
* Implemented `?dplyr::dplyr_extending` for `epi_df`s
8383
([#223](https://github.com/cmu-delphi/epiprocess/issues/223)).
84+
* Fixed various small documentation issues ([#217](https://github.com/cmu-delphi/epiprocess/issues/217)).
8485

8586
# epiprocess 0.5.0:
8687

@@ -93,13 +94,13 @@ development versions. A ".9999" suffix indicates a development version.
9394

9495
## Improvements:
9596

96-
* Fixed `epix_merge`, `<epi_archive>$merge` always raising error on `sync="truncate"`
97+
* Fixed `epix_merge`, `<epi_archive>$merge` always raising error on `sync="truncate"`.
9798

9899
## Cleanup:
99100

100-
* Added `Remotes:` entry for `genlasso`, which was removed from CRAN
101-
* Added `as_epi_archive` tests
102-
* Added missing `epix_merge` test for `sync="truncate"`
101+
* Added `Remotes:` entry for `genlasso`, which was removed from CRAN.
102+
* Added `as_epi_archive` tests.
103+
* Added missing `epix_merge` test for `sync="truncate"`.
103104

104105
# epiprocess 0.4.0:
105106

@@ -142,7 +143,7 @@ development versions. A ".9999" suffix indicates a development version.
142143
* `epix_<method>` will not mutate input `epi_archive`s, but may alias them
143144
or alias their fields (which should not be a worry if a user sticks to
144145
these `epix_*` functions and "regular" R functions with
145-
copy-on-write-like behavior, avoiding mutating functions `[.data.table`)
146+
copy-on-write-like behavior, avoiding mutating functions `[.data.table`).
146147
* `x$<method>` may mutate `x`; if it mutates `x`, it will return `x`
147148
invisibly (where this makes sense), and, for each of its fields, may
148149
either mutate the object to which it refers or reseat the reference (but
@@ -183,7 +184,7 @@ development versions. A ".9999" suffix indicates a development version.
183184
* New function `epix_fill_through_version`, method
184185
`<epi_archive>$fill_through_version`: non-mutating & mutating way to
185186
ensure that an archive contains versions at least through some
186-
`fill_versions_end`, extrapolating according to `how` if necessary
187+
`fill_versions_end`, extrapolating according to `how` if necessary.
187188
* Example archive data object is now constructed on demand from its
188189
underlying data, so it will be based on the user's version of
189190
`epi_archive` rather than an outdated R6 implementation from whenever the
@@ -289,7 +290,7 @@ Classes:
289290
* `epi_cor` calculates Pearson, Kendall, or Spearman correlations
290291
between two (optionally time-shifted) variables in an `epi_df` within
291292
user-specified groups.
292-
* Convenience function: `is_epi_df`
293+
* Convenience function: `is_epi_df`.
293294
* `epi_archive`: R6 class for version (patch) data for geotemporal
294295
epidemiological time series data sets. Comes with S3 methods and regular
295296
functions that wrap around this functionality for those unfamiliar with R6
@@ -298,23 +299,23 @@ Classes:
298299
containing snapshots and/or patch data for every available version of
299300
the data set.
300301
* `as_of`: extracts a snapshot of the data set as of some requested
301-
version, in `epi_df` format
302+
version, in `epi_df` format.
302303
* `epix_slide`, `<epi_archive>$slide`: similar to `epi_slide`, but for
303304
`epi_archive`s; for each requested `ref_time_value` and group, applies
304305
a time window and user-specified computation to a snapshot of the data
305306
as of `ref_time_value`.
306307
* `epix_merge`, `<epi_archive>$merge`: like `merge` for `epi_archive`s,
307308
but allowing for the last version of each observation to be carried
308309
forward to fill in gaps in `x` or `y`.
309-
* Convenience function: `is_epi_archive`
310+
* Convenience function: `is_epi_archive`.
310311

311312
Additional functions:
312313
* `growth_rate`: estimates growth rate of a time series using one of a few
313314
built-in `method`s based on relative change, linear regression,
314315
smoothing splines, or trend filtering.
315316
* `detect_outlr`: applies one or more outlier detection methods to a given
316317
signal variable, and optionally aggregates the outputs to create a
317-
consensus result
318+
consensus result.
318319
* `detect_outlr_rm`: outlier detection function based on a
319320
rolling-median-based outlier detection function; one of the methods
320321
included in `detect_outlr`.

R/methods-epi_archive.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ epix_as_of = function(x, max_version, min_time_value = -Inf, all_versions = FALS
8282
#' `x`), and returns the updated `x` [invisibly][base::invisible].
8383
#'
8484
#' @param x An `epi_archive`
85-
#' @param fill_versions_end Length-1, same class&type as `%s$version`: the
85+
#' @param fill_versions_end Length-1, same class&type as `x$version`: the
8686
#' version through which to fill in missing version history; this will be the
8787
#' result's `$versions_end` unless it already had a later
8888
#' `$versions_end`.
@@ -699,9 +699,10 @@ group_by.epi_archive = function(.data, ..., .add=FALSE, .drop=dplyr::group_by_dr
699699
#' @param new_col_name String indicating the name of the new column that will
700700
#' contain the derivative values. Default is "slide_value"; note that setting
701701
#' `new_col_name` equal to an existing column name will overwrite this column.
702-
#' @param as_list_col Should the new column be stored as a list column? Default
703-
#' is `FALSE`, in which case a list object returned by `f` would be unnested
704-
#' (using `tidyr::unnest()`), and the names of the resulting columns are given
702+
#' @param as_list_col If the computations return data frames, should the slide
703+
#' result hold these in a single list column or try to unnest them? Default is
704+
#' `FALSE`, in which case a list object returned by `f` would be unnested
705+
#' (using [`tidyr::unnest()`]), and the names of the resulting columns are given
705706
#' by prepending `new_col_name` to the names of the list elements.
706707
#' @param names_sep String specifying the separator to use in `tidyr::unnest()`
707708
#' when `as_list_col = FALSE`. Default is "_". Using `NULL` drops the prefix

R/slide.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@
5252
#' @param new_col_name String indicating the name of the new column that will
5353
#' contain the derivative values. Default is "slide_value"; note that setting
5454
#' `new_col_name` equal to an existing column name will overwrite this column.
55-
#' @param as_list_col Should the new column be stored as a list column? Default
56-
#' is `FALSE`, in which case a list object returned by `f` would be unnested
57-
#' (using `tidyr::unnest()`), and the names of the resulting columns are given
55+
#' @param as_list_col If the computations return data frames, should the slide
56+
#' result hold these in a single list column or try to unnest them? Default is
57+
#' `FALSE`, in which case a list object returned by `f` would be unnested
58+
#' (using [`tidyr::unnest()`]), and the names of the resulting columns are given
5859
#' by prepending `new_col_name` to the names of the list elements.
5960
#' @param names_sep String specifying the separator to use in `tidyr::unnest()`
6061
#' when `as_list_col = FALSE`. Default is "_". Using `NULL` drops the prefix

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# epiprocess
22

33
<!-- badges: start -->
4-
[![R-CMD-check](https://github.com/cmu-delphi/epiprocess/workflows/R-CMD-check/badge.svg)](https://github.com/cmu-delphi/epiprocess/actions)
4+
[![R-CMD-check](https://github.com/cmu-delphi/epiprocess/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cmu-delphi/epiprocess/actions/workflows/R-CMD-check.yaml)
55
<!-- badges: end -->
66

77
This package introduces a common data structure for epidemiological data sets
@@ -45,10 +45,10 @@ The second main data structure in the package is called
4545
wrapped around a data table that stores the archive (version history) of some
4646
signal variables of interest.
4747

48-
By convention, functions in the `epiprocess` package that operate on `epi_df`
49-
objects begin with `epix` (the "x" is meant to remind you of "archive"). These
50-
are just wrapper functions around the public methods for the `epi_archive` R6
51-
class. For example:
48+
By convention, functions in the `epiprocess` package that operate on
49+
`epi_archive` objects begin with `epix` (the "x" is meant to remind you of
50+
"archive"). These are just wrapper functions around the public methods for the
51+
`epi_archive` R6 class. For example:
5252

5353
- `epix_as_of()`, for generating a snapshot in `epi_df` format from the data
5454
archive, which represents the most up-to-date values of the signal variables,

_pkgdown.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ url: https://cmu-delphi.github.io/epiprocess/
66
home:
77
links:
88
- text: Get the epipredict R package
9-
href: https://cmu-delphi.github.io/epiprocess/
9+
href: https://cmu-delphi.github.io/epipredict/
1010
- text: Get the covidcast R package
1111
href: https://cmu-delphi.github.io/covidcast/covidcastR/
12+
- text: Get the epidatr R package
13+
href: https://github.com/cmu-delphi/epidatr
1214

1315
articles:
1416
- title: Using the package
@@ -34,11 +36,11 @@ repo:
3436

3537

3638
reference:
37-
- title: epi_df basics
39+
- title: "`epi_df` basics"
3840
desc: Details on `epi_df` format, and basic functionality.
3941
- contents:
4042
- matches("epi_df")
41-
- title: epi_*() functions
43+
- title: "`epi_*()` functions"
4244
desc: Functions that act on `epi_df` objects.
4345
- contents:
4446
- epi_slide
@@ -50,11 +52,11 @@ reference:
5052
- detect_outlr
5153
- detect_outlr_rm
5254
- detect_outlr_stl
53-
- title: epi_archive basics
55+
- title: "`epi_archive` basics"
5456
desc: Details on `epi_archive`, and basic functionality.
5557
- contents:
5658
- matches("archive")
57-
- title: epix_*() functions
59+
- title: `epix_*()` functions
5860
desc: Functions that act on an `epi_archive` and/or `grouped_epi_archive` object.
5961
- contents:
6062
- starts_with("epix")

man/epi_slide.Rd

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epix_fill_through_version.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epix_slide.Rd

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)