Skip to content

spread overwrites existing column with identical key value #478

@SportsTribution

Description

@SportsTribution

I was trying to do some data analysis on database table column pairs

Details DF <- data.frame(TABLE=c('TA','TB'),COLUMN=c('ID','TABLE'),value=c(1,1)) spread(DF,COLUMN,value)

gives

ID TABLE
1 1 NA
2 NA 1

same for tibble.

Should be in my opinion an ERROR or at least a WARNING.

(Hope I didn't make any mistakes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorpivoting ♻️pivot rectangular data to different "shapes"

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions