Utility function for data type conversion.
Arguments
- x
A list of sets.
Value
A data.frame with logical columns representing sets.
Examples
a <- list(A = 1:5, B = 4:6)
print(a)
#> $A
#> [1] 1 2 3 4 5
#>
#> $B
#> [1] 4 5 6
#>
list_to_data_frame(a)
#> # A tibble: 6 × 3
#> key A B
#> <int> <lgl> <lgl>
#> 1 1 TRUE FALSE
#> 2 2 TRUE FALSE
#> 3 3 TRUE FALSE
#> 4 4 TRUE TRUE
#> 5 5 TRUE TRUE
#> 6 6 FALSE TRUE