Skip to content

dcast.data.table error message is cryptic when forced to cast duplicate rows without sufficient aggregation #693

Closed

Description

The current error message is this:

Error in dcast.data.table(test.table, as.formula(paste(class.col, "+",  : 
  retFirst must be integer vector the same length as nrow(i)

A replacement candidate recommended by Arun is this:

Error: fun.aggregate should return, for each unique group (from formula's LHS), 
  a length 1 vector, but returns length=2 for a group.

This SO thread has a reproducible example and background describing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions