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

Refactor of epidist_formula to use S3 #372

Closed
athowes opened this issue Oct 9, 2024 · 1 comment · Fixed by #383
Closed

Refactor of epidist_formula to use S3 #372

athowes opened this issue Oct 9, 2024 · 1 comment · Fixed by #383
Assignees
Labels
high Required for next release

Comments

@athowes
Copy link
Collaborator

athowes commented Oct 9, 2024

This is the only latent_individual specific part of epidist_formula.latent_individual.
Create a new internal S3 which does this and make the rest of it a regular function. as_epidist_formula, convert_formula_to_epidist_model... ask ChatGPT.

Originally posted by @athowes in #370 (comment)

In PR #338 we added double dispatch to epidist_family. I think similarly that we should refactor epidist_formula so that any non-model-specific parts are not containing within model-specific functions. I don't think we need double dispatch, just single dispatch and an outer function.

epidist_formula <- function () {
  # things here
  # including the helper in PR #370
  epidist_formula_model()
  # ...
}

Unless there are any formula specific bits? I don't think there would be.

@athowes athowes added the high Required for next release label Oct 9, 2024
@seabbs

This comment was marked as outdated.

@athowes athowes self-assigned this Oct 10, 2024
seabbs pushed a commit that referenced this issue Oct 14, 2024
* Move formula functions into formula.R

* Put formula functions into group together

* Refactor to use epidist_formula then dispatch into model-specific parts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high Required for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants