R/permute.1.R

Defines functions permute.1

permute.1<-function(object, design, contrast, fstat){
    shuffle<-as.integer(sample(rownames(design)))
    design.p<-design[shuffle,]
    fit <- lmFit(object, design.p)
    fit2 <- contrasts.fit(fit, contrast)
    f<-get.f(fit2)
    flag<-rep(0,length(f))
    for (i in 1:length(f)){
        if (f[i,1]$F>fstat[i,1]$F)  
            flag[i]<-1
    }
    flag
}

Try the AffyExpress package in your browser

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

AffyExpress documentation built on Nov. 8, 2020, 7:50 p.m.