Gilead-BioStats / gsm

Good Statistical Monitoring R Package
https://gilead-biostats.github.io/gsm/
Apache License 2.0
36 stars 9 forks source link

Update headers with glossary and simplified examples #1702

Closed lauramaxwell closed 1 month ago

lauramaxwell commented 1 month ago

Overview

closes #1628

Test Notes/Sample Code

Notes:

lauramaxwell commented 1 month ago

@jonthegeek This is ready for re-review. Along with a few typos and \dontruns being removed, I also had to fix most of the visualization and widget examples to used filtered versions of the reporting data frames so that only one metric and snapshot date (if applicable) was being fed into the functions. This wasn't caught earlier because it doesn't throw an error- it just creates a chaotic plot. Should we add a safeguard against this in the form of an error message? or are we assuming that most people are using MakeCharts() and so they don't have to worry about this filtering typically? @jwildfire @samussiah

lauramaxwell commented 1 month ago

we could also auto-filter to latest date and first metric in these functions and provide an alert/message that lets the user know what happened. This way, the output will always be reasonable, and if the user wanted something different, they will be aware of the filtering that occured. (could be dangerous if these functions were ever individually used in a workflow/automated context)

jonthegeek commented 1 month ago

@lauramaxwell We ran into this issue in the POC I'm updating for Friday's meeting, in Widget_GroupOverview(). There we're manually filtering to dplyr::filter(SnapshotDate == max(SnapshotDate)), but it would probably be good to build that sort of check into everything. I know at least one function does it right now. I think @jwildfire was thinking we'd standardize that for 2.1.