You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address failing test, use dplyr_extending, don't ungroup in slides
* Fix failing grouped `epix_slide` test, where `group_modify` dropped the
`epi_df` class when binding results together, by implementing
`dplyr_reconstruct.epi_df`.
* Implement the rest of `?dplyr_extending` and remove some now-unnecessary S3
methods for dplyr verbs, addressing #195, #223, and changing `epi[x]_slide` to
leave grouping intact.
* Update tests for grouped slides to reflect new behavior.
* Update NEWS.md.
# Same idea as above, but accounting for `duplicated` not
258
+
# working as we want on 0 columns. (Should be the same as if
259
+
# we were counting distinct values of a column defined as
260
+
# `rep(val, target_n_rows)`.)
261
+
if (nrow(.data_group) ==0L) {
262
+
0L
263
+
} else {
264
+
1L
265
+
}
266
+
}
236
267
237
268
# If we get back an atomic vector
238
269
if (is.atomic(comp_value)) {
@@ -241,7 +272,7 @@ grouped_epi_archive =
241
272
}
242
273
# If not a singleton, should be the right length, else abort
243
274
elseif (length(comp_value) !=count) {
244
-
Abort("If the slide computation returns an atomic vector, then it must have a single element, or else one element per appearance of the reference time value in the local window.")
275
+
Abort('If the slide computation returns an atomic vector, then it must have either (a) a single element, or (b) one element per distinct combination of key variables, excluding the `time_value`, `version`, and grouping variables, that is present in the first argument to the computation.')
0 commit comments