[Qpcr-commits] r113 - pkg/NormqPCR/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 8 18:01:40 CEST 2010
Author: jperkins
Date: 2010-06-08 18:01:39 +0200 (Tue, 08 Jun 2010)
New Revision: 113
Modified:
pkg/NormqPCR/R/combineTechReps.R
Log:
replaced apply mean with colmeans to improve efficiency
Modified: pkg/NormqPCR/R/combineTechReps.R
===================================================================
--- pkg/NormqPCR/R/combineTechReps.R 2010-06-07 13:41:59 UTC (rev 112)
+++ pkg/NormqPCR/R/combineTechReps.R 2010-06-08 16:01:39 UTC (rev 113)
@@ -10,7 +10,7 @@
newDetectors <- unique(gsub("_TechReps.\\d","", origDetectors))
NewExpM <- matrix(nrow = length(newDetectors), ncol = dim(expM)[2], dimnames = list(newDetectors,colnames(expM)))
for(detector in newDetectors){
- dValues <- as.numeric(apply(expM[grepl(detector, origDetectors),],2,mean,na.rm=TRUE))
+ dValues <- colMeans(expM[grepl(detector, origDetectors),],na.rm=TRUE)
NewExpM[detector,] <- dValues
}
NewExpM[is.na(NewExpM)] <- NA
More information about the Qpcr-commits
mailing list