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.frameA stacked summary of analysis pipeline output. Created by passing a list of results returned bySummarize()toBindResults(). Expected columns:GroupID,GroupLevel,Numerator,Denominator,Metric,Score,Flag,MetricID,StudyID,SnapshotDate.- dfMetrics
data.frameMetric-specific metadata for use in charts and reporting. Created by passing anlWorkflowobject toMakeMetric(). Expected columns:File,MetricID,Group,Abbreviation,Metric,Numerator,Denominator,Model,Score, andThreshold. For more details see the Data Model vignette:vignette("DataModel", package = "gsm").- dfGroups
data.frameGroup-level metadata dictionary. Created by passing CTMS site and study data toMakeLongMeta(). Expected columns:GroupID,GroupLevel,Param,Value.- strGroupLevel
characterValue for the group level. Default: NULL and taken fromdfMetrics$GroupLevelif available.- strGroupSubset
characterSubset 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
characterValue for the group label key. Default: 'InvestigatorLastName'.- bDebug
logicalPrint debug messages? Default:FALSE.
Examples
# site-level report
Widget_GroupOverview(
dfResults = FilterByLatestSnapshotDate(reportingResults),
dfMetrics = reportingMetrics,
dfGroups = reportingGroups
)
# filter site-level report to all flags
Widget_GroupOverview(
dfResults = FilterByLatestSnapshotDate(reportingResults),
dfMetrics = reportingMetrics,
dfGroups = reportingGroups,
strGroupSubset = "all"
)
# country-level report
reportingMetrics$GroupLevel <- "Country"
Widget_GroupOverview(
dfResults = FilterByLatestSnapshotDate(reportingResults),
dfMetrics = reportingMetrics,
dfGroups = reportingGroups,
strGroupLevel = "Country"
)