running data.table::split returns an Error: 'split' is not an exported object from 'namespace:data.table'. Any idea why?
>Solution :
split is a generic function defined in base. Package data.table just adds a new "data.table" method to it.
## S3 method for class 'data.table'
split(x, f, drop = FALSE,
by, sorted = FALSE, keep.by = TRUE, flatten = TRUE,
..., verbose = getOption("datatable.verbose"))
You can go for data.table:::split.data.table.
So this behavior is expected? It seems weird to me. Shouldn’t
data.table::splitpoint todata.table:::split.data.table?
It might be easier for you to consider print. This is also a generic function. Does every package need to redefine it and make an R session a mess? No. A common practice is to add a new method by defining print.xxx.
