Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Henrik Bengtsson
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

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread David Kepplinger
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

Re: [Bioc-devel] "length(url) == 1 is not TRUE" error for vignette only on build system

2020-09-14 Thread Shepherd, Lori
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

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Duncan Murdoch
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

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Wang, Zhu
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:

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Duncan Murdoch
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.

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Jeff Newmiller
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

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Wang, Zhu
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

Re: [Rd] [External] Thread-safe R functions

2020-09-14 Thread Jiefei Wang
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

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Duncan Murdoch
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

Re: [R-pkg-devel] Use of `:::` in a package for code run in a parallel cluster

2020-09-14 Thread Georgi Boshnakov
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