Pivots the input dataframe so any pair name-level columns are transformed into columns (name) that contain values from the corresponding level.
Examples
mockSummarisedResult() |>
splitAll()
#> # A tibble: 126 × 10
#> result_id cdm_name cohort_name age_group sex variable_name variable_level
#> <int> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 1 mock cohort1 overall overall number subje… NA
#> 2 1 mock cohort1 <40 Male number subje… NA
#> 3 1 mock cohort1 >=40 Male number subje… NA
#> 4 1 mock cohort1 <40 Female number subje… NA
#> 5 1 mock cohort1 >=40 Female number subje… NA
#> 6 1 mock cohort1 overall Male number subje… NA
#> 7 1 mock cohort1 overall Female number subje… NA
#> 8 1 mock cohort1 <40 overall number subje… NA
#> 9 1 mock cohort1 >=40 overall number subje… NA
#> 10 1 mock cohort2 overall overall number subje… NA
#> # ℹ 116 more rows
#> # ℹ 3 more variables: estimate_name <chr>, estimate_type <chr>,
#> # estimate_value <chr>