Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upnames(.SD) sometimes incorrect #1965
Comments
|
Maybe related to #1744 |
|
@franknarf1 in fact I guess it's the same. I'll leave this open just in case... |
|
|
|
@jangorecki I have a fix but it's not quite so simple as having
It's
|
Related to #495.
names(.SD)incorrectly (unexpectedly?) includes all variable names inj:I expected the following to reproduce the problem, but it doesn't (i.e., this works as expected):
So I'm including the more complicated example which brought the problem out:
MEDV:..shouldn't be there at the end. If we exclude the outerpaste0, it's not:Maybe somehow
names(.SD)is interacting withget?Even the old trick of replacing
MEDVwithDT$MEDVdoesn't work (norcopying it)!I had to define
mvin the main environment and replaceMEDVwithmv.