Skip to content

handling i which is a factor #1632

@aushev

Description

@aushev

It happens quite often to me that column which I passed as i, turns out to be a factor. Current behavior is to throw an error: "i has not evaluated to logical, integer or double", so I have to manually convert it to the same class as the key of the target table.

  1. One option would be just to add this conversion to "[.data.table" function code. I guess there are some reasons against as it have not been done yet, would be glad to hear it.
  2. When it happened first time, it took me some time to figure out what was the problem. It would be helpful to make error message more informative, just add class(i) at the end of message in stop() call.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions