Skip to content
Prev 49903 / 63424 Next

smoothScatter() and the KernSmooth package

Dear R-devel,

my Bioconductor EDASeq package has a function MDPlot that uses the
smoothScatter() function from the graphics package. When I test this
package on travis-ci.org (R CMD check) I get the following error
(which I don't get on my machine nor on the Bioconductor build
system).

* checking examples ... ERROR
Running examples in ?EDASeq-Ex.R? failed
The error most likely occurred in:
+             phenoData=AnnotatedDataFrame(
+                       data.frame(conditions=factor(c("mut", "mut",
"wt", "wt")),
+                                  row.names=colnames(geneLevelData))),
+             featureData=AnnotatedDataFrame(data.frame(gc=yeastGC[sub])))
Error in loadNamespace(name) : there is no package called ?KernSmooth?
Calls: MDPlot ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

I looked at the code in smoothScatter and there is a call to
grDevices:::.smoothScatterCalcDensity(), which in turn calls
KernSmooth::bkde2D().

This gets fixed by adding KernSmooth as suggested package in EDASeq.

I was able to reproduce this issue (and the fix) in a small R package:
https://github.com/drisso/rmini/tree/smooth

I have a few questions: isn't it unusual the way smoothScatter calls
grDevices:::.smoothScatterCalcDensity() and KernSmooth::bkde2D(),
i.e., without requiring the packages?
Shouldn't "graphics" suggest "KernSmooth"?

Best regards,
Davide