Skip to content

Commit 4aadc95

Browse files
committed
docs(slide.R): correct error message regarding data.frame rownames
The error message says that slide computations can't be rownamed data frames. This is both bad wording (having rownames != having non-automatic rownames) and we're not actually enforcing any restriction of the sort anyway. We drop/ignore the rownames though (via dplyr/tibble). In `epix_slide`, the allowance of non-automatic rownames was deliberate; in `epi_slide`, it also seems likely the way to go; one might convert to `data.frame` and have some filter-like operation return non-automatic rownames.
1 parent a82d48d commit 4aadc95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/slide.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ epi_slide_one_group <- function(
410410
# Returned values must be data.frame or vector.
411411
if ("other" %in% return_types) {
412412
cli_abort(
413-
"epi_slide: slide computations must always return either data frames without rownames
413+
"epi_slide: slide computations must always return either data frames
414414
or unnamed vectors (as determined by the vctrs package).",
415415
class = "epiprocess__invalid_slide_comp_value"
416416
)

0 commit comments

Comments
 (0)