bare(1)
at_least(1)
at_most(1)
in_range(1, 2)
at_least(1.5) |> try()
check_integer(bare(factor(1))) |> try()
check_integer(1:5, n = at_least(10)) |> try()
check_integer(1:5, n = at_most(3)) |> try()
check_integer(1:5, n = in_range(2, 4)) |> try()
x <- as.Date("2000-01-01")
class(x) <- c("my_date", class(x))
check_date(bare(x)) |> try()
Run the code above in your browser using DataLab