[datatable-help] Is this supposed to happen?
sean.creighton at citi.com
sean.creighton at citi.com
Wed May 23 13:58:14 CEST 2012
Hi
X <- data.table(a=rep(1:3,1:3),b=31:36,c=7:12)
X
setnames(X, 2, "a" ) ## two column named "a" now
X
X[,2:=200L, with=FALSE ] # Change the entries of column 2
X[,2, with=FALSE ] # Instead of changing column 2, the code
appears to have done a look up on the column names and picked the first
match
X
Can anybody tell me how to change column 2 in this example when I have
duplicate column names?
Thanks
Sean
--
View this message in context: http://r.789695.n4.nabble.com/Is-this-supposed-to-happen-tp4631075.html
Sent from the datatable-help mailing list archive at Nabble.com.
More information about the datatable-help
mailing list