Skip to content

Commit 143081a

Browse files
committed
document that ref_time_val not always a date
1 parent eb0c27e commit 143081a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

NEWS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ inter-release development versions will include an additional ".9999" suffix.
1111
must take an `epi_df` with the same column names as the archive's `DT`,
1212
minus the `version` column; followed by a one-row tibble containing the
1313
values of the grouping variables for the associated group; followed by a
14-
Date containing the reference time value that was used; followed by any
15-
number of named arguments.
14+
reference time value, usually as a `Date` object; followed by any number
15+
of named arguments.
1616

1717
## New features:
1818

R/methods-epi_archive.R

+6-6
Original file line numberDiff line numberDiff line change
@@ -668,14 +668,14 @@ group_by.epi_archive = function(.data, ..., .add=FALSE, .drop=dplyr::group_by_dr
668668
#' explanation. If a function, `f` must take an `epi_df` with the same
669669
#' column names as the archive's `DT`, minus the `version` column; followed
670670
#' by a one-row tibble containing the values of the grouping variables for
671-
#' the associated group; followed by a Date containing the reference time
672-
#' value that was used; followed by any number of named arguments. If a formula,
673-
#' `f` can operate directly on columns accessed via `.x$var` or `.$var`, as in
674-
#' `~ mean (.x$var)` to compute a mean of a column `var` for each
671+
#' the associated group; followed by a reference time value, usually as a
672+
#' `Date` object; followed by any number of named arguments. If a formula,
673+
#' `f` can operate directly on columns accessed via `.x$var` or `.$var`, as
674+
#' in `~ mean (.x$var)` to compute a mean of a column `var` for each
675675
#' group-`ref_time_value` combination. The group key can be accessed via
676676
#' `.y` or `.group_key`, and the reference time value can be accessed via
677-
#' `.z` or `.ref_time_value`. If `f` is missing, then `...` will specify
678-
#' the computation.
677+
#' `.z` or `.ref_time_value`. If `f` is missing, then `...` will specify the
678+
#' computation.
679679
#' @param ... Additional arguments to pass to the function or formula specified
680680
#' via `f`. Alternatively, if `f` is missing, then `...` is interpreted as an
681681
#' expression for tidy evaluation. See details of [`epi_slide`].

0 commit comments

Comments
 (0)