`r lifecycle::badge("stable")`
This function generates a summary table for a report by joining the provided results data frame with the site-level metadata from dfGroups. It then filters and arranges the data based on certain conditions and displays the result in a datatable.
Arguments
- dfResults
`r gloss_param("dfResults")` `r gloss_extra("dfResults_filtered")`
- dfGroups
`data.frame` Group-level metadata dictionary. Created by passing CTMS site and study data to [MakeLongMeta()]. Expected columns: `GroupID`, `GroupLevel`, `Param`, `Value`.
- strGroupLevel
group level for the table
- strGroupDetailsParams
one or more parameters from dfGroups to be added as columns in the table
- vFlags
`integer` List of flag values to include in output table. Default: `c(-2, -1, 1, 2)`.
Examples
# site-level report
Report_MetricTable(
dfResults = gsm.core::reportingResults %>%
dplyr::filter(.data$MetricID == "Analysis_kri0001") %>%
FilterByLatestSnapshotDate(),
dfGroups = gsm.core::reportingGroups
)
Group
Enrolled
Numerator
Denominator
Metric
Score
Flag