Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN compatability - Unexported objects imported by ':::' calls #16

Open
drsimonj opened this issue May 5, 2017 · 1 comment
Open

Comments

@drsimonj
Copy link
Owner

drsimonj commented May 5, 2017

The use of unexported/internal functions called via ::: is not allowed by CRAN. For example, after running Rcmd check, a warning is produced:

Unexported objects imported by ':::' calls:
  'lme4:::predict.merMod' 'randomForest:::predict.randomForest'
  'rpart:::predict.rpart' 'stats:::prcomp.formula'
  'stats:::predict.prcomp' 'xgboost:::predict.xgb.Booster'
  See the note in ?`:::` about the use of this operator.
  Including base/recommended package(s):
  'stats' 'rpart'

There has been debate about this issue. For examples, see:

http://stackoverflow.com/questions/20515358/rcmd-check-unexported-objects-imported-by-calls
http://stackoverflow.com/questions/32535773/using-un-exported-function-from-another-r-package
https://stat.ethz.ch/pipermail/r-devel/2013-August/thread.html#67180 (Search for "[Rd] legitimate use of :::")

Overall, the advice on these links has been to either:

  1. Contact package authors and ask them to export the relevant function.
  2. Copy the function source code and cite the author appropriately.

Should CRAN be considered as an outlet for this package, this issue will need to be fixed.

@drsimonj
Copy link
Owner Author

drsimonj commented May 6, 2017

In the r-devel thread linked above, Yihui Xie posts a workaround: https://stat.ethz.ch/pipermail/r-devel/2013-August/067210.html

Although it is not an ideal solution (see answers in thread), it may be appropriate for twidlr, which (ideally) places responsibility on the model packages to get these things right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant