Have you thought about adding a as.data.table.default? This is how I define it: as.data.table.default = function(x) as.data.table(as.data.frame(x)) Thus I as.data.table works for all objects for which as.data.frame is defined.
Activity
arunsrinivasan commentedon Dec 1, 2014
Please read completely and follow the instructions here. Thank you.
default method for as.data.table, closes Rdatatable#969
Merge pull request #999 from jangorecki/as.data.table.default
Closes #955. Jan's PR for #969 as.data.table.default fixes this.