Kasper and I are getting ready to submit a package to Bioconductor that uses ComBat and in doing so I realized I had made some changes that I never shared. In this PR are 2 contributions. One is to change a line in ComBat.R so that it uses message() instead of cat(), which allows us to turn off all ComBat() output using suppressMessages(). The other changes are to helper.R and are for numeric stability - things like getting likelihood on the log scale and then exponentiating, rather than directly computing the product of possibly a very small number, or using crossprod() instead of %*%.
Hi guys,
Kasper and I are getting ready to submit a package to Bioconductor that uses ComBat and in doing so I realized I had made some changes that I never shared. In this PR are 2 contributions. One is to change a line in ComBat.R so that it uses
message()
instead ofcat()
, which allows us to turn off allComBat()
output usingsuppressMessages()
. The other changes are to helper.R and are for numeric stability - things like getting likelihood on the log scale and then exponentiating, rather than directly computing the product of possibly a very small number, or usingcrossprod()
instead of%*%
.