[BioC] limma: semi-bug (?) report for toptable

Gordon Smyth smyth at wehi.edu.au
Sat Dec 3 03:20:07 CET 2005

>Date: Thu, 1 Dec 2005 18:44:24 +0100
>From: "Dr. D. P. Kreil" <dpkreil at gmail.com>
>Subject: [BioC] limma: semi-bug (?) report for toptable
>To: bioconductor at stat.math.ethz.ch
>Dear limma-maintainer,
>Firstly, thank you for providing limma, it has helped our work a lot.
>Now, I am not sure whether this is the right address for this observation.
>I noticed that when calculating only one contrast, e.g.,
>design2<-model.matrix(~ -1 + tgt);
>cont.matrix<-makeContrasts(PvsC=tgtpedicel-tgtcapitellum, levels=design2);
>that this single contrast cannot be named in topTable:
>topTable(cfit2.eb,coef=1);     # works
>topTable(cfit2.eb,coef="PvsC");     # **broken**
>Error in toptable(fit = fit[c("coefficients", "stdev.unscaled")], coef =
>coef,  :
>     subscript out of bounds
>when a second contrast is added to cont.matrix, the problem disappears.
>I suspect that this is caused by a one-column matrix being implicitly
>converted to a vector by R somewhere in toptable.
>While it is easy to work around the problem and one will probably only
>encounter it in rare situations, stumbling over it can confuse amd so I
>wanted to point out the issue.
>Yours sincerely,
>(Boku University, Vienna)

Dear David,

It is an issue which is caused, as you suspect, by a one-column matrix 
being converted to a vector by matrix multiplication. Thanks for pointing 
it out.

Best wishes

More information about the Bioconductor mailing list