[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    [Rd] smoothScatter() and the KernSmooth package
From:       davide risso <risso.davide () gmail ! com>
Date:       2015-02-18 20:19:33
Message-ID: CAFySUMk3MkkpcvrwyZKtshXYZ+pQo+qVoTfNYnxweKA2kJpEjQ () mail ! gmail ! com
[Download RAW message or body]

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:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MDPlot-methods
> ### Title: Methods for Function 'MDPlot' in Package 'EDASeq'
> ### Aliases: MDPlot MDPlot-methods MDPlot,matrix,numeric-method
> ###   MDPlot,SeqExpressionSet,numeric-method
> ### Keywords: methods
>
> ### ** Examples
>
> library(yeastRNASeq)
> data(geneLevelData)
> data(yeastGC)
>
> sub <- intersect(rownames(geneLevelData), names(yeastGC))
>
> mat <- as.matrix(geneLevelData[sub,])
>
> data <- newSeqExpressionSet(mat,
+             phenoData=AnnotatedDataFrame(
+                       data.frame(conditions=factor(c("mut", "mut",
"wt", "wt")),
+                                  row.names=colnames(geneLevelData))),
+             featureData=AnnotatedDataFrame(data.frame(gc=yeastGC[sub])))
>
> MDPlot(data,c(1,3))
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




-- 
Davide Risso, PhD
Post Doctoral Scholar
Division of Biostatistics
School of Public Health
University of California, Berkeley
344 Li Ka Shing Center, #3370
Berkeley, CA 94720-3370
E-mail: davide.risso@berkeley.edu

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic