inst/oldRsrc/regressOut.R

regressOut = function(sms, rhs, ...) {
 mm = model.matrix(rhs, data=pData(sms))
 f = limma::lmFit(exprs(sms), mm, ...)
 r = exprs(sms) - (f$coef %*% t(f$design))
 sms@assayData = assayDataNew("lockedEnvironment", exprs=r)
 sms
}

Try the GGtools package in your browser

Any scripts or data that you put into this service are public.

GGtools documentation built on Nov. 8, 2020, 6:32 p.m.