I'm using setRefClass
to create classes and since is part of the methods
package, I presumed you need to declare this dependency as an import
.
However, the following minimal example fails Rcmd.exe check
when import
ing methods
:
#' @docType package
#' @import methods
A <- setRefClass("A")
with the following error (my package is called Test
):
==> Rcmd.exe check Test_1.0.tar.gz
<Lots of checks here...>
* checking package dependencies ... ERROR
Namespace dependency not required: 'methods'
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.
Exited with status 1.
So from what I can make out, it appears I'm being told to remove the import
for methods
and so keep hidden the package's dependency on methods
. Is my interpretation correct and if so, why hide the dependency on methods
?
My setup:
After more hunting around, I realised that in my haste I forgot to add Imports: methods
to my DESCRIPTION
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With