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

Reorganise function locations #382

Closed
athowes opened this issue Oct 14, 2024 · 1 comment · Fixed by #389
Closed

Reorganise function locations #382

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

Comments

@athowes
Copy link
Collaborator

athowes commented Oct 14, 2024

At the moment we have functions stored in files like:

  • generics.R
  • defaults.R

These were related to S3 methods.

I think that we should reorganise so that functions are grouped together by functionality rather than by if they are generics or methods. So I'd advocate for moving these out into files like:

  • formula.R
  • family.R
  • fit.R

To some extent this has already started to happen (for example there is already family.R).

An auxiliary goal of this is that if we want to add a new model or a new family for an existing model it should be one new script.

As a part of this issue the function groupings on the pkgdown also needs to change.

@athowes athowes self-assigned this Oct 14, 2024
@athowes athowes added the high Required for next release label Oct 14, 2024
@athowes
Copy link
Collaborator Author

athowes commented Oct 14, 2024

Waiting on #383 to merge before work on this.

athowes added a commit that referenced this issue Oct 16, 2024
* Move fitting functions into fit

* Create stancode.R

* Create validate.R

* Remove defaults.R and generics.R and pkgdown groups

* Document

* Don't need this line

* Standardise providing ... argument to generics

* Remove whitespace

* Fix R CMD CHECK warning

* Return NULL by default for stancode

* Add test of Stan code NULL case

* Add test for stanvars class
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.

1 participant