make 'merge.data.table' become an exported S3 method #2618
I can not use data.table:::merge.data.table in R CRAN packages.
is not exported and private access ":::" is not allowed in R CRAN packages.
Please make 'merge.data.table' become an exported S3 method.
The text was updated successfully, but these errors were encountered:
What I am saying is that I would like to S3 dispatch on merge.data.table without putting data.table on the search path. I would like to use double colons '::'. Triple colons ':::' are not allowed in R CRAN packages.
For example, I can do
> debug(zoo::as.Date) > zoo::as.Date(17000) debugging in: zoo::as.Date(17000) debug at . . . /zoo/R/as.Date.R
But I can not do that in data.table merge
> debug(data.table:::merge.data.table) > merge(data.table(BOD),data.table(BOD), by = "Time") Error in data.table(BOD) : could not find function "data.table"
From your example: suppose the 'd' is created in package 1 and by package 1 function f1. Suppose package 2 function f2 exists and receives as a parameter d. Suppose that in runnable code, function f2 receives as a parameter data.table d like
then package 2 (and function f2) relies on the dependence of package 1(that created d) and that 'package 2 depending on package 1'
But S3 is flexible. Using it to dispatch is a good idea (so I agree).
However, sometimes I want to be specific. I want to force a certain behavior. Or, I want to be sure that the function that I want is (at least first) called before a dispatch.
An example, is zoo::as.Date (that does S3 dispatch).
Basically, if I call
If this response seems harsh ( if it seems that way ) to anyone, then please forgive me?
My situation is very difficult to explain. My experience is from working with a very large code set with typically 50-100 imported packages.