greta-dev / greta-dev/greta

Could calculate return a custom class, "greta_calculate" or something?

Open
#481 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.