Skip to content
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

Methods for keeping object in class #399

Open
athowes opened this issue Oct 21, 2024 · 2 comments
Open

Methods for keeping object in class #399

athowes opened this issue Oct 21, 2024 · 2 comments
Labels
medium Nice to have for next release

Comments

@athowes
Copy link
Collaborator

athowes commented Oct 21, 2024

https://github.com/epiforecasts/scoringutils/blob/3d125f12724689cff6de2bf640d4ca992389eff7/R/class-forecast.R#L320

@seabbs
Copy link
Contributor

seabbs commented Oct 21, 2024

For others removes the need for asserting the consistency of an object when used which simplifies code quite a bit.

@athowes
Copy link
Collaborator Author

athowes commented Nov 5, 2024

Duplicate of #272.

In #52 I've found that after making some alterations to an object of class latent_individual that I need to recall as_latent_individual in order for epidist::epidist to work:

obs_prep_reduced <- obs_prep |>
  dplyr::group_by(district) |>
  dplyr::mutate(n = dplyr::n()) |>
  dplyr::filter(n > 30) |>
  dplyr::select(-n) |>
  dplyr::ungroup()

obs_prep_reduced <- as_latent_individual(obs_prep_reduced)

This doesn't seem to be ideal. Probably something easy to fix here.

Then @seabbs suggested that it'd been solved in scoringutils (the OP of this post).

@athowes athowes added the medium Nice to have for next release label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Nice to have for next release
Projects
None yet
Development

No branches or pull requests

2 participants