Skip to content

Consider allowing list-type output from epi[x]_slide inner computations #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brookslogan opened this issue Oct 26, 2022 · 0 comments · Fixed by #477
Closed

Consider allowing list-type output from epi[x]_slide inner computations #240

brookslogan opened this issue Oct 26, 2022 · 0 comments · Fixed by #477
Assignees
Labels
enhancement New feature or request P2 low priority

Comments

@brookslogan
Copy link
Contributor

brookslogan commented 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 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.

@brookslogan brookslogan added enhancement New feature or request P2 low priority labels Oct 26, 2022
@brookslogan 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
@brookslogan brookslogan self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant