Without having read all of the comments already made here, but my
understanding why ::: is not allowed is because you are reaching into
the internal API that the package owner does not guarantee will exist
in the next release. If you rely on the internal code of another CRAN
package in your CRAN
Yes, my view is certainly rigid and I agree that in the cases where the
function is actually used directly by the user, exporting it is the correct
step.
However, it seems some packages actually need to access internal functions
from an outside context, but the code that accesses the function is
To follow up on this:
Please check the package code for adding/accessing resources in the netDx
package. If the BiocFileCache options were used correctly there should not
have been multiple entries added to the builders cache as Martin demonstrated
below.
Once the package has been updated to
On 14/09/2020 11:56 a.m., Wang, Zhu wrote:
Yes, mypkg is different from pkg, and I am the maintainer of mypkg, but not
pkg. Otherwise, things can be easier. Sorry for not clear enough.
Then you should not call foo, for the reasons I stated.
Alternatives are to contact the maintainer of pkg
Yes, mypkg is different from pkg, and I am the maintainer of mypkg, but not
pkg. Otherwise, things can be easier. Sorry for not clear enough.
Thanks to Duncan for a practical solution.
Best,
Zhu
-Original Message-
From: Duncan Murdoch
Sent: Monday, September 14, 2020 10:49 AM
To:
On 14/09/2020 10:30 a.m., Wang, Zhu wrote:
In mypkg, I want to call a function foo from pkg, and foo is not exported. I
thought I should use pkg:: or pkg:::, but R CMD check provided a warning.
I'm assuming that mypkg is not the same as pkg; Jeff Newmiller's answer
assumes the opposite.
As Duncan said, if you are calling FROM a function in your package, and the
function you are CALLING is in the same package, then you do NOT need any
colons at all, whether exported or not.
On September 14, 2020 7:30:12 AM PDT, "Wang, Zhu" wrote:
>In mypkg, I want to call a function foo from
In mypkg, I want to call a function foo from pkg, and foo is not exported. I
thought I should use pkg:: or pkg:::, but R CMD check provided a warning.
Thanks,
Zhu
> You don't need either pkg:: or pkg::: if you are calling the function from
> within the package. You may need one of those if
Thanks, Gabriel and Luke. That is exactly what I would like to know. I
appreciate your suggestions.
Best,
Jiefei
On Mon, Sep 14, 2020 at 6:08 AM Gabriel Becker
wrote:
> Jiefei,
>
> Beyond the general response that Luke gave, to be a bit more specific to
> what you said, DATAPTR and
On 13/09/2020 8:47 p.m., Wang, Zhu wrote:
Apologize if I hijack this thread, but the use of ::: is something I was
puzzled.
I tried Duncan's solution in my R package mypkg, something like:
pkg::callInternal("foo", args)
R CMD check mypkg
* checking dependencies in R code ... WARNING
'::' or
You may have a case to argue to CRAN that you can get the "almost" exemption
(can't say without details) but your views look overly rigid.
Exporting an object and marking it as internal is not a "work around", even
less a "dirty trick".
Export makes the object available outside the package's
11 matches
Mail list logo