When loading the RTextTools package from CRAN, I get the following warnings:
Warning messages:
1: replacing previous import ‘head’ when loading ‘utils’
2: replacing previous import ‘tail’ when loading ‘utils’
How do I get rid of these warnings? I’m the author of the package, so I can manipulate the source code; I’m looking for a solution that gets rid of the warnings rather than suppresses them. They seem to have appeared when I upgraded to R 2.14. Thank you in advance!
This is not your issue – it’s an issue in the
glmnetpackage that you depend on: it explicitly imports all functions from bothMatrixandutilsbut in the wrong order which causes a conflict since they both defineheadandtail(Matrix depends on utils so utils must be first). It is easy to fix – the order of imports has to be reversed in theglmnet/NAMESPACEbut only the maintainer ofglmnetcan do that.PS: This would be better asked on R-devel