Skip to content

Unhelpful error for bad if_else() input "object '' not found" #1798

@MichaelChirico

Description

@MichaelChirico

I forgot the third input and was met with a puzzling error:

lazy_tbl |> mutate(x = if_else(y > 1, 2))
Error: object '' not found

c.f. plain {dbplyr}:

iris |> mutate(x = if_else(Sepal.Width > 1, 2))
# Error in `mutate()`:
# ℹ In argument: `x = if_else(Sepal.Width > 1, 2)`.
# Caused by error in `if_else()`:
# ! argument "false" is missing, with no default
# Run `rlang::last_trace()` to see where the error occurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions