Thanks.  I'll try that. I'm surprised, as my local R-Devel install isn't that 
old.

I used to have a few specific imports like this, but I was told to remove them 
because BiocCheck did not like them (because these packages were not declared 
in the "imports" line of the DESCRIPTION). I don't know if the newest version 
of BiocCheck still complains about them now.

-Steve

-----Original Message-----
From: Martin Morgan [mailto:[email protected]] 
Sent: Friday, March 11, 2016 2:24 PM
To: Hartley, Stephen (NIH/NHGRI) [F]; bioc-devel
Subject: Re: [Bioc-devel] Odd behavior by R CMD check



On 03/11/2016 02:17 PM, Hartley, Stephen (NIH/NHGRI) [F] wrote:
> I'm seeing some odd behavior by the R CMD check command for my package, 
> JunctionSeq.
>
> http://bioconductor.org/checkResults/3.3/bioc-LATEST/JunctionSeq/zin2-
> checksrc.html
>
> It's not technically throwing warnings (just a "NOTE"), but it is claiming 
> that there's no global definition for functions belonging to the default R 
> packages (grDevices, utils, stats, and graphics).
>
> So I get lines like this:
> drawGene: no visible global function definition for 'plot.new'
>
> drawGene: no visible global function definition for 'plot.window'
>
> drawGene: no visible global function definition for 'par'
>
> drawGene: no visible global function definition for 'strwidth'
>
> drawGene: no visible global function definition for 'lines'
>
> drawGene: no visible global function definition for 'rect'
>
> drawGene: no visible global function definition for 'segments'
>
> drawGene: no visible global function definition for 'strheight'
>
> Since it's still able to compile the vignette and everything it's clearly not 
> actually having a problem finding these functions at runtime, but I can't 
> figure out what would cause it to throw these notes. I don't get these notes 
> when I run R CMD check locally on any of my test machines (windows, CentOS5 
> linux and scientific linux 6). And I've had it build with no issues before. I 
> can't see how my recent changes could possibly have caused this ...
>
> Has anyone ever seen this before?

This is the behavior with a recent version of R-devel; likely you are using an 
older version or R-3.2.*. Things 'work' because the relevant packages are on 
the search path, but would fail if for instance the user or another package 
were to define a 'strheight' function that did something different from 
graphics::strheight.

The solution is to import the relevant functions, as indicated in the build 
report.

   importFrom("grDevices", "cairo_ps", "col2rgb", "colorRamp", "dev.off",
              "png", "rgb", "svg", "tiff", "x11")
   importFrom("graphics", "abline", "axis", "box", "hist", "layout",
              "legend", "lines", "par", "plot", "plot.new", "plot.window",
              "points", "rect", "segments", "smoothScatter", "strheight",
              "strwidth", "text", "title")
   importFrom("stats", "Gamma", "as.formula", "coef", "coefficients",
              "deviance", "dnbinom", "fitted.values", "formula", "glm",
              "loess", "model.matrix", "optimize", "p.adjust", "pchisq",
              "predict", "qf", "rchisq", "rnorm", "runif", "terms",
              "weighted.mean")
   importFrom("utils", "object.size", "packageVersion", "read.delim",
              "read.table", "write.table")

Martin

>
> Regards,
> Steve Hartley
>
>       [[alternative HTML version deleted]]
>
> _______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>


This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to