Hi, On Tue, Apr 1, 2014 at 9:56 AM, bgoldstein <[email protected]> wrote: > Up until a recent update (now 1.8.8) I would add a column to a DT the DF way:
It's not clear: are you saying that you are using data.table v1.8.8? If so, could you upgrade to the latest (1.9.2) and try again? > DT <- data.table(a=c(1,2,3), b=c(4,5,6)) > DT$c <- c(7:9) > > Or I could have done the DT way: > DT[,c:=c(7:9)] > > However when I try to do this now I get the error: > >> DT$c = c(7:9) > Error in `[<-.data.table`(x, j = name, value = value) : > attempt to set index 2/2 in SET_STRING_EL I can't explain why this is happening, even in your earlier version (it shouldn't be), but let's all get on the same page first then we can continue w/ the debugging. The output of sessionInfo() after you get this error would also be most helpful. Thanks, -steve -- Steve Lianoglou Computational Biologist Genentech _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
