Skip to content

ifelse() with nonexistent variable not handled smoothly #2172

Description

@peterbenmeyer

This expression caused an error. The user make the mistake of referring to 'xyz' which was never created. Just a misspelling.
The resulting message advised me to report it here.

ifelse(slimcps1970s$xyz == slimcps1970s$OCC1990, "Match", "Mismatch")
Error in vec_equal():
! Unsupported vctrs type null.
ℹ In file type-info.c at line 117.
ℹ This is an internal error that was detected in the vctrs package.
Please report it at https://github.com/r-lib/vctrs/issues with a reprex and the full backtrace.
Backtrace:

  1. ├─base::ifelse(...)
  2. ├─vctrs:::==.vctrs_vctr(slimcps1970s$xyz, slimcps1970s$OCC1990)
  3. │ └─vctrs::vec_equal(e1, e2)
  4. └─rlang:::stop_internal_c_lib(...)
  5. └─rlang::abort(message, call = call, .internal = TRUE, .frame = frame)
    Warning message:
    Unknown or uninitialised column: xyz.

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