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
Currently, a workaround for the length/nrow requirement for the inner computations is to return a single-row data frame with a single list column containing the actual result, then do a time_value-grouped slice and maybe a select to drop the nongrouping key columns on the slide output. This could be slightly less work if one could just say data = list(<real result>) for the computation rather than data = tibble(result = <real result>).
However, we might want to watch out for users trying to achieve something like the %>% mutate(tibble(col1=..., col2=...)) behavior, except with lists instead of tibbles. Perhaps that's enough to dissuade us from implementing this, or maybe there's a way around it; e.g., accepting only unnamed lists, since the names would probably be dropped anyway.
Implementation might require a tweak of as_list_col, not just the validation code.
The text was updated successfully, but these errors were encountered:
brookslogan
changed the title
Allow list-type output from epi[x]_slide inner computations
Consider allowing list-type output from epi[x]_slide inner computations
Oct 26, 2022
Currently, a workaround for the length/nrow requirement for the inner computations is to return a single-row data frame with a single list column containing the actual result, then do a
time_value
-grouped slice and maybe aselect
to drop the nongrouping key columns on the slide output. This could be slightly less work if one could just saydata = list(<real result>)
for the computation rather thandata = tibble(result = <real result>)
.However, we might want to watch out for users trying to achieve something like the
%>% mutate(tibble(col1=..., col2=...))
behavior, except with lists instead of tibbles. Perhaps that's enough to dissuade us from implementing this, or maybe there's a way around it; e.g., accepting only unnamed lists, since the names would probably be dropped anyway.Implementation might require a tweak of
as_list_col
, not just the validation code.The text was updated successfully, but these errors were encountered: