Skip to content

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

3 messages · Joris Meys, Duncan Murdoch

#
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...

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

Thank you in advance
Joris
#
On 05/07/2017 3:19 PM, Joris Meys wrote:
No.
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
#
Hi Duncan,

I hoped against all odds to get a different answer, but alas you confirm my
biggest fears. I'll get in touch with the shiny guys and hope they'll grant
me my wishes.

Cheers
Joris

On Thu, Jul 6, 2017 at 12:03 AM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote: