data(UV)
Y<-data.matrix(UV[,-c(1:3)])
##Empirical controls
IS<-Y[,which(colnames(Y)=="IS")]
r<-numeric(dim(Y)[2])
for(j in 1:length(r)){
r[j]<-cor(IS,Y[,j])
}
ctl<-logical(length(r))
ctl[which(r>round(quantile(r,0.7),2))]<-TRUE
## Not run:
# ruv<-NormalizeRUVRand(Y=Y,ctl=ctl,k=3)
# ruvclust<-NormalizeRUVRandClust(RUVRand=ruv,
# maxIter=200,
# nUpdate=100,
# lambdaUpdate=TRUE,
# p=2)
# ruvclustY<-ruvclust$newY
# pairs(princomp(ruvclustY,cor=TRUE)$scores[,c(1:3)],
# pch=as.numeric(UV[,2]), col=UV[,3],
# main="RUV random for clustering")
# ## End(Not run)
Run the code above in your browser using DataLab