-
Notifications
You must be signed in to change notification settings - Fork 11
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
Full package review for v0.2.0 #341
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the vignette data_from_epireview.Rmd
and everything worked as expected when following along the steps, I've left some comments with questions and feedback. The main issue that I'd include in my wishlist would be to ideally find a way to simplify the process of adding bibliographic information to epidists. I think that once the par_type column is simplified, this process will be easier, and not necessary to use grepl. The process of subsetting multirow entries also would ideally be simplified for the user but I understand that it's difficult to do so given the structure of epireview.
I really like the interface to visualise the parameters in database.Rmd
, maybe in the future it could be expanded to have a few more relevant columns, e.g., whether entries are parameterised.
vignettes/database.Rmd
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really nice, I rendered it in R, how will it be displayed to the users? in the list of vignettes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand your question. It can be rendered locally with vignette("database", package = "epiparameter")
or viewed on the {epiparameter} website. It is listed in the vignettes so will be findable by users using vignette(package = "epiparameter")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{epiparameter}
v0.1.0.9000 full package review
Thanks @joshwlambert for your hard work on this package. This review provided me an opportunity to update myself with the latest developments. I have left some line comments and will leave my long form comments here for your consideration.
README
- It would be helpful to link the database to the README so people can access it immediately they visit the package's page.
- You point to a googlesheet where people can contribute new parameters to the database. Could you link the data dictionary in the sheet so new contributors know what the column names mean?
Getting Started Vignette
- The Getting Started vignette contains a lot of useful information but needs a bit of re-organising to make it accessible to the user. Currently, I fear it's a bit too technical. I would propose restructuring it as follows:
- Introductory paragraph
- Use case of epiparameter
- Installing and loading epiparameter
- The full database/library of parameters:
- Here, introduce
epidist_db()
(with defaults) andparameter_tbl()
(See comments aboutparameter_tbl() below
).
- Here, introduce
- Interacting with the library:
- Here, introduce the
<epidist>
class as the single entry of the database. (In my opinion, it would be helpful to leave out a lot of the details about the class and methods and focus on "functions" since that's what most users know. This way, it will remove distractions and barriers to understanding and focus on directing users on how to use the package rather than how it works in the background (the object orientation bits). The technical details can/should be moved to the Design Vignette. If you agree, I'd be happy to help with this.) - How to subset entries. Here, introduce
epidist_db()
withsingle_epidist = TRUE
as well as thesubset
argument.
- Here, introduce the
- Working with a single entry:
- density functions,
- plotting function, etc.
- extracting parameter values
- accessors (currently left out but important).
- converting or extracting parameter values from summary statistics and vice versa.
- How to add your own entry + caveats.
parameter_tbl()
-
I think there is duplicated functionality between
parameter_tbl()
, the<epidist>
print()
method, and the database. From what I understand,parameter_tbl()
is a way to subset the database and return a data.frame of the results. However,epidist_db()
withsingle_epidist = FALSE
returns a similar result but as a list. Moreover, it seemsparameter_tbl()
is simply a subset of the database. I think it would be helpful to have a single function that returns a consistent result of subsetting the database. -
If you are keeping
parameter_tbl()
, consider adding anhtml
argument that creates an html widget for casting to the Viewer as an HTML page, similar tostringr::str_view()
, which usesstringr:::str_view_widget()
. This would be helpful for people who want to see the results in a more user-friendly format than what the console provides.
Conversion and extraction functions
- Add a
@seealso
tag linkingconvert_summary_stats_to_params()
andconvert_params_to_summary_stats()
. - Consider splitting
extract_params()
into two functions:extract_params_from_range()
fortype = "range
so that it can probably be extensible to the various types of ranges (interquartile, etc), andextract_params_from_quantiles()
where type = "percentile" or "quantile".
- In the vignette Parameter extraction and conversion in {epiparameter}:
- The use case section is really insightful but is placed too far down the vignette to motivate the functions discussed. I would suggest to start the vignette with the use case that points out the limitation in reporting unidentified distributions of percentiles and ranges (here, giving examples of studies that did that), motivate for the functionalities epiparameter provides to solve that, showcase the functionalities, then end the vignette showing how the parameters from the studies you pointed out in the beginning can be converted to a usable format.
- The conversion examples for negative binomial all return
Inf
for the dispersion parameter. Could you provide an example where the dispersion is finite? - Do you need cold folding in that vignette?
Exported functions
- Are all the exported object checkers needed by the user or are some only for internal use?
- You probably shouldn't export the
format()
methods for<epidist>
and<vb_epidist>
as users are not expected to interact with it directly.
Co-authored-by: CarmenTamayo <[email protected]>
Co-authored-by: Hugo Gruson <[email protected]>
Co-authored-by: Hugo Gruson <[email protected]>
Co-authored-by: Hugo Gruson <[email protected]>
Co-authored-by: Hugo Gruson <[email protected]>
Co-authored-by: Hugo Gruson <[email protected]>
Co-authored-by: James Azam <[email protected]>
Co-authored-by: James Azam <[email protected]>
Co-authored-by: James Azam <[email protected]>
Co-authored-by: James Azam <[email protected]>
Co-authored-by: James Azam <[email protected]>
Co-authored-by: James Azam <[email protected]>
Co-authored-by: James Azam <[email protected]>
…s, adding example of single_epidist = TRUE, adding accessor examples and moving adding entries to the end
…rt_summmary_stats_to_params
Added in be5bab3.
Added a link to the data dictionary in the google sheet.
I don't think installation should be in the Get Started vignette. It's stated in the README which is a more typical place to find them.
Thanks for this! I've done some of the refactoring in b6b3787. I'll continue working to improve the documentation and make it more user friendly in the next version.
You're correct in thinking that In an ideal world I think we could have the
I haven't used
Resolved in d74c15d.
The extraction functions are going to be extended in the near future (see recent suggestions on #1) I'll consider this change when I make the other changes.
Usually I write them for use in other functions in {epiparameter}, but I've also thought that they are potentially handy functions for a user that wants to quickly change the contents of an
Usually the |
Thanks everyone for providing helpful comments and suggestions! I've committed a lot of the suggested changes on the I'll then move forward with the v0.2.0 release (#339). |
This PR is to provide a platform to review the entirety of the package.
Once this review concludes I will release v0.2.0 on GitHub.
Please see the NEWS.md file for an overview of changes between v0.1.0 and v0.2.0.
This PR is unconventional as it is not intended for merging or for additional commits (unless minor) and instead comments will be converted to issues and these will be addressed in their own PRs.