[R-pkg-devel] Do I need to namespace and import functions from 'methods' package?
daattali at gmail.com
Sun Jul 12 22:47:43 CEST 2015
I see there have been several messages about this recently. I apologize, I
wasn't aware of the fact that I could search old messages on the board -
will do that next time, thanks
On 12 July 2015 at 13:36, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 12/07/2015 4:01 PM, Dean Attali wrote:
> > I have a package that is using the 'is' function from the 'methods'
> > package. My package has been on CRAN for some time now and has had 3
> > different versions already. Yesterday when submitting, I got a response
> > with:
> > * checking R code for possible problems ... NOTE
> >> ggMarginal: no visible global function definition for 'is'
> >> Undefined global functions or variables:
> >> is
> > So I fixed it by changing 'is' to 'methods::is', and then I got a
> > * checking dependencies in R code ... WARNING
> >> '::' or ':::' import not declared from: ‘methods’
> > So I suppose I need to declare 'methods' in my imported packages.
> > My question is: is this a new requirement, to explicitly import 'methods'
> > and namespace functions from it, or has it always been a requirement but
> > just wasn't caught? Or is it not even a requirement and the R CMD check
> > being weird?
> It is a new requirement. As Joshua Ulrich posted on Friday,
> > Yes, this is expected. See:
> > And an earlier email on this list:
> > https://stat.ethz.ch/pipermail/r-package-devel/2015q2/000171.html
[[alternative HTML version deleted]]
More information about the R-package-devel