qualify a map to be umambiguous and effective (no NA)

qualify_map(df)

Arguments

df

tibble.

Value

tibble.

Examples

tibble::tribble(
    ~from, ~to,
    NA, 1,
    'B', NA,
    NA, NA,
    'C', 3
) %>% qualify_map
#> # A tibble: 1 × 2
#>   from     to
#>   <chr> <dbl>
#> 1 C         3

tibble::tribble(
    ~from, ~to,
    'A', 0.5,
    'A', 1.5,
    'B', 2
) %>% qualify_map
#> # A tibble: 1 × 2
#>   from     to
#>   <chr> <dbl>
#> 1 B         2