Entering edit mode
Guoneng Zhong
▴
180
@guoneng-zhong-996
Last seen 10.2 years ago
Hi,
Has anyone written a weight function to be used with limma's
read.maimages()? I tried this (based on typing wtflag):
wtblank <- function(w=0.1)
function(gpr){
flagged <- (gpr[,"ID"] = "BLANK")
w * flagged + (!flagged)
}
And here are the errors I got from two different tries:
>
RG<-read.maimages(targets$FileName,source="genepix",columns=list(Gf="F
532
Median",Gb="B532 Median",Rf="F635 Median",Rb="B635
Median"),wt.fun=wtblank)
Error in "[<-"(`*tmp*`, , i, value = function (gpr) :
number of items to replace is not a multiple of replacement
length
>
RG<-read.maimages(targets$FileName,source="genepix",columns=list(Gf="F
532
Median",Gb="B532 Median",Rf="F635 Median",Rb="B635
Median"),wt.fun=wtblank(0))
Error in w * flagged : non-numeric argument to binary operator
What am I doing wrong?
Thanks,
G