Search code examples
rcran

Using un-exported function from another R package?


I often use utility type functions from other packages that are un-exported: pkg:::fun(). I am wondering if I can use such a function within new functionality/scope in my own R package. What is the correct approach here? Is including the package in my description file enough?


Solution

    • Summarising comments from @baptise, and etc...:

    • ::: not allowed on CRAN, so options:

      1. ask author to export it so you can use it in your package via standard imports or suggests.
      2. copy / lift a version of it and clearly cite within your package.