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 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: 176 × 24
#>    GroupID GroupLevel ParticipantCount SiteCount Status InvestigatorFirstName
#>    <chr>   <chr>      <chr>            <chr>     <chr>  <chr>                
#>  1 10      Site       20               1         Active Ariel                
#>  2 100     Site       2                1         Active Cheyenne             
#>  3 101     Site       3                1         Active Macallyson           
#>  4 102     Site       3                1         Active Asa                  
#>  5 103     Site       4                1         Active Manaal               
#>  6 104     Site       9                1         Active Dominico             
#>  7 105     Site       3                1         Active Brandon              
#>  8 106     Site       3                1         Active Gabriella            
#>  9 107     Site       3                1         Active Peter                
#> 10 109     Site       4                1         Active Brandon              
#> # ℹ 166 more rows
#> # ℹ 18 more variables: InvestigatorLastName <chr>, City <chr>, State <chr>,
#> #   Country <chr>, protocol_row_id <chr>, site_num <chr>, site_row_id <chr>,
#> #   protocol <chr>, pi_number <chr>, pi_last_name <chr>, pi_first_name <chr>,
#> #   site_status <chr>, is_satellite <chr>, account <chr>, site_active_dt <chr>,
#> #   city <chr>, state <chr>, country <chr>