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 bySummarize()
toBindResults()
. 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 anlWorkflow
object 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.frame
Group-level metadata dictionary. Created by passing CTMS site and study data toMakeLongMeta()
. Expected columns:GroupID
,GroupLevel
,Param
,Value
.- strGroupLevel
character
Value for the group level. Default: NULL and taken fromdfMetrics$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(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"
)