Skip to content

CJ(letters, letters) fails (duplicate column name) #7873

Description

@MichaelChirico

I don't recall this being an issue previously so I bet this is a regression:

CJ(letters, letters)
# Error in CJ(letters, letters) : 
#   CJ() cannot create a keyed data.table with duplicated column names: [letters]

While I think it's intentional to prevent creating tables with duplicate names, I think it'd be friendlier to give unique names by default rather than error.

Note that sorted=FALSE fixes this:

CJ(letters, letters, sorted=FALSE)

Activity

  1. rikivillalba commented on Aug 12, 2026

    @rikivillalba
    Contributor

    Since CJ is somethin akin to data.table() one might add check.names= with FALSE by default (to preserve current behaviour) or with TRUE by default (to be friendlier) ...

  2. ben-schwen commented on Aug 19, 2026

    @ben-schwen
    Member

    This is due to #7760

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

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