Closed Torvaney closed 5 years ago
For tidy.dixoncoles, something equivalent to:
tibble(parameter = names(params),
value = params) %>%
separate(c("parameter", "team"), "___")
Should be possible in base r to avoid a hefty tidyr dependency
broom::augment
just needs to wrap cbind essentially (depending on the type
of predictions desired)
It's occurred to me that returning a list of tibbles for all values of the type
argument to predict.dixoncoles
would be both a consistent API, and would clean up the required code here somewhat.
The drawback is that while this plays nicely with broom and tidy principles, it could be a pain for the casual user (for which a wide format set of predictions may be preferred).
Closed by https://github.com/Torvaney/regista/commit/7c160c975a88632e4677b3740dae7bf95276d0aa
(Without broom::glance
but honestly I can't see what useful dixon-coles metadata I would even want in there)
For easy use with broom/tidyverse.
Methods: