StoreyLab / qvalue

R package to estimate q-values and false discovery rate quantities.
109 stars 36 forks source link

stop + cat problem found #5

Closed dgarrimar closed 6 years ago

dgarrimar commented 7 years ago

Hi,

i found this piece of code within the pi0est function (around line 92), after having some trouble with tryCatch:

stop(cat("ERROR:", paste("length(lambda)=", ll, ".", sep=""), "If length of lambda greater than 1,", "you need at least 4 values."))

I think it would be better to use stop + sprintf cause otherwise it is difficult to catch this error, as it is not treated as an error but printed to the screen.

Thanks,

Diego

ajbass commented 7 years ago

Good catch. Will fix soon.

Thanks, Andrew