-
Notifications
You must be signed in to change notification settings - Fork 6
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
Some way to refer to the models (and data structures) in the package? #448
Comments
Here's a possible design: > epidist_models <- function() {
+ all_objects <- ls(asNamespace("epidist"))
+ model_functions <- grep("^as_epidist_.*_model$", all_objects, value = TRUE)
+ model_names <- sub("^as_epidist_([a-z_]+)$", "\\1", model_functions)
+ unique(model_names)
+ }
> epidist_models()
[1] "latent_model" "marginal_model" "naive_model" Could do similar for data classes. |
Yes could do. Maybe in the first instance though we jus want to have aim for a vignette that lists the models in a single place and then point to that? |
I don't know about refering to vignettes from the roxygen (whether it's possible) |
it is I think using vignettes("name of vignette") |
Creating and upkeeping a vignette which lists the models seems to be more work to do than the solution above and also requires more maintanence. Eventually we want the vignette explaining the models to be up, and perhaps at that point we could switch to pointing to it. However, that vignette might be quite "mathy" in which case I think allowing users to just get a simple list of the models in the package is still valuable functionality (rather than having to read a load of notation before figuring out which models exist). |
We need to have the vignetter (or some central source) to list the methods each model uses so I think we can't get away from that. We can minimise the general amount of effort it takes though but just referring back to that. I also wondered about having another family class that links models together |
Isn't this the functions reference page? |
Well maybe but there is too much noise to be useful there I think (due to all the methods per function) |
In PR #447 I suggested adding documentation like:
I think this is fine for now but really we don't want to have to be updating documenation like this when we add a new model.
Instead, I think perhaps we could have some kind of data object or function in the package which lists the available models. Then in documentation we say that you can call
epidist_model_classes()
to look at them. Or for the data ones we can say that they can callepidist_data_classes()
.What do you think @seabbs? I think this is something you've probably encountered before.
The text was updated successfully, but these errors were encountered: