[Distr-commits] r95 - pkg/distrMod/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 26 20:47:22 CET 2008


Author: ruckdeschel
Date: 2008-02-26 20:47:22 +0100 (Tue, 26 Feb 2008)
New Revision: 95

Modified:
   pkg/distrMod/R/solve.R
Log:
quick fix for buglet in solve.R:



Modified: pkg/distrMod/R/solve.R
===================================================================
--- pkg/distrMod/R/solve.R	2008-02-26 19:38:57 UTC (rev 94)
+++ pkg/distrMod/R/solve.R	2008-02-26 19:47:22 UTC (rev 95)
@@ -7,7 +7,7 @@
              d1.0 <- (d1 < tol) + 0.0
              d1.1 <- 1/pmax(d1, d1.0)
              d <- (1-d1.0) * d1.1
-             d <- if (length(d)==1) diag(d) else d
+             d <- if (length(d)==1) d else diag(d)
              a.m <- a.svd$v %*% d %*% t(a.svd$u)
              if (!missing(b))
                 if(!(length(b)==nrow(a))) stop("non-conformable arguments")
@@ -24,7 +24,7 @@
             d1.0 <- (d1 < tol) + 0.0
             d1.1 <- 1/pmax(d1, d1.0)
             d <- (1-d1.0) * d1.1
-            d <- if (length(d)==1) diag(d) else d
+            d <- if (length(d)==1) d else diag(d)
             A <- er$vectors %*% d %*% t(er$vectors)
             if(missing(b)) return(A)
             else return(A%*%b)}



More information about the Distr-commits mailing list