### R代码从vignette源的customMethods。Rnw ' ################################################### ### 代码块1号:customMethods。Rnw: 51-52 ################################################### 库(affy ) ################################################### ### 代码块2号:customMethods。Rnw: 59 - 63 ################################################### pmcorrect.methods bgcorrect.methods normalize.AffyBatch.methods () () () express.summary.stat.methods () ################################################### ### 代码块3号:customMethods。Rnw: 68 - 71 ################################################### 库(affydata)数据(稀释)normalize.methods(稀释 ) ################################################### ### 代码块数量4:customMethods。Rnw: 129 - 140 ################################################### pmcorrect。Subtractmmsometimes <- function(对象){##减去mm mm. subtraction <- pm(对象)- mm(对象)##找出哪些是不需要的,并修复它们无效<- which(mm. object)减去< = 0)mm.subtracted(无效)< -点(对象)(无效)返回(mm.subtracted ) } ################################################### ### 代码块5号:customMethods。Rnw: 144 - 145 ################################################### upDate.pmcorrect.methods (c (pmcorrect.methods(),“subtractmmsometimes ")) ################################################### ### 代码块6号:customMethods。Rnw: 151 - 167 ################################################### huber < -函数(y, k = 1.5, tol = 1 e-06) {y < - y [! is.na (y)] n < -长度(y)μ< - (y)中位数s <——疯了(y)如果(s = = 0)停止(“不能估计规模:疯了这个示例是零”)重复{yy < - pmin (pmax(μ- k * s, y)μ+ k * s) mu1 < - (yy) / n如果(abs(μ- mu1) < tol * s)打破μ< - mu1}列表(μμ=,=年代 ) } ################################################### ### 代码块7号:customMethods。Rnw: 173 - 181 ################################################### computeExprVal。huber <- function(probes) {res <- apply(probes, 2, huber) mu <- unlist(lapply(res, function(x) x$mu)) s <- unlist(lapply(res, function(x) x$s)) return(list(exprs=mu, se.exprs=s))} upDate.generateExprSet.methods(c(generateExprSet.methods(), "huber"))