Skip to content

Commit 43a90d4

Browse files
authored
Merge pull request #167 from dajmcdon/km-slide-n-fix
Remove default `n` values in `epi_slide` and `epix_slide`
2 parents 59b04b8 + 438a390 commit 43a90d4

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Config/testthat/edition: 3
5656
Encoding: UTF-8
5757
LazyData: true
5858
Roxygen: list(markdown = TRUE)
59-
RoxygenNote: 7.2.0
59+
RoxygenNote: 7.2.1
6060
Depends:
6161
R (>= 2.10)
6262
URL: https://cmu-delphi.github.io/epiprocess/

R/archive.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ epi_archive =
292292
#' details.
293293
#' @importFrom data.table key
294294
#' @importFrom rlang !! !!! enquo enquos is_quosure sym syms
295-
slide = function(f, ..., n = 7, group_by, ref_time_values,
295+
slide = function(f, ..., n, group_by, ref_time_values,
296296
time_step, new_col_name = "slide_value",
297297
as_list_col = FALSE, names_sep = "_",
298298
all_rows = FALSE) {

R/methods-epi_archive.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ epix_merge = function(x, y, ..., locf = TRUE, nan = NA) {
115115
#' @param n Number of time steps to use in the running window. For example, if
116116
#' `n = 7`, and one time step is one day, then to produce a value on January 7
117117
#' we apply the given function or formula to data in between January 1 and
118-
#' 7. Default is 7.
118+
#' 7.
119119
#' @param group_by The variable(s) to group by before slide computation. If
120120
#' missing, then the keys in the underlying data table, excluding `time_value`
121121
#' and `version`, will be used for grouping. To omit a grouping entirely, use
@@ -202,7 +202,7 @@ epix_merge = function(x, y, ..., locf = TRUE, nan = NA) {
202202
#' group_by = geo_value,
203203
#' ref_time_values = time_values,
204204
#' new_col_name = 'case_rate_3d_av')
205-
epix_slide = function(x, f, ..., n = 7, group_by, ref_time_values,
205+
epix_slide = function(x, f, ..., n, group_by, ref_time_values,
206206
time_step, new_col_name = "slide_value",
207207
as_list_col = FALSE, names_sep = "_", all_rows = FALSE) {
208208
if (!inherits(x, "epi_archive")) Abort("`x` must be of class `epi_archive`.")

R/slide.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' @param n Number of time steps to use in the running window. For example, if
2323
#' `n = 7`, one time step is one day, and the alignment is "right", then to
2424
#' produce a value on January 7 we apply the given function or formula to data
25-
#' in between January 1 and 7. Default is 7.
25+
#' in between January 1 and 7.
2626
#' @param ref_time_values Time values for sliding computations, meaning, each
2727
#' element of this vector serves as the reference time point for one sliding
2828
#' window. If missing, then this will be set to all unique time values in the
@@ -114,7 +114,7 @@
114114
#' epi_slide(a = data.frame(cases_2dav = mean(cases),
115115
#' cases_2dma = mad(cases)),
116116
#' n = 2, as_list_col = TRUE)
117-
epi_slide = function(x, f, ..., n = 7, ref_time_values,
117+
epi_slide = function(x, f, ..., n, ref_time_values,
118118
align = c("right", "center", "left"), before, time_step,
119119
new_col_name = "slide_value", as_list_col = FALSE,
120120
names_sep = "_", all_rows = FALSE) {

man/epi_archive.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epi_slide.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epix_slide.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)