Could calculate return a custom class, "greta_calculate" or something?
Open
low hanging fruit
Up Next
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
This might make it easier to do tidying on the output, so we can avoid steps like [this](https://github.com/njtierney/greta-course-notes/blob/master/day-1/completed/penguins-completed.R#L132-L145):
```r
penguins_prediction <- sims$probability_female_pred[, , 1] %>%
t() %>%
as_tibble() %>%
set_names(paste0("sim_", seq_len(n_sims))) %>%
bind_cols(
penguins_for_prediction,
.
) %>%
pivot_longer(
cols = starts_with("sim"),
names_to = "sim",
values_to = "probability_female",
names_prefix = "sim_"
)
```
Perhaps integrating with either `mmcc` or `tidybayes`
Contributor guide
Assessment
This issue has not been assessed yet.