[Bioc-devel] Odd behavior by R CMD check
Hartley, Stephen (NIH/NHGRI) [F]
stephen.hartley at nih.gov
Fri Mar 11 23:45:09 CET 2016
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.
From: Martin Morgan [mailto:martin.morgan at roswellpark.org]
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.
> 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",
importFrom("utils", "object.size", "packageVersion", "read.delim",
> Steve Hartley
> [[alternative HTML version deleted]]
> Bioc-devel at r-project.org mailing list
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.
More information about the Bioc-devel