[R-pkg-devel] Using non-exported functions from another package with :::

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jul 6 00:03:07 CEST 2017


On 05/07/2017 3:19 PM, Joris Meys wrote:
> Hi all,
>
> I'm working on a very small package where I redesign the inputs of Shiny to
> have the label inline instead of above the actual widget. To avoid having
> to rewrite quite big parts of Shiny, I need access to a number of internal
> functions. I do this using :::, but R CMD check obviously gives a note,
> indicating that this is "a bad idea".
>
> I understand why this is in most cases a bad idea, but I see no other
> option apart from literally copying these functions (and the ones they
> depend on) all into my package.
>
> Hence my questions:
>
> - is it acceptable to get a package using ::: on CRAN? When I run R CMD
> check --as-cran it only gives a note, but just to be sure...

No.

>
> - anybody a better option to be able to use eg shiny:::selectizeIt,
> shiny:::selectOptions etc?

Talk to the maintainer of shiny, and ask them to export those functions 
(or equivalent ones).  This might be more successful if you write the 
help pages and send them a Github pull request explaining your need, 
since that makes it essentially no immediate work (just long term 
support work).

Duncan Murdoch

>
> Thank you in advance
> Joris
>



More information about the R-package-devel mailing list