You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using subset(d,T,c(3,2)), I want to retrieve the 3rd and 2nd columns. But subset() return the 1st and 2nd columns. Seems it's because of the duplicated column names V1 in data.table d.
I don't know the internal logic about how to handle duplicated col names. But I supposed that if the sequence id is supplied, then the col names (even if there are duplicated col names) should not bother, is it right?
Or maybe there should be some kind of warning when there are duplicated column names ?
The text was updated successfully, but these errors were encountered:
In data.table, providing column numbers should result in the right column even when there are duplicate column names. Providing column name will always return the first column (by order of occurrence) if there are more than one column with the same name.
When using
subset(d,T,c(3,2))
, I want to retrieve the 3rd and 2nd columns. Butsubset()
return the 1st and 2nd columns. Seems it's because of the duplicated column namesV1
in data.tabled
.I don't know the internal logic about how to handle duplicated col names. But I supposed that if the sequence id is supplied, then the col names (even if there are duplicated col names) should not bother, is it right?
Or maybe there should be some kind of warning when there are duplicated column names ?
The text was updated successfully, but these errors were encountered: