Code
case_match(1)
Condition
Error in `case_match()`:
! At least one condition must be supplied.
Code
case_match(1, NULL)
Condition
Error in `case_match()`:
! At least one condition must be supplied.
.default
is part of common type computationCode
case_match(1, 1 ~ 1L, .default = "x")
Condition
Error in `case_match()`:
! Can't combine `..1 (right)` <integer> and `.default` <character>.
NULL
formula element throws meaningful errorCode
case_match(1, 1 ~ NULL)
Condition
Error in `case_match()`:
! `..1 (right)` must be a vector, not `NULL`.
Code
case_match(1, NULL ~ 1)
Condition
Error in `case_match()`:
! `..1 (left)` must be a vector, not `NULL`.
Code
case_match(1, 1 ~ 2, 3 ~ stop("oh no!"))
Condition
Error in `case_match()`:
! Failed to evaluate the right-hand side of formula 2.
Caused by error:
! oh no!
Code
case_match(1, 1 ~ 2, stop("oh no!") ~ 4)
Condition
Error in `case_match()`:
! Failed to evaluate the left-hand side of formula 2.
Caused by error:
! oh no!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.