Observed while reading the source("data.table-Ex") output for translation purposes; taken from example(print.data.table):
library(data.table)
options(warn = 2, datatable.show.indices=TRUE)
NN <- 200
DT = data.table(grp1 = sample(100, NN, TRUE), grp2 = sample(90, NN, TRUE), grp3 = sample(80, NN, TRUE))
setindex(DT, grp1, grp3) # will warn during printing after this but not before
DT
# Index: <grp1__grp3>
# Error in rbind(abbs, toprint) :
# (converted from warning) number of columns of result is not a multiple of vector length (arg 1)
The warning most likely originates here:
|
toprint = rbind(abbs, toprint) |
May be a good exercise in finding the emergency exit from R Inferno. If not, will debug myself soon.