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
Hi! I expected that dcast(DT, .~column) should always output a data table that has columns named unique(paste(DT$column)) but here is a counter-example:
The issue above is that the empty string value is mapped to the column name V1, which is confusing. I would propose to fix by changing that output column name to empty string, as below:
Another thing I noticed is that both NA (missing value) and "NA" (string) map to two different columns (with the same name, "NA"), is that normal? (should there be a warning if dcast outputs columns with the same name?)
The text was updated successfully, but these errors were encountered:
I guess the initial intention was to avoid duplicate names similar to make.names(names, unique=TRUE), hence, I find it quite surprising that you can sneak in the double "NA".
I came across this issue, which was opened in March 2023, and I’m interested in contributing. However, I wanted to check if this issue is still relevant and needs to be addressed.
If it’s still valid, I’d be happy to work on it. Please let me know.
Hi! I expected that
dcast(DT, .~column)
should always output a data table that has columns namedunique(paste(DT$column))
but here is a counter-example:The issue above is that the empty string value is mapped to the column name
V1
, which is confusing. I would propose to fix by changing that output column name to empty string, as below:Another thing I noticed is that both
NA
(missing value) and"NA"
(string) map to two different columns (with the same name, "NA"), is that normal? (should there be a warning if dcast outputs columns with the same name?)The text was updated successfully, but these errors were encountered: