Generate a lookup table
Examples
x = edc_example()
x$.lookup=NULL
lk = build_lookup(x)
lk
#> ── Lookup table (extraction of 2024-01-01) ────────────────────────────────────
#> dataset nrow ncol
#> <chr> <dbl> <dbl>
#> 1 enrol 50 5
#> 2 db2 50 5
#> 3 db3 50 6
#> 4 short 50 4
#> 5 db1 100 6
#> 6 long_mixed 100 5
#> 7 long_pure 150 4
#> 8 ae 175 6
lk %>% tidyr::unnest(c(names, labels))
#> # A tibble: 41 × 5
#> dataset nrow ncol names labels
#> <chr> <dbl> <dbl> <chr> <named list>
#> 1 enrol 50 5 subjid <chr [1]>
#> 2 enrol 50 5 age <chr [1]>
#> 3 enrol 50 5 date_naissance <chr [1]>
#> 4 enrol 50 5 arm <chr [1]>
#> 5 enrol 50 5 crfname <chr [1]>
#> 6 db2 50 5 subjid <chr [1]>
#> 7 db2 50 5 date4 <chr [1]>
#> 8 db2 50 5 date5 <chr [1]>
#> 9 db2 50 5 date6 <chr [1]>
#> 10 db2 50 5 crfname <chr [1]>
#> # ℹ 31 more rows