Skip to content

separate_age_groups() fails ungracefully when it age groups aren't separable #93

@gadenbuie

Description

@gadenbuie

This should probably throw an error before hitting the error with if_else().

library(fcds)
library(dplyr, warn.conflicts = FALSE)

tibble(age_group = NA) %>% separate_age_groups()
#> Error: Problem with `mutate()` input `age_max`.
#> x `false` must be a double vector, not a logical vector.
#> ℹ Input `age_max` is `if_else(is.na(age_max) & !is.na(age_min), Inf, age_max)`.

Created on 2020-07-31 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions