Browse code

update postFixed4Parallel

Genevieve Stein-O'Brien authored on 02/04/2018 13:58:55
Showing 1 changed files

... ...
@@ -31,12 +31,12 @@ postFixed4Parallel <- function(AP.fixed, setValues, setMatrix="P")
31 31
         #PSummary <- do.call(rbind,lapply(AP.fixed, function(x) x$Pmean))
32 32
         ASummary <- AP.fixed[[1]]$Amean
33 33
 
34
-        Amax <- apply(ASummary,1,max)
35
-        Aneu <- sweep(ASummary,1,Pmax,FUN="/")
36
-        Pneu <- sweep(PSummary,2,Pmax,FUN="*")
34
+        Amax <- apply(ASummary,2,max)
35
+        Aneu <- sweep(ASummary,2,Amax,FUN="/")
36
+        Pneu <- sweep(PSummary,1,Amax,FUN="*")
37 37
 
38
-        X <- apply(Aneu,1,range)
39
-        Y <- apply(setAs,1,range)
38
+        X <- apply(Aneu,2,range)
39
+        Y <- apply(setAs,2,range)
40 40
         colnames(X) <- colnames(Y)
41 41
         if (all.equal(X,Y,tolerance=0.01) != TRUE)
42 42
             warning("As do not match fixed values.")