condition
Code
if_else(TRUE, 1:2, 1L)
Error <vctrs_error_assert_size>
`true` must have size 1, not size 2.
condition
must be logical (and isn't cast to logical!)Code
if_else("x", 1, 2)
Error <vctrs_error_assert_ptype>
`condition` must be a vector with type <logical>.
Instead, it has type <character>.
Code
if_else(TRUE, "x", 3)
Error <vctrs_error_incompatible_type>
Can't combine `true` <character> and `false` <double>.
Code
if_else(TRUE, "x", "y", missing = 3)
Error <vctrs_error_incompatible_type>
Can't combine `true` <character> and `missing` <double>.
Code
if_else(c(TRUE, FALSE), 1:3, 1)
Error <vctrs_error_assert_size>
`true` must have size 2, not size 3.
Code
if_else(c(TRUE, FALSE), 1, 1:3)
Error <vctrs_error_assert_size>
`false` must have size 2, not size 3.
Code
if_else(TRUE, 1, 2, 3)
Error <rlib_error_dots_nonempty>
`...` must be empty.
x Problematic argument:
* ..1 = 3
i Did you forget to name an argument?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.