**0**wrote:

Hi,

limma function fitFDist() has a bug, triggered under rare circumstances. As per the documentation:

*fitFDist(x, df1, covariate=NULL)*

where

*df1*: the first degrees of freedom of the F-distribution. Can be a single value, or else a vector of the same length as x.

In the case when *df1*** **is a single value and one or more of the *x* values is not finite or below hard-coded limits, the function fails with:

Error in if (evar > 0) { : missing value where TRUE/FALSE needed

The reason is in this piece of fitFDist() code, at about line 22:

ok <- is.finite(x) & is.finite(df1) & (x > -1e-15) & (df1 > 1e-15)

notallok <- !all(ok)

if (notallok) {

x <- x[ok]

df1 <- df1[ok]

if (!is.null(covariate)) {

covariate2 <- covariate[!ok]

covariate <- covariate[ok]

}

}

The highlighted line will produce a list of NAs, which later on produces the error in line 74. A simple way to reproduce the error is to run the example in the vignette of package *betr*.

By the way, the length of *df1* is not checked before use, and could fail in other places.

Line numbers are from stripped code. Using:

R version 3.3.2 (2016-10-31)

Platform: x86_64-redhat-linux-gnu (64-bit)

Running under: Fedora 25 (Workstation Edition)

[1] limma_3.30.7 betr_1.33.0

Thanks !

--c

**33k**• written 15 months ago by Rifius •

**0**

To avoid confusion, it might be worth noting that the betr package is no longer available from Bioconductor.

33k