Skip to contents

[Stable]

Used to convert metadata dictionary (dfGroups) to a wide format data frame for use in charts and reports.

Usage

MakeWideGroups(dfGroups, strGroupLevel)

Arguments

dfGroups

data.frame Group-level metadata dictionary. Created by passing CTMS site and study data to gsm.mapping::MakeLongMeta(). Expected columns: GroupID, GroupLevel, Param, Value.

strGroupLevel

A string specifying the group level; used to filter dfGroups$GroupLevel.

Value

A long format data frame.

Examples

MakeWideGroups(reportingGroups, "Site")
#> # A tibble: 150 × 12
#>    GroupID GroupLevel studyid   invid InvestigatorFirstName InvestigatorLastName
#>    <chr>   <chr>      <chr>     <chr> <chr>                 <chr>               
#>  1 0X9360  Site       AA-AA-00… 0X93… Fred                  Smith               
#>  2 0X958   Site       AA-AA-00… 0X958 Fred                  Deer                
#>  3 0X2170  Site       AA-AA-00… 0X21… John                  Deer                
#>  4 0X5895  Site       AA-AA-00… 0X58… Joanne                Deer                
#>  5 0X1257  Site       AA-AA-00… 0X12… Joanne                Doe                 
#>  6 0X8799  Site       AA-AA-00… 0X87… John                  Doe                 
#>  7 0X4590  Site       AA-AA-00… 0X45… John                  Smith               
#>  8 0X4629  Site       AA-AA-00… 0X46… John                  Doe                 
#>  9 0X9346  Site       AA-AA-00… 0X93… John                  Doe                 
#> 10 0X2901  Site       AA-AA-00… 0X29… Joanne                Doe                 
#> # ℹ 140 more rows
#> # ℹ 6 more variables: site_status <chr>, City <chr>, State <chr>,
#> #   Country <chr>, ParticipantCount <chr>, SiteCount <chr>