`r lifecycle::badge("stable")`
A widget that generates a group overview table of group-level metric results across one or more metrics.
Usage
Widget_GroupOverview(
dfResults,
dfMetrics,
dfGroups,
strGroupLevel = NULL,
strGroupSubset = "red",
strGroupLabelKey = "InvestigatorLastName",
bDebug = FALSE
)
Arguments
- dfResults
`data.frame` A stacked summary of analysis pipeline output. Created by passing a list of results returned by [Summarize()] to [BindResults()]. Expected columns: `GroupID`, `GroupLevel`, `Numerator`, `Denominator`, `Metric`, `Score`, `Flag`, `MetricID`, `StudyID`, `SnapshotDate`.
- dfMetrics
`data.frame` Metric-specific metadata for use in charts and reporting. Created by passing an `lWorkflow` object to [MakeMetric()]. Expected columns: `File`, `MetricID`, `Group`, `Abbreviation`, `Metric`, `Numerator`, `Denominator`, `Model`, `Score`, and `Threshold`. For more details see the Data Model vignette: `vignette("DataModel", package = "gsm.core")`.
- dfGroups
`data.frame` Group-level metadata dictionary. Created by passing CTMS site and study data to [MakeLongMeta()]. Expected columns: `GroupID`, `GroupLevel`, `Param`, `Value`.
- strGroupLevel
`character` Value for the group level. Default: NULL and taken from `dfMetrics$GroupLevel` if available.
- strGroupSubset
`character` Subset of groups to include in the table. Default: 'red'. Options: - 'all': All groups. - 'red': Groups with 1+ red flags. - 'red/amber': Groups with 1+ red/amber flag. - 'amber': Groups with 1+ amber flag.
- strGroupLabelKey
`character` Value for the group label key. Default: 'InvestigatorLastName'.
- bDebug
`logical` Print debug messages? Default: `FALSE`.
Examples
# site-level report
Widget_GroupOverview(
dfResults = FilterByLatestSnapshotDate(gsm.core::reportingResults),
dfMetrics = gsm.core::reportingMetrics,
dfGroups = gsm.core::reportingGroups
)
# filter site-level report to all flags
Widget_GroupOverview(
dfResults = FilterByLatestSnapshotDate(gsm.core::reportingResults),
dfMetrics = gsm.core::reportingMetrics,
dfGroups = gsm.core::reportingGroups,
strGroupSubset = "all"
)
# country-level report
reportingMetrics <- gsm.core::reportingMetrics
reportingMetrics$GroupLevel <- "Country"
Widget_GroupOverview(
dfResults = FilterByLatestSnapshotDate(gsm.core::reportingResults),
dfMetrics = gsm.core::reportingMetrics,
dfGroups = gsm.core::reportingGroups,
strGroupLevel = "Country"
)